From a8b1d58edb2e59d6dd90b528cb6e142ce127458f Mon Sep 17 00:00:00 2001 From: Aurélien Aptel Date: Tue, 2 Jul 2013 23:20:53 +0200 Subject: test_smbclient_tarmode.pl: add a clean option to erase the local path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Aptel Reviewed-by: David Disseldorp Reviewed-by: Jim McDonough --- source3/script/tests/test_smbclient_tarmode.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/script') diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl index 89280569973..ea65041c7f4 100755 --- a/source3/script/tests/test_smbclient_tarmode.pl +++ b/source3/script/tests/test_smbclient_tarmode.pl @@ -57,6 +57,7 @@ our @SMBARGS = (); our $DEBUG = 0; our $MAN = 0; our $HELP = 0; +our $CLEAN = 0; =head1 SYNOPSIS @@ -102,6 +103,7 @@ GetOptions('u|user=s' => \$USER, 'test=i' => \$SINGLE_TEST, + 'clean' => \$CLEAN, 'debug' => \$DEBUG, 'h|help' => \$HELP, 'man' => \$MAN) or pod2usage(2); @@ -127,6 +129,11 @@ push @SMBARGS, @ARGV; # path to store the downloaded tarball my $TAR = "$TMP/tarmode.tar"; +if($CLEAN) { + # clean the whole root first + remove_tree($LOCALPATH, { keep_root => 1 }); +} + ##### # RUN TESTS -- cgit