summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-04 21:59:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-04 21:59:38 -0700
commit13d9d869a53cffac4eac515b7bfd9b4ee4884adf (patch)
tree107ddfef5c868269b7b6defaa8971c6d81380390
parent833caeab28e5dfaba7d7a095d35b6326add4a601 (diff)
downloadnasm-13d9d869a53cffac4eac515b7bfd9b4ee4884adf.tar.gz
test/Makefile: add rules for the automatic tests
Add Makefile rules to run the automatic tests. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--test/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile
index cc11f0e4..cc3fe3ce 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,8 +1,9 @@
.SUFFIXES: .bin .o .o64 .obj .obj64 .exe .asm .lst .pl
-NASM = ../nasm
+NASM = ../nasm
NASMOPT = -Ox -I../misc
-PERL = perl
+PERL = perl
+TESTS = $(wildcard *.asm)
%.bin: %.asm $(NASM)
$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
@@ -24,5 +25,15 @@ PERL = perl
all:
+golden: performtest.pl $(TESTS)
+ $(PERL) performtest.pl --golden --nasm='$(NASM)' $(TESTS)
+
+test: performtest.pl $(NASM) $(TESTS)
+ $(PERL) performtest.pl --nasm='$(NASM)' $(TESTS)
+
clean:
rm -f *.com *.o *.o64 *.obj *.obj64 *.exe *.lst *.bin
+ rm -rf testresults
+
+spotless: clean
+ rm -rf golden