From 62529ca862e775e7025e34e6bc4880719ec07743 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Fri, 3 Aug 2018 14:06:13 +0200 Subject: [PATCH] autotest: move vhost test script execution to separate file Keep run_test inside a designated file instead of calling them directly in autotest.sh In similar way how nvmf and iscsi scripts are composed. Change-Id: I19f70678a85b5764d34808f8f7a9e735556474f9 Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/421232 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Paul Luse Reviewed-by: Jim Harris Reviewed-by: Seth Howell --- autotest.sh | 64 ++------------------------------------------- test/vhost/vhost.sh | 61 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 62 deletions(-) create mode 100755 test/vhost/vhost.sh diff --git a/autotest.sh b/autotest.sh index 7c4bdafb1c..e3298a4307 100755 --- a/autotest.sh +++ b/autotest.sh @@ -166,68 +166,8 @@ if [ $SPDK_TEST_NVMF -eq 1 ]; then fi if [ $SPDK_TEST_VHOST -eq 1 ]; then - timing_enter vhost - timing_enter negative - run_test suite ./test/vhost/spdk_vhost.sh --negative - timing_exit negative - - timing_enter vhost_json_config - run_test suite ./test/vhost/json_config/json_config.sh - timing_exit vhost_json_config - - timing_enter vhost_boot - run_test suite ./test/vhost/spdk_vhost.sh --boot - timing_exit vhost_boot - - if [ $RUN_NIGHTLY -eq 1 ]; then - timing_enter integrity_blk - run_test suite ./test/vhost/spdk_vhost.sh --integrity-blk - timing_exit integrity_blk - - timing_enter integrity - run_test suite ./test/vhost/spdk_vhost.sh --integrity - timing_exit integrity - - timing_enter fs_integrity_scsi - run_test suite ./test/vhost/spdk_vhost.sh --fs-integrity-scsi - timing_exit fs_integrity_scsi - - timing_enter fs_integrity_blk - run_test suite ./test/vhost/spdk_vhost.sh --fs-integrity-blk - timing_exit fs_integrity_blk - - timing_enter integrity_lvol_scsi_nightly - run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi-nightly - timing_exit integrity_lvol_scsi_nightly - - timing_enter integrity_lvol_blk_nightly - run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-blk-nightly - timing_exit integrity_lvol_blk_nightly - - # timing_enter readonly - # run_test suite ./test/vhost/spdk_vhost.sh --readonly - # timing_exit readonly - fi - - if [ $RUN_NIGHTLY_FAILING -eq 1 ]; then - timing_enter vhost_migration - run_test suite ./test/vhost/spdk_vhost.sh --migration - timing_exit vhost_migration - fi - - timing_enter integrity_lvol_scsi - run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi - timing_exit integrity_lvol_scsi - - timing_enter integrity_lvol_blk - run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-blk - timing_exit integrity_lvol_blk - - timing_enter spdk_cli - run_test suite ./test/spdkcli/vhost.sh - timing_exit spdk_cli - - timing_exit vhost + run_test suite ./test/vhost/vhost.sh + report_test_completion "vhost" fi if [ $SPDK_TEST_LVOL -eq 1 ]; then diff --git a/test/vhost/vhost.sh b/test/vhost/vhost.sh new file mode 100755 index 0000000000..1ebea18069 --- /dev/null +++ b/test/vhost/vhost.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +testdir=$(readlink -f $(dirname $0)) +rootdir=$(readlink -f $testdir/../..) +source $rootdir/test/common/autotest_common.sh + +timing_enter vhost +timing_enter negative +run_test suite ./test/vhost/spdk_vhost.sh --negative +timing_exit negative + +timing_enter vhost_json_config +run_test suite ./test/vhost/json_config/json_config.sh +timing_exit vhost_json_config + +timing_enter vhost_boot +run_test suite ./test/vhost/spdk_vhost.sh --boot +timing_exit vhost_boot + +if [ $RUN_NIGHTLY -eq 1 ]; then + timing_enter integrity_blk + run_test suite ./test/vhost/spdk_vhost.sh --integrity-blk + timing_exit integrity_blk + + timing_enter integrity + run_test suite ./test/vhost/spdk_vhost.sh --integrity + timing_exit integrity + + timing_enter fs_integrity_scsi + run_test suite ./test/vhost/spdk_vhost.sh --fs-integrity-scsi + timing_exit fs_integrity_scsi + + timing_enter fs_integrity_blk + run_test suite ./test/vhost/spdk_vhost.sh --fs-integrity-blk + timing_exit fs_integrity_blk + + timing_enter integrity_lvol_scsi_nightly + run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi-nightly + timing_exit integrity_lvol_scsi_nightly + + timing_enter integrity_lvol_blk_nightly + run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-blk-nightly + timing_exit integrity_lvol_blk_nightly + + # timing_enter readonly + # run_test suite ./test/vhost/spdk_vhost.sh --readonly + # timing_exit readonly +fi + +timing_enter integrity_lvol_scsi +run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi +timing_exit integrity_lvol_scsi + +timing_enter integrity_lvol_blk +run_test suite ./test/vhost/spdk_vhost.sh --integrity-lvol-blk +timing_exit integrity_lvol_blk + +timing_enter spdk_cli +run_test suite ./test/spdkcli/vhost.sh +timing_exit spdk_cli + +timing_exit vhost