Skip to content

Commit

Permalink
tests: drop the need to set INSTALLED=1 when running tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-André Lureau <[email protected]>
  • Loading branch information
elmarco authored and stefanberger committed Jul 15, 2024
1 parent 24b8e20 commit d6ca69a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/common
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 0 additions & 2 deletions tests/installed-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6ca69a

Please sign in to comment.