From 9594dfb645553b424e8d3db7a43b9dbbde6b3542 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Mon, 9 Apr 2018 15:09:38 -0700 Subject: [PATCH] test: Be smarter about when jsonschema can be used Signed-off-by: David Zafman (cherry picked from commit 9c5ef19f93d999c50641b8bf464b462e0ef5e8f2) --- qa/standalone/scrub/osd-scrub-repair.sh | 10 +++++----- qa/standalone/scrub/osd-scrub-snaps.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index f295284e01832..7ef39c6395883 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 c701110f27b31..f0e4aee7e589f 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 -- 2.39.5