2 # remove all intermediate files from tests
5 SCRIPT_DIR
=$
(dirname $
(readlink
-f "$0"))
7 TOP
=$
(readlink
-f "$SCRIPT_DIR/../")
8 if [ -f "$TOP/configure.ac" ]; then
10 TEST_TOP
="$TOP/tests/"
13 # external, defaults to system binaries
14 TOP
=$
(dirname `which btrfs`)
15 TEST_TOP
="$SCRIPT_DIR"
16 INTERNAL_BIN
="$TEST_TOP"
19 # assume external, TOP set from commandline
20 TEST_TOP
="$SCRIPT_DIR"
21 INTERNAL_BIN
="$TEST_TOP"
23 if ! [ -x "$TOP/btrfs" ]; then
24 echo "ERROR: cannot execute btrfs from TOP=$TOP"
27 TEST_DEV
=${TEST_DEV:-}
28 RESULTS
="$TEST_TOP/cli-tests-results.txt"
29 IMAGE
="$TEST_TOP/test.img"
31 source "$TEST_TOP/common"
35 if [ "$BUILD_VERBOSE" = 1 ]; then
39 $SUDO_HELPER umount
"$TEST_MNT" &>/dev
/null
41 if ! cd "$TEST_TOP"; then
42 echo "ERROR: cannot cd to $TEST_TOP"
46 find fsck-tests
-type f
-name '*.restored' $verbose -delete
48 # do not remove, the file could have special permissions set