summaryrefslogtreecommitdiff
path: root/runtest.pl.in
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-17 23:08:42 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-17 23:08:42 +0000
commitcb8a7466e6b8c75fdc957fab380b9d074d0f7ede (patch)
tree3dc7696709adb1f21500e53315e38ca6767f81cf /runtest.pl.in
parent1a91d5f642d6cbbca871cae63ef6b3b1caef068d (diff)
Add support for rmdir lines in testextra.
Fixes test/backupdiff.
Diffstat (limited to 'runtest.pl.in')
-rwxr-xr-xruntest.pl.in13
1 files changed, 12 insertions, 1 deletions
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 (<EXTRA>)
{
+ 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";
}
}
}