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 <smcv@debian.org> Closes: #232 Approved by: cgwalters
This commit is contained in:
parent
8cda8b6866
commit
9dafc82024
|
|
@ -25,8 +25,8 @@ set -euo pipefail
|
||||||
setup_os_repository "archive-z2" "syslinux"
|
setup_os_repository "archive-z2" "syslinux"
|
||||||
|
|
||||||
# If parallel is not installed, skip the test
|
# If parallel is not installed, skip the test
|
||||||
if ! parallel --help >/dev/null 2>&1; then
|
if ! parallel --gnu /bin/true </dev/null >/dev/null 2>&1; then
|
||||||
echo "1..0 # SKIP no /usr/bin/parallel"
|
echo "1..0 # SKIP GNU parallel not available"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
${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}
|
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||||
|
|
||||||
parallel_cmd=parallel
|
parallel_cmd="parallel --gnu"
|
||||||
if parallel --help | grep -q -e --no-notice; then
|
if parallel --help | grep -q -e --no-notice; then
|
||||||
parallel_cmd="${parallel_cmd} --no-notice"
|
parallel_cmd="${parallel_cmd} --no-notice"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue