]> git.apps.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>
Tue, 10 Apr 2018 20:26:08 +0000 (13:26 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/scrub/osd-scrub-snaps.sh

index c42e03023225a7e82355ca735b7dce021f4f4dde..fa8a8e8412d03369b9b485cc864b363ef6696d91 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
@@ -396,7 +400,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