aboutsummaryrefslogtreecommitdiffstats
path: root/tests/clean-tests.sh
blob: 7f18e6f07d4e40fe56f6c1d3cc4f8ae12bd9bc06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# remove all intermediate files from tests

SCRIPT_DIR=$(dirname $(readlink -f $0))
TOP=$(readlink -f $SCRIPT_DIR/../)
source $TOP/tests/common

setup_root_helper

if [ "$BUILD_VERBOSE" = 1 ]; then
	verbose=-print
fi

$SUDO_HELPER umount "$TEST_MNT" &>/dev/null

if ! cd $TOP/tests; then
	echo "ERROR: cannot cd to $TOP/tests"
	exit 1
fi

find fsck-tests -type f -name '*.restored' $verbose -delete

# do not remove, the file could have special permissions set
echo -n > test.img