From 3a9917e575fc367b2e7be951fe6b27efcc9ae8b1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 14 May 2020 00:52:12 +0200 Subject: [PATCH] Add some buildsystem tests to Travis --- .travis.yml | 4 ++-- etc/ci.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d6c132937..85406f1c50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/etc/ci.sh b/etc/ci.sh index b6479fc2cb..afd05df713 100644 --- a/etc/ci.sh +++ b/etc/ci.sh @@ -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