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 RESULTS="$TOP/tests/convert-tests-results.txt"
14 source $TOP/tests/common
15 source $TOP/tests/common.convert
17 # Allow child test to use $TOP and $RESULTS
31 echo " [TEST/conv] $testname"
33 echo "=== Entering $testname" >> $RESULTS
34 if [ -x test.sh ]; then
35 # Difference convert test case needs different tools to restore
36 # and check image, so only support custom test scripts
39 _fail "test failed for case $(basename $testname)"
42 _fail "custom test script not found"
46 if ! [ -z "$TEST" ]; then
47 echo " [TEST/conv] skipped all convert tests, TEST=$TEST"
51 for feature in '' 'extref' 'skinny-metadata' 'no-holes'; do
56 for i in $(find $TOP/tests/convert-tests -maxdepth 1 -mindepth 1 -type d \
57 ${TEST:+-name "$TEST"} | sort)