3 # convert ext2/3/4 images to btrfs images, and make sure the results are
10 SCRIPT_DIR=$(dirname $(readlink -f $0))
11 TOP=$(readlink -f $SCRIPT_DIR/../)
12 TEST_DEV=${TEST_DEV:-}
13 RESULTS="$TOP/tests/convert-tests-results.txt"
14 IMAGE="$TOP/tests/test.img"
16 source $TOP/tests/common
17 source $TOP/tests/common.convert
19 # Allow child test to use $TOP and $RESULTS
30 echo " [TEST/conv] $testname"
32 echo "=== Entering $testname" >> $RESULTS
33 if [ -x test.sh ]; then
34 # Difference convert test case needs different tools to restore
35 # and check image, so only support custom test scripts
38 _fail "test failed for case $(basename $testname)"
41 _fail "custom test script not found"
46 for i in $(find $TOP/tests/convert-tests -maxdepth 1 -mindepth 1 -type d \
47 ${TEST:+-name "$TEST"} | sort)