nvme: run unit tests under Valgrind if available

Change-Id: Iad8403903d420418692793d9940e33e2d3772e6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-10-05 10:54:32 -07:00
parent 1c96eff6a2
commit 8780063f2c
3 changed files with 14 additions and 5 deletions

View File

@ -8,6 +8,8 @@ out=$PWD
MAKEFLAGS=${MAKEFLAGS:--j16}
DPDK_DIR=/usr/local/dpdk-2.1.0/x86_64-native-linuxapp-gcc
umask 022
cd $src
./scripts/check_format.sh

View File

@ -7,6 +7,13 @@ else
output_dir=$rootdir/../output
fi
if hash valgrind &> /dev/null; then
# TODO: add --error-exitcode=2 when all Valgrind warnings are fixed
valgrind='valgrind --leak-check=full'
else
valgrind=''
fi
function timing() {
direction="$1"
testname="$2"

View File

@ -4,11 +4,11 @@ testdir=$(readlink -f $(dirname $0))
rootdir="$testdir/../../.."
source $rootdir/scripts/autotest_common.sh
$testdir/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut
$testdir/unit/nvme_c/nvme_ut
$testdir/unit/nvme_qpair_c/nvme_qpair_ut
$testdir/unit/nvme_ctrlr_c/nvme_ctrlr_ut
$testdir/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut
$valgrind $testdir/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut
$valgrind $testdir/unit/nvme_c/nvme_ut
$valgrind $testdir/unit/nvme_qpair_c/nvme_qpair_ut
$valgrind $testdir/unit/nvme_ctrlr_c/nvme_ctrlr_ut
$valgrind $testdir/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut
$testdir/aer/aer
process_core