From: David Zafman Date: Wed, 4 Apr 2018 23:04:41 +0000 (-0700) Subject: test: Add getjson variable to save output X-Git-Tag: v12.2.5~11^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74774a4dd791e350a5f1d459d69ff2bb85464525;p=ceph.git test: Add getjson variable to save output Signed-off-by: David Zafman (cherry picked from commit 1b1d45bf517237b5221581c3dfb1a7e5fccf712f) --- diff --git a/qa/standalone/scrub/osd-scrub-snaps.sh b/qa/standalone/scrub/osd-scrub-snaps.sh index de3dc71e98e9..b7a58b531849 100755 --- a/qa/standalone/scrub/osd-scrub-snaps.sh +++ b/qa/standalone/scrub/osd-scrub-snaps.sh @@ -16,6 +16,10 @@ # 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