From fd6eba9dcaa6697630470c993880e98d735f6ba4 Mon Sep 17 00:00:00 2001 From: giordano <domenico.giordano@cern.ch> Date: Thu, 19 Sep 2019 14:31:11 +0200 Subject: [PATCH] adding utility to check json differences --- common/parsertest.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/parsertest.sh b/common/parsertest.sh index 74748ff4..121cba25 100755 --- a/common/parsertest.sh +++ b/common/parsertest.sh @@ -1,5 +1,6 @@ #!/bin/bash +PARSERTEST_DIR=$(dirname $(readlink -f $0) ) # Input arguments function usage(){ echo "Usage: $0 [<workload-directory> (default: .)]" @@ -85,11 +86,12 @@ for job in $jobs; do testjson=${APPtest}${suffix} if [ -f ${testjson} ]; then echo -e "\n${testjson}:" - cat ${testjson} + python -c "import yaml; print yaml.dump( yaml.safe_load(open('${testjson}')))" if [ -f ${prodjson} ]; then if [ "$status2" == "" ]; then status2=0; fi echo -e "\nDIFFERENCES to ${prodjson}:" - diff ${testjson} ${prodjson} + $PARSERTEST_DIR/json-differ.py ${prodjson} ${testjson} + #diff ${testjson} ${prodjson} if [ $? -eq 0 ]; then echo "[None]" else -- GitLab