summaryrefslogtreecommitdiffstats
path: root/source3/script/tests
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2013-07-15 19:01:58 +0200
committerJim McDonough <jmcd@samba.org>2013-11-05 08:42:41 -0500
commit97c34f3e6f2a954a267624c9059de35d74e7c3dc (patch)
treebe30b15f8f71ea0add82727c924aa0b157d66222 /source3/script/tests
parente879580f1cfd73fa62036316485cd30d011b8392 (diff)
downloadsamba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.tar.gz
samba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.tar.xz
samba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.zip
test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)
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/tests')
-rwxr-xr-xsource3/script/tests/test_smbclient_tarmode.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl
index 6d09e1e4689..a2152cc6762 100755
--- a/source3/script/tests/test_smbclient_tarmode.pl
+++ b/source3/script/tests/test_smbclient_tarmode.pl
@@ -26,7 +26,7 @@ C<test_smbclient_tarmode.pl> - Test for smbclient tar backup feature
# x F DONE
# x F r DONE
-use v5.16;
+use v5.14;
use strict;
use warnings;
@@ -36,7 +36,7 @@ use File::Path qw/make_path remove_tree/;
use Getopt::Long;
use Pod::Usage;
use Term::ANSIColor;
-
+use Digest::MD5 qw/md5_hex/;
sub d {print Dumper @_;}
# DEFAULTS
@@ -806,7 +806,12 @@ sub check_tar {
$done{$p}++;
# different file
+
my $md5 = $f->data;
+ if($^V lt v5.16) {
+ $md5 = md5_hex($md5);
+ }
+
if($md5 ne $h{$p}->md5) {
say " ! $p ($md5)";
push @diff, $p;