diff options
author | Rafael Laboissière <rafael@debian.org> | 2024-04-20 00:25:44 -0300 |
---|---|---|
committer | Rafael Laboissière <rafael@debian.org> | 2024-04-20 00:25:44 -0300 |
commit | 6804bf6a4264b1a8824e21ca64651eb02541f2a1 (patch) | |
tree | 3bad9cf93cf491253d1f9a11762d9cbeb56beb88 | |
parent | 05788d3826237343c6830f20b87aa5f90889d66a (diff) |
Make autopkgtest work
-rwxr-xr-x | debian/rules | 2 | ||||
-rwxr-xr-x | debian/tests/run-tests | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules index 59461c6..2c7091f 100755 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,7 @@ export PKG_CONFIG = pkgconf ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: - VAR=' ' debian/tests/run-tests + debian/tests/run-tests package-build endif execute_after_dh_auto_install: diff --git a/debian/tests/run-tests b/debian/tests/run-tests index abd339e..f5fff4b 100755 --- a/debian/tests/run-tests +++ b/debian/tests/run-tests @@ -1,5 +1,25 @@ #!/bin/sh +MODE=${1-} + +if [ -z "$MODE" ] ; then + # For autopkgtest + VAR="FIM_EXE=/usr/bin/fim abs_builddir=" + # Generate the Makefile from scratch + dh_autoreconf_clean + dh_autoreconf + dh_auto_configure + # Disable the command for target "all" + sed -i -e 's/$(MAKE) $(AM_MAKEFLAGS) all-recursive/#/' Makefile +else + VAR= +fi + +# Pretend we are in a basic terminal export TERM=vt102 -VAR=${VAR:-FIM_EXE=/usr/bin/fim} + +# Ensure that there is no $DISPLAY when running the tests +export DISPLAY= + +# Run the unit tests make tests $VAR |