summaryrefslogtreecommitdiffstats
path: root/source3/script
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2013-07-02 23:20:53 +0200
committerJim McDonough <jmcd@samba.org>2013-11-05 08:42:41 -0500
commita8b1d58edb2e59d6dd90b528cb6e142ce127458f (patch)
tree96aee4c7698a092c67fff8534950edb3d0ff79f3 /source3/script
parentea04ae30e12ef13b7fe49db7975e042095184321 (diff)
downloadsamba-a8b1d58edb2e59d6dd90b528cb6e142ce127458f.tar.gz
samba-a8b1d58edb2e59d6dd90b528cb6e142ce127458f.tar.xz
samba-a8b1d58edb2e59d6dd90b528cb6e142ce127458f.zip
test_smbclient_tarmode.pl: add a clean option to erase the local path
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_smbclient_tarmode.pl7
1 files changed, 7 insertions, 0 deletions
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