diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b8bad29 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: c +dist: trusty +install: false +compiler: + - gcc + - clang +script: + - make + - cd tests + - ./RunTests diff --git a/Makefile b/Makefile index 52410c6..0ad4bf5 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ git-info.h: # Bootstrap dependency on the git header file, which otherwise # gets generated too late. macro11.o: git-info.h +macro11.c: git-info.h clean: -rm -f $(MACRO11_OBJS) $(DUMPOBJ_OBJS) macro11 dumpobj diff --git a/tests/RunTests b/tests/RunTests index c151ffa..7bcf973 100755 --- a/tests/RunTests +++ b/tests/RunTests @@ -27,20 +27,27 @@ TESTS="test-asciz \ test-undef \ test-word-comma" +status=0 + assemble() { t="$1" ../macro11 -l "$t".lst -o "$t".obj "$t".mac 2>/dev/null + # Ignore error status and messages from the assembler. + # We check the listing file to see what we expect. + if [ -e "$t".lst.ok ] then diff -u "$t".lst.ok "$t".lst + status=$((status + $?)) fi if [ -e "$t".objd.ok ] then ../dumpobj "$t".obj >"$t".objd diff -u "$t".objd.ok "$t".objd + status=$((status + $?)) fi } @@ -65,3 +72,5 @@ EOF assemble "$fn" done + +exit $status