Message ID | 20190904203013.9028-26-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | current testing/next queue (podman, docker, ci) | expand |
On 9/4/19 10:29 PM, Alex Bennée wrote: > On some images SHELL is pointing at a limited /bin/sh which doesn't > understand noprofile/norc. Given the run script is running bash just > invoke it directly. > This fixes: $ make docker-test-build@IMAGE DEBUG=1 [...] + echo ' ./test-build' ./test-build + echo '* Hit Ctrl-D to continue, or type '\''exit 1'\'' to abort' * Hit Ctrl-D to continue, or type 'exit 1' to abort + echo + /bin/sh --noprofile --norc /bin/sh: 0: Illegal option -- Fixes: 2b0c4fa13f3 Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > tests/docker/run | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/docker/run b/tests/docker/run > index 1014871fec0..8edc7026ee3 100755 > --- a/tests/docker/run > +++ b/tests/docker/run > @@ -62,7 +62,7 @@ echo "* Prepared to run command:" > echo " $CMD" > echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort" > echo > -$SHELL --noprofile --norc > +env bash --noprofile --norc > > if "$CMD"; then > exit 0 > @@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then > echo "* Hit Ctrl-D to exit" > echo > # Force error after shell exits > - $SHELL --noprofile --norc && exit 1 > + env bash --noprofile --norc && exit 1 > else > exit 1 > fi >
diff --git a/tests/docker/run b/tests/docker/run index 1014871fec0..8edc7026ee3 100755 --- a/tests/docker/run +++ b/tests/docker/run @@ -62,7 +62,7 @@ echo "* Prepared to run command:" echo " $CMD" echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort" echo -$SHELL --noprofile --norc +env bash --noprofile --norc if "$CMD"; then exit 0 @@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then echo "* Hit Ctrl-D to exit" echo # Force error after shell exits - $SHELL --noprofile --norc && exit 1 + env bash --noprofile --norc && exit 1 else exit 1 fi
On some images SHELL is pointing at a limited /bin/sh which doesn't understand noprofile/norc. Given the run script is running bash just invoke it directly. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1