From: David Zafman Date: Mon, 9 Apr 2018 22:09:38 +0000 (-0700) Subject: test: Be smarter about when jsonschema can be used X-Git-Tag: v12.2.5~11^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9594dfb645553b424e8d3db7a43b9dbbde6b3542;p=ceph.git test: Be smarter about when jsonschema can be used Signed-off-by: David Zafman (cherry picked from commit 9c5ef19f93d999c50641b8bf464b462e0ef5e8f2) --- diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index f295284e0183..7ef39c639588 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -1324,7 +1324,7 @@ EOF jq '.' $dir/json > save1.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi @@ -2506,7 +2506,7 @@ EOF jq '.' $dir/json > save2.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi @@ -3246,7 +3246,7 @@ EOF jq '.' $dir/json > save3.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi @@ -4666,7 +4666,7 @@ EOF jq '.' $dir/json > save${num}.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi @@ -5026,7 +5026,7 @@ EOF jq '.' $dir/json > save6.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-obj.json || return 1 fi diff --git a/qa/standalone/scrub/osd-scrub-snaps.sh b/qa/standalone/scrub/osd-scrub-snaps.sh index c701110f27b3..f0e4aee7e589 100755 --- a/qa/standalone/scrub/osd-scrub-snaps.sh +++ b/qa/standalone/scrub/osd-scrub-snaps.sh @@ -642,7 +642,7 @@ EOF jq '.' $dir/json > save1.json fi - if which jsonschema > /dev/null; + if test "$LOCALRUN" = "yes" && which jsonschema > /dev/null; then jsonschema -i $dir/json $CEPH_ROOT/doc/rados/command/list-inconsistent-snap.json || return 1 fi