]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: avoid bash == --shell confusion in docker-test-helper.sh
authorLoic Dachary <ldachary@redhat.com>
Sun, 21 Dec 2014 13:22:31 +0000 (14:22 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sun, 21 Dec 2014 16:53:00 +0000 (17:53 +0100)
Do not force interactive mode when the bash script is specified by the
user because it should be usable to run a small script instead of
starting an interactive shell session.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/docker-test-helper.sh

index d2ebc236539ce4a00dbad768f6a2750b3f480365..a9667c503dea895833d77d4af6b5d7c5823eecfd 100755 (executable)
@@ -136,7 +136,7 @@ function run_in_docker() {
     cmd+=" --volume $downstream:$downstream"
     cmd+=" --volume $upstream:$upstream"
     local status=0
-    if test "$script" = "bash" ; then
+    if test "$script" = "SHELL" ; then
         $cmd --tty --interactive --workdir $downstream $user $dev $image bash
     else
         if ! $cmd --workdir $downstream $user $dev $image "$@" ; then
@@ -345,7 +345,7 @@ function main_docker() {
             if $remove ; then
                 remove_all $os_type $os_version || return 1
             elif $shell ; then
-                run_in_docker $os_type $os_version $dev $user "$opts" bash || return 1
+                run_in_docker $os_type $os_version $dev $user "$opts" SHELL || return 1
             else
                 run_in_docker $os_type $os_version $dev $user "$opts" "$@" || return 1
             fi