From 9fcb9546af96293acafe1977a38670e05b3eeac7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Oct 2021 23:53:09 +0100 Subject: [PATCH] Add patch to fix installed-tests --- debian/patches/series | 1 + ...kip-a-unit-test-when-running-as-an-i.patch | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 debian/patches/test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch diff --git a/debian/patches/series b/debian/patches/series index b73e566a..bad905f4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch debian/Skip-test-pull-repeated-during-CI.patch diff --git a/debian/patches/test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch b/debian/patches/test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch new file mode 100644 index 00000000..1305103f --- /dev/null +++ b/debian/patches/test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch @@ -0,0 +1,29 @@ +From: Simon McVittie +Date: Tue, 5 Oct 2021 23:51:37 +0100 +Subject: test-commit-sign.sh: Skip a unit test when running as an + installed-test + +Signed-off-by: Simon McVittie +--- + tests/test-commit-sign.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh +index c3f9ce6..e175919 100755 +--- a/tests/test-commit-sign.sh ++++ b/tests/test-commit-sign.sh +@@ -88,8 +88,12 @@ assert_file_has_content_literal show.txt 'Found 1 signature' + echo "ok pull verify" + + # Run tests written in C +-${OSTREE_UNINSTALLED}/tests/test-commit-sign-sh-ext +-echo "ok extra C tests" ++if [ -n "${OSTREE_UNINSTALLED:-}" ]; then ++ ${OSTREE_UNINSTALLED}/tests/test-commit-sign-sh-ext ++ echo "ok extra C tests" ++else ++ echo "ok # SKIP test only available when running uninstalled" ++fi + + # Clean things up and reinit + rm repo -rf