summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-12-28 22:16:11 +1300
committerDavid Phillips <david@sighup.nz>2017-12-28 22:16:11 +1300
commit486080d2def79f7a2c84b6289b2baf8e292f37e2 (patch)
tree76a97e68e9137241fb17496fe223fedf14a5513b /test
parent5d8b9c9d853e4c2ea0fb83975dda504302eb1eac (diff)
downloadhence-486080d2def79f7a2c84b6289b2baf8e292f37e2.tar.xz
Move test binaries to separate ignored dir
Diffstat (limited to 'test')
-rw-r--r--test/.gitignore10
-rw-r--r--test/Makefile21
-rwxr-xr-xtest/test.sh2
3 files changed, 13 insertions, 20 deletions
diff --git a/test/.gitignore b/test/.gitignore
index dd7da30..18ace54 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,10 +1,2 @@
-test-logic-and
-test-logic-nand
-test-logic-nor
-test-logic-not
-test-logic-or
-test-logic-xor
-test-whitespace-input
-test-duplicate-input
-test-short-keyword
+bin
*.log
diff --git a/test/Makefile b/test/Makefile
index 6f04c4a..44d4969 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,24 +1,25 @@
CFLAGS += -I../
TESTS = \
- test-whitespace-input \
- test-short-keyword \
- test-duplicate-input \
- test-logic-and \
- test-logic-or \
- test-logic-nand \
- test-logic-nor \
- test-logic-xor \
- test-logic-not \
+ bin/test-whitespace-input \
+ bin/test-short-keyword \
+ bin/test-duplicate-input \
+ bin/test-logic-and \
+ bin/test-logic-or \
+ bin/test-logic-nand \
+ bin/test-logic-nor \
+ bin/test-logic-xor \
+ bin/test-logic-not \
all: $(TESTS)
-test-%: test-%.c ../gate.o ../parser.o ../logic.o
+bin/test-%: test-%.c ../gate.o ../parser.o ../logic.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
.PHONY: clean
clean:
+ cd bin
rm -f $(TESTS)
for i in $(TESTS) ; do \
rm -f $$i.std{out,err}.log ; \
diff --git a/test/test.sh b/test/test.sh
index 06a8062..5c46f8b 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -2,7 +2,7 @@
fail="none"
-for i in test-* ; do
+for i in bin/test-* ; do
if [[ "$i" != *.* ]] ; then
if ./"$i" >"$i.stdout.log" 2>"$i.stderr.log" ; then
echo -ne '[\e[0;32mPASS\e[0m]'