3 # convert ext2/3/4 images to btrfs images, and make sure the results are
7 SCRIPT_DIR=$(dirname $(readlink -f "$0"))
8 TOP=$(readlink -f "$SCRIPT_DIR/../")
10 RESULTS="$TOP/tests/convert-tests-results.txt"
11 IMAGE="$TOP/tests/test.img"
13 source "$TOP/tests/common"
14 source "$TOP/tests/common.convert"
25 # anything expected by common.convert
26 check_global_prereq getfacl
27 check_global_prereq setfacl
28 check_global_prereq md5sum
35 testname=$(basename "$testdir")
36 echo " [TEST/conv] $testname"
38 echo "=== Entering $testname" >> "$RESULTS"
39 if [ -x test.sh ]; then
40 # Only support custom test scripts
43 if [[ $TEST_LOG =~ dump ]]; then
44 # the logs can be large and may exceed the
45 # limits, use 4MB for now
46 tail -c 3900000 "$RESULTS"
48 _fail "test failed for case $testname"
51 _fail "custom test script not found"
56 for i in $(find "$TOP/tests/convert-tests" -maxdepth 1 -mindepth 1 -type d \
57 ${TEST:+-name "$TEST"} | sort)