]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Add getjson variable to save output
authorDavid Zafman <dzafman@redhat.com>
Wed, 4 Apr 2018 23:04:41 +0000 (16:04 -0700)
committerDavid Zafman <dzafman@redhat.com>
Wed, 11 Apr 2018 16:36:02 +0000 (09:36 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 1b1d45bf517237b5221581c3dfb1a7e5fccf712f)

qa/standalone/scrub/osd-scrub-snaps.sh

index de3dc71e98e93661015e61d51a8b5f2a81e675aa..b7a58b531849b8986821bfa16975e23cedea87f6 100755 (executable)
 #
 source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
 
+# Test development and debugging
+# Set to "yes" in order to ignore diff errors and save results to update test
+getjson="no"
+
 function run() {
     local dir=$1
     shift
@@ -406,7 +410,11 @@ function TEST_scrub_snaps() {
 EOF
 
     jq "$jqfilter" $dir/json | python -c "$sortkeys" > $dir/csjson
-    diff ${DIFFCOLOPTS} $dir/checkcsjson $dir/csjson || return 1
+    diff ${DIFFCOLOPTS} $dir/checkcsjson $dir/csjson || test $getjson = "yes" || return 1
+    if test $getjson = "yes"
+    then
+        jq '.' $dir/json > save1.json
+    fi
 
     if which jsonschema > /dev/null;
     then