]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/test/config_converter/test_converter.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / spdk / test / config_converter / test_converter.sh
1 #!/usr/bin/env bash
2 CONVERTER_DIR=$(readlink -f $(dirname $0))
3 SPDK_BUILD_DIR=$CONVERTER_DIR/../../
4 source $CONVERTER_DIR/../common/autotest_common.sh
5
6 function test_cleanup() {
7 rm -f $CONVERTER_DIR/config_converter.json $CONVERTER_DIR/config_virtio_converter.json
8 }
9
10 function on_error_exit() {
11 set +e
12 test_cleanup
13 print_backtrace
14 exit 1
15 }
16
17 trap 'on_error_exit' ERR
18
19 cat $CONVERTER_DIR/config.ini | python3 $SPDK_BUILD_DIR/scripts/config_converter.py > $CONVERTER_DIR/config_converter.json
20 cat $CONVERTER_DIR/config_virtio.ini | python3 $SPDK_BUILD_DIR/scripts/config_converter.py > $CONVERTER_DIR/config_virtio_converter.json
21 diff -I "cpumask" -I "max_queue_depth" -I "queue_depth" <(jq -S . $CONVERTER_DIR/config_converter.json) <(jq -S . $CONVERTER_DIR/spdk_config.json)
22 diff <(jq -S . $CONVERTER_DIR/config_virtio_converter.json) <(jq -S . $CONVERTER_DIR/spdk_config_virtio.json)
23 test_cleanup