Commit f1acfee3 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

test: make unittest.sh work from any directory



test/unit/unittest.sh would normally have to be invoked from the root of
the SPDK repository; tweak it slightly so that it can be executed from
any working directory (e.g. within test/unit).

Change-Id: I8fdbb7c0d618e2bb1490236212e54cbd43cccf6f
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/418217


Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 025997a0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $(dirname $0)/../..)

cd "$rootdir"

# if ASAN is enabled, use it.  If not use valgrind if installed but allow
# the env variable to override the default shown below.
if [ -z ${valgrind+x} ]; then
@@ -148,7 +150,7 @@ echo "====================="
echo "All unit tests passed"
echo "====================="
if [ "$cov_avail" = "yes" ]; then
	echo "Note: coverage report is here: ./$UT_COVERAGE"
	echo "Note: coverage report is here: $rootdir/$UT_COVERAGE"
else
	echo "WARN: lcov not installed or SPDK built without coverage!"
fi