test/json_config: Freebsd supports python3 now so use it

Change-Id: I7a03dddfbc455f9d9374ce864dc3c9fab157d81e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481889
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Pawel Kaminski 2020-01-16 11:26:35 -05:00 committed by Tomasz Zawadzki
parent 50e5d88317
commit 0cd9241a2d

View File

@ -8,12 +8,6 @@ if [ $# -ne 2 ]; then
fi
rootdir=$(readlink -f $(dirname $0)/../..)
# FIXME: Remove this when python3 will be on FeeBSD machines
if [ $(uname -s) = "FreeBSD" ]; then
python_cmd=python
else
python_cmd=""
fi
# Compare two JSON files.
#
@ -25,8 +19,8 @@ tmp_file_1=$(mktemp /tmp/$(basename ${1}).XXX)
tmp_file_2=$(mktemp /tmp/$(basename ${2}).XXX)
ret=0
$python_cmd $rootdir/test/json_config/config_filter.py -method "sort" < $1 > $tmp_file_1
$python_cmd $rootdir/test/json_config/config_filter.py -method "sort" < $2 > $tmp_file_2
$rootdir/test/json_config/config_filter.py -method "sort" < $1 > $tmp_file_1
$rootdir/test/json_config/config_filter.py -method "sort" < $2 > $tmp_file_2
if ! diff -u $tmp_file_1 $tmp_file_2; then
ret=1