Initial Travis CI config.

Try to get Travis' gmake to run ./make-git-info in before compiling macro11.c.
In RunTests, reflect differences in exit status, for automated testing.
This commit is contained in:
Olaf Seibert 2017-12-18 13:58:11 +01:00
parent 0a9d7cddb0
commit d98c1e54d0
3 changed files with 20 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: c
dist: trusty
install: false
compiler:
- gcc
- clang
script:
- make
- cd tests
- ./RunTests

View File

@ -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

View File

@ -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