From b51cc1d32555082d02a68d946cbbed0983f82270 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 25 May 2015 16:08:46 +0200 Subject: btrfs-progs: tests: add script to clean intermediate images Signed-off-by: David Sterba --- tests/clean-tests.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tests/clean-tests.sh (limited to 'tests/clean-tests.sh') diff --git a/tests/clean-tests.sh b/tests/clean-tests.sh new file mode 100755 index 00000000..c1dc56af --- /dev/null +++ b/tests/clean-tests.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# remove all intermediate files from tests + +if [ "$BUILD_VERBOSE" = 1 ]; then + verbose=-print +fi + +SCRIPT_DIR=$(dirname $(readlink -f $0)) +TOP=$(readlink -f $SCRIPT_DIR/../) + +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 -- cgit v1.2.3