btrfs-progs: tests: print shorter test name in the output

The full path is printed, we're interested in the last path component
only.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-06-22 11:30:24 +02:00
parent f20f227877
commit 329ff544a4

View File

@ -22,18 +22,19 @@ export TEST_DEV
rm -f $RESULTS
run_one_test() {
local testdir
local testname
testname="$1"
testdir="$1"
testname=$(basename "$testdir")
echo " [TEST/conv] $testname"
cd $testname
cd "$testdir"
echo "=== Entering $testname" >> $RESULTS
if [ -x test.sh ]; then
# Difference convert test case needs different tools to restore
# and check image, so only support custom test scripts
# Only support custom test scripts
./test.sh
if [ $? -ne 0 ]; then
_fail "test failed for case $(basename $testname)"
_fail "test failed for case $testname"
fi
else
_fail "custom test script not found"