]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: Dump logs after daemons are killed to make sure everything is flushed
authorDavid Zafman <dzafman@redhat.com>
Fri, 28 Jul 2017 22:06:13 +0000 (15:06 -0700)
committerDavid Zafman <dzafman@redhat.com>
Fri, 4 Aug 2017 13:38:09 +0000 (06:38 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/ceph-helpers.sh

index 219e301942027b378155aa807eba77dad7982819..de1d2fc5ae057c7bc178f102f9feebbe1ea05945 100755 (executable)
@@ -152,11 +152,15 @@ function test_setup() {
 #
 function teardown() {
     local dir=$1
+    local dumplogs=$2
     kill_daemons $dir KILL
     if [ `uname` != FreeBSD ] \
         && [ $(stat -f -c '%T' .) == "btrfs" ]; then
         __teardown_btrfs $dir
     fi
+    if [ "$dumplogs" = "1" ]; then
+        display_logs $dir
+    fi
     rm -fr $dir
     rm -rf $(get_asok_dir)
 }
@@ -1840,10 +1844,9 @@ function main() {
     if run $dir "$@" ; then
         code=0
     else
-        display_logs $dir
         code=1
     fi
-    teardown $dir || return 1
+    teardown $dir $code || return 1
     return $code
 }