summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-06-22 11:30:24 +0200
committerDavid Sterba <dsterba@suse.com>2016-06-22 11:30:24 +0200
commit329ff544a4ce36c9f9910402646f4d286696d3e4 (patch)
tree7ebbcf98a68e0d91668eaeb2d547d4bb2304b7bb /tests
parentf20f2278772d97b16a65827dbc21c3f9ce3cc1a3 (diff)
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>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/convert-tests.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh
index 064540f1..0e025f99 100755
--- a/tests/convert-tests.sh
+++ b/tests/convert-tests.sh
@@ -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"