diff --git a/tests/Makefile.am b/tests/Makefile.am index 5273e497a..5ca8d5eb9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -233,6 +233,7 @@ install-data-hook: mkdir -p $(DESTDIR)$(testdir) cd $(srcdir) && for file in $(EXTRA_DIST); do install -D "$$file" "$(DESTDIR)$(testdir)/$$file" ; done echo "$(TESTS)" > $(DESTDIR)$(testdir)/tests + sed -i '/SWTPM_TEST_UNINSTALLED=1/d' $(DESTDIR)$(testdir)/common uninstall-hook: cd $(DESTDIR)$(testdir) && rm -f $(EXTRA_DIST) tests diff --git a/tests/common b/tests/common index e27f912ff..e9dcca0d6 100644 --- a/tests/common +++ b/tests/common @@ -1,7 +1,9 @@ # shellcheck shell=bash -if [ -z "${INSTALLED}" ]; then +SWTPM_TEST_UNINSTALLED=1 + +if [ -n "${SWTPM_TEST_UNINSTALLED}" ]; then SWTPM=swtpm SWTPM_EXE=${SWTPM_EXE:-${ROOT}/src/swtpm/${SWTPM}} SWTPM_IOCTL=${SWTPM_IOCTL:-${ROOT}/src/swtpm_ioctl/swtpm_ioctl} diff --git a/tests/installed-runner.sh b/tests/installed-runner.sh index 3aaa8e9fb..79f674727 100755 --- a/tests/installed-runner.sh +++ b/tests/installed-runner.sh @@ -23,8 +23,6 @@ pass_count=0 skip_count=0 fail_count=0 -export INSTALLED=1 - # Iterate through each test in the TESTS variable for t in $TESTS; do if [ "$verbose" -eq 1 ]; then