]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: build: Avoid a recursive 'make check' run
authorPhil Sutter <phil@nwl.cc>
Thu, 4 Sep 2025 11:47:21 +0000 (13:47 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 11 Sep 2025 16:11:53 +0000 (18:11 +0200)
When called by 'make check', the test suite runs with a MAKEFLAGS
variable in environment which defines TEST_LOGS variable with the test
suites' corresponding logs as value. This in turn causes the called
'make distcheck' to run test suites although it is not supposed to.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/build/run-tests.sh

index a5e026a97dd5b8aeba6c1b651b8c3119afcdff96..80fa10168d0035e03e86bc9a75c8dafe55603424 100755 (executable)
@@ -20,6 +20,10 @@ fi
 git clone "$dir" "$tmpdir" &>>"$log_file"
 cd "$tmpdir" || exit
 
+# do not leak data from a calling 'make check' run into the new build otherwise
+# this will defeat the test suite invocation prevention for 'make distcheck'
+unset MAKEFLAGS
+
 if ! autoreconf -fi &>>"$log_file" ; then
        echo "Something went wrong. Check the log '${log_file}' for details."
        exit 1