From 3c5fbc0662d385c0a880935b2f57b5ae738f6ea4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 31 Mar 2016 16:10:15 +0100 Subject: [PATCH] Add a patch to skip a test with non-GNU parallel more reliably --- debian/changelog | 1 + ...obe-for-GNU-parallel-more-accurately.patch | 47 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 49 insertions(+) create mode 100644 debian/patches/Probe-for-GNU-parallel-more-accurately.patch diff --git a/debian/changelog b/debian/changelog index 7f7d0833..ce8bea24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ ostree (2016.4-1) UNRELEASED; urgency=medium * debian/ostree-tests.lintian-overrides: override a couple of false positives * Run dh_auto_test with VERBOSE=1, to get logs with older debhelper + * Add a patch to skip a test with non-GNU parallel more reliably -- Simon McVittie Mon, 28 Mar 2016 12:02:59 +0100 diff --git a/debian/patches/Probe-for-GNU-parallel-more-accurately.patch b/debian/patches/Probe-for-GNU-parallel-more-accurately.patch new file mode 100644 index 00000000..6532bd87 --- /dev/null +++ b/debian/patches/Probe-for-GNU-parallel-more-accurately.patch @@ -0,0 +1,47 @@ +From: Simon McVittie +Date: Thu, 31 Mar 2016 14:32:55 +0100 +Subject: Probe for GNU parallel more accurately + +moreutils parallel isn't compatible with the command-line syntax +used here. Because it doesn't implement GNU-style --help and exits 1 +when that option is given, this test was correctly skipped when +using moreutils parallel, but only by mistake. + +moreutils parallel might conceivably gain --help and --version in +future, but hopefully nothing incompatible with GNU parallel is going +to gain a --gnu option. + +Also use the --gnu option to force the new command-line semantics; +some versions optionally supported an incompatible command-line syntax +taken from moreutils parallel. + +Signed-off-by: Simon McVittie +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/9dafc820241ed6e663ad4093660fc255f549aa26 +--- + tests/test-admin-locking.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/test-admin-locking.sh b/tests/test-admin-locking.sh +index 564295d..01814f9 100755 +--- a/tests/test-admin-locking.sh ++++ b/tests/test-admin-locking.sh +@@ -25,8 +25,8 @@ set -euo pipefail + setup_os_repository "archive-z2" "syslinux" + + # If parallel is not installed, skip the test +-if ! parallel --help >/dev/null 2>&1; then +- echo "1..0 # SKIP no /usr/bin/parallel" ++if ! parallel --gnu /bin/true /dev/null 2>&1; then ++ echo "1..0 # SKIP GNU parallel not available" + exit 0 + fi + +@@ -42,7 +42,7 @@ echo "rev=${rev}" + ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime + assert_has_dir sysroot/boot/ostree/testos-${bootcsum} + +-parallel_cmd=parallel ++parallel_cmd="parallel --gnu" + if parallel --help | grep -q -e --no-notice; then + parallel_cmd="${parallel_cmd} --no-notice" + fi diff --git a/debian/patches/series b/debian/patches/series index b7e5ad4a..e64eb1e1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch Load-g-i-bindings-from-builddir-during-build-time-testing.patch tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch +Probe-for-GNU-parallel-more-accurately.patch