From 1aa72efad39bee1017d85e137c4bc0ba21914738 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Thu, 21 Oct 2021 11:40:42 +0200 Subject: [PATCH] scripts: exit from tests when no qat card Also moved qat_setup.sh to functional tests fixes: GH#2203 Signed-off-by: Maciej Wawryk Change-Id: Iab69b192a29013a69f4cc4a251a34dcc6fbf6b7d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9952 Reviewed-by: Michal Berger Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI --- autotest.sh | 15 +++++++-------- scripts/qat_setup.sh | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/autotest.sh b/autotest.sh index 27ecbf215a..674d1b67ad 100755 --- a/autotest.sh +++ b/autotest.sh @@ -148,14 +148,6 @@ timing_enter afterboot ./scripts/setup.sh timing_exit afterboot -if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then - if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then - ./scripts/qat_setup.sh igb_uio - else - ./scripts/qat_setup.sh - fi -fi - # Revert existing OPAL to factory settings that may have been left from earlier failed tests. # This ensures we won't hit any unexpected failures due to NVMe SSDs being locked. opal_revert_cleanup @@ -170,6 +162,13 @@ if [ $SPDK_TEST_UNITTEST -eq 1 ]; then fi if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then + if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then + if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then + ./scripts/qat_setup.sh igb_uio + else + ./scripts/qat_setup.sh + fi + fi timing_enter lib run_test "rpc" test/rpc/rpc.sh diff --git a/scripts/qat_setup.sh b/scripts/qat_setup.sh index 3040bbbe2c..fa3aa4b492 100755 --- a/scripts/qat_setup.sh +++ b/scripts/qat_setup.sh @@ -61,7 +61,7 @@ num_vfs=16 qat_pci_bdfs=($(lspci -Dd:37c8 | awk '{print $1}')) if [ ${#qat_pci_bdfs[@]} -eq 0 ]; then echo "No QAT devices found. Exiting" - exit 0 + exit 1 fi if [ -n "$1" ]; then