diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-02 23:20:53 +0200 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2013-11-05 08:42:41 -0500 |
commit | a8b1d58edb2e59d6dd90b528cb6e142ce127458f (patch) | |
tree | 96aee4c7698a092c67fff8534950edb3d0ff79f3 | |
parent | ea04ae30e12ef13b7fe49db7975e042095184321 (diff) | |
download | samba-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>
-rwxr-xr-x | source3/script/tests/test_smbclient_tarmode.pl | 7 |
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 |