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: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/418217 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
025997a0b2
commit
f1acfee360
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user