From d6ca69ad4622e25c6ef2d49820ed92df7b42b89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 10 Jul 2024 17:20:25 +0400 Subject: [PATCH] tests: drop the need to set INSTALLED=1 when running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- tests/Makefile.am | 1 + tests/common | 4 +++- tests/installed-runner.sh | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) 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