From cb8a7466e6b8c75fdc957fab380b9d074d0f7ede Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 17 Dec 2015 23:08:42 +0000 Subject: Add support for rmdir lines in testextra. Fixes test/backupdiff. --- runtest.pl.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'runtest.pl.in') diff --git a/runtest.pl.in b/runtest.pl.in index 7d197d4c..2d6c955f 100755 --- a/runtest.pl.in +++ b/runtest.pl.in @@ -141,15 +141,26 @@ sub runtest or die "$test_src_dir/testextra: $!"; foreach my $line () { + chomp $line; if ($line =~ m/^mkdir (.*)/) { mkdir("$test_dst_dir/$1") or die "$test_dst_dir/$1: $!"; } + elsif ($line =~ m/^rm -rf (.*)/) + { + if(-d "$test_dst_dir\\$1") + { + my $cmd = "rmdir /s/q $test_dst_dir\\$1"; + my $status = system($cmd); + $status == 0 or die "$cmd: failed with ". + "status $status"; + } + } else { die "Unsupported command in ". - "$test_src_dir/testextra: $!"; + "$test_src_dir/testextra: $line"; } } } -- cgit v1.2.3