aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <basile@opensource.dyc.edu>2011-04-12 18:57:06 -0400
committerAnthony G. Basile <basile@opensource.dyc.edu>2011-04-12 18:57:06 -0400
commit854534e5a480460934cfdc141bff3778b08ea602 (patch)
tree63f78e88e62339db51125a2d0a968aa33d802a0a /tests/Makefile.am
parentAdded autotool build system (diff)
downloadelfix-854534e5a480460934cfdc141bff3778b08ea602.tar.gz
elfix-854534e5a480460934cfdc141bff3778b08ea602.tar.bz2
elfix-854534e5a480460934cfdc141bff3778b08ea602.zip
Fixed unit tests to work with 'make check'
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 50f6db4..eb398ea 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,9 +1,19 @@
-bin_PROGRAMS = good
-good_SOURCES = good.c
+check_SCRIPTS = test.sh
+TEST = $(check_SCRIPTS)
-test-bad.o: test-bad.asm
- yasm -f elf -m amd64 $<
+test.sh:
+ @echo "================================================================================"
+ @echo
+ @gcc -o good good.c
+ @echo "Good result"
+ @[[ -x ../get-gnustack ]] && ../get-gnustack good || echo "Run 'make' first"
+ @echo
+ @yasm -f elf -m amd64 test-bad.asm
+ @gcc -c bad.c
+ @gcc -o bad bad.o test-bad.o
+ @echo "Bad result"
+ @[[ -x ../get-gnustack ]] && ../get-gnustack bad || echo "Run 'make' first"
+ @echo
+ @echo "================================================================================"
-bad.o: bad.c
-
-bad: bad.o test-bad.o
+CLEANFILES = good good.o bad bad.o test-bad.o test.sh