Skip to content

Commit

Permalink
Add some buildsystem tests to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed May 19, 2020
1 parent 9896fc3 commit 3a9917e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ matrix:
#
# Also change the compiler to GCC 4.7, to ensure we stay compatible
# with that older version.
- env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=64 BUILDDIR=build CONFIGFLAGS="--enable-valgrind CC=gcc-4.7 CXX=g++-4.7"
- env: TEST_SUITES="docomp testbuildsys testinstall" NO_COVERAGE=1 ABI=64 BUILDDIR=build CONFIGFLAGS="--enable-valgrind CC=gcc-4.7 CXX=g++-4.7"
addons:
apt_packages:
- gcc-4.7
Expand All @@ -140,7 +140,7 @@ matrix:

# same as above, but in 32 bit mode, also turn off debugging (see elsewhere in this file for
# an explanation).
- env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS=""
- env: TEST_SUITES="docomp testbuildsys testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS=""
addons:
apt_packages:
- gcc-multilib
Expand Down
30 changes: 30 additions & 0 deletions etc/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,36 @@ GAPInput
git diff --exit-code -- src
;;

testbuildsys)
# this test assumes we are doing an out-of-tree build
test $BUILDDIR != $SRCDIR

# test: create garbage *.d and *.lo files in the source dir; these should not
# affect the out of tree build, nor should they be removed by `make clean`
mkdir -p $SRCDIR/gen/deps/src
mkdir -p $SRCDIR/gen/obj/src
echo "garbage content !!!" > $SRCDIR/gen/deps/src/bool.c.d
echo "garbage content !!!" > $SRCDIR/gen/obj/src/bool.c.lo

# test: `make clean` works and afterwards we can still `make`
make clean
make

# verify our "garbage" files are still there
test -f $SRCDIR/gen/deps/src/bool.c.d
test -f $SRCDIR/gen/obj/src/bool.c.lo

# test: `make` should regenerate removed *.d files (and then also regenerate the
# corresponding *.lo file, which we verify by overwriting it with garbage)
rm gen/deps/src/bool.c.d
echo "garbage content !!!" > gen/obj/src/bool.c.lo
make
test -f gen/deps/src/bool.c.d

# test: running `make` a second time should produce no output
test -z "$(make)"
;;

makemanuals)
make doc
make check-manuals
Expand Down

0 comments on commit 3a9917e

Please sign in to comment.