unittest.sh: verify additional dependencies by configure flags
There were multiple ways to check if particular UT should be executed. This script unifies those. To allow executing unittest.sh as standalone script, verifying config.h flags was chosen. FTL is an exception, as it always compiles if built on Linux. Same condition was kept to execute the UT. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I83b3a58d4574154166af6763e7d1c38d75b8475d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2019 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
9cc9165947
commit
cb7a83f059
@ -158,19 +158,19 @@ fi
|
||||
|
||||
run_test "unittest_include" $valgrind $testdir/include/spdk/histogram_data.h/histogram_ut
|
||||
run_test "unittest_bdev" unittest_bdev
|
||||
if [ $SPDK_TEST_CRYPTO -eq 1 ]; then
|
||||
if grep -q '#define SPDK_CONFIG_CRYPTO 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_bdev_crypto" $valgrind $testdir/lib/bdev/crypto.c/crypto_ut
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_REDUCE -eq 1 ]; then
|
||||
if grep -q '#define SPDK_CONFIG_REDUCE 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_bdev_reduce" $valgrind $testdir/lib/bdev/compress.c/compress_ut
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
||||
if grep -q '#define SPDK_CONFIG_PMDK 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_bdev_pmem" $valgrind $testdir/lib/bdev/pmem/bdev_pmem_ut
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_RAID5 -eq 1 ]; then
|
||||
if grep -q '#define SPDK_CONFIG_RAID5 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_bdev_raid5" $valgrind $testdir/lib/bdev/raid/raid5.c/raid5_ut
|
||||
fi
|
||||
|
||||
@ -195,11 +195,8 @@ if grep -q '#define SPDK_CONFIG_RDMA 1' $rootdir/include/spdk/config.h; then
|
||||
fi
|
||||
|
||||
run_test "unittest_nvmf" unittest_nvmf
|
||||
if [ -e $testdir/lib/nvmf/fc.c/fc_ut ]; then
|
||||
if grep -q '#define SPDK_CONFIG_FC 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_nvmf_fc" $valgrind $testdir/lib/nvmf/fc.c/fc_ut
|
||||
fi
|
||||
|
||||
if [ -e $testdir/lib/nvmf/fc_ls.c/fc_ls_ut ]; then
|
||||
run_test "unittest_nvmf_fc_ls" $valgrind $testdir/lib/nvmf/fc_ls.c/fc_ls_ut
|
||||
fi
|
||||
|
||||
@ -211,7 +208,7 @@ run_test "unittest_scsi" unittest_scsi
|
||||
run_test "unittest_sock" unittest_sock
|
||||
run_test "unittest_thread" $valgrind $testdir/lib/thread/thread.c/thread_ut
|
||||
run_test "unittest_util" unittest_util
|
||||
if [ $(uname -s) = Linux ]; then
|
||||
if grep -q '#define SPDK_CONFIG_VHOST 1' $rootdir/include/spdk/config.h; then
|
||||
run_test "unittest_vhost" $valgrind $testdir/lib/vhost/vhost.c/vhost_ut
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user