summaryrefslogtreecommitdiffstats
path: root/tests/docker
diff options
context:
space:
mode:
authorFam Zheng2016-09-21 05:49:28 +0200
committerFam Zheng2016-09-23 05:48:32 +0200
commit9b77336d83b73f7585cc2dbc565d377940905191 (patch)
tree7886330f684bc1393560bdf6f3dfdc3f4bc9c83e /tests/docker
parentdocker: Terminate instances at SIGTERM and SIGHUP (diff)
downloadqemu-9b77336d83b73f7585cc2dbc565d377940905191.tar.gz
qemu-9b77336d83b73f7585cc2dbc565d377940905191.tar.xz
qemu-9b77336d83b73f7585cc2dbc565d377940905191.zip
docker: exec $CMD
This is the last command to run (unless DEBUG), make it 'exec' to simplify the process tree. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1474429768-25027-10-git-send-email-famz@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tests/docker')
-rwxr-xr-xtests/docker/run15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/docker/run b/tests/docker/run
index ed7dd312f8..c1e4513bce 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -57,14 +57,17 @@ cd "$QEMU_SRC/tests/docker"
CMD="$QEMU_SRC/tests/docker/$@"
-if test -n "$DEBUG"; then
- echo "* Prepared to run command:"
- echo " $CMD"
- echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
- echo
- $SHELL
+if test -z "$DEBUG"; then
+ exec $CMD
fi
+# DEBUG workflow
+echo "* Prepared to run command:"
+echo " $CMD"
+echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
+echo
+$SHELL
+
if "$CMD"; then
exit 0
elif test -n "$DEBUG"; then