diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-12-20 17:58:41 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-12-20 18:12:44 +0000 |
commit | d18f1a336d8cf1760aaafb95cec6bbf43a7d637e (patch) | |
tree | 5bc1d9c1eed2b8b5c16f7cd0acf3f0d3c65e3e5c | |
parent | ca50ccf991031c8d96b725a7cf210009f2cf4f8b (diff) |
Use rd instead of rmdir command, to try to work properly in appveyor.
I think something is on the PATH in Appveyor that makes rmdir /s/q fail,
especially when run through Perl.
-rw-r--r-- | lib/common/Test.cpp | 2 | ||||
-rwxr-xr-x | runtest.pl.in | 4 | ||||
-rw-r--r-- | test/backupstorefix/testbackupstorefix.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/common/Test.cpp b/lib/common/Test.cpp index df2c3bc6..f7eeb310 100644 --- a/lib/common/Test.cpp +++ b/lib/common/Test.cpp @@ -117,7 +117,7 @@ bool setUp(const char* function_name) } else if(filetype == ObjectExists_Dir) { - std::string cmd = "rmdir /s /q testfiles\\" + filename; + std::string cmd = "rd /s /q testfiles\\" + filename; int status = system(cmd.c_str()); if(status != 0) { diff --git a/runtest.pl.in b/runtest.pl.in index 5b8b4bbe..775b13ac 100755 --- a/runtest.pl.in +++ b/runtest.pl.in @@ -129,7 +129,7 @@ sub runtest if(-d $test_dst_dir) { - unshift @commands, "rmdir /s /q $test_dst_dir"; + unshift @commands, "rd /s /q $test_dst_dir"; } foreach my $command (@commands) @@ -159,7 +159,7 @@ sub runtest { if(-d "$test_dst_dir\\$1") { - my $cmd = "rmdir /s/q $test_dst_dir\\$1"; + my $cmd = "rd /s/q $test_dst_dir\\$1"; my $status = system($cmd); $status == 0 or die "$cmd: failed with ". "status $status"; diff --git a/test/backupstorefix/testbackupstorefix.cpp b/test/backupstorefix/testbackupstorefix.cpp index e92be1bd..b00862e1 100644 --- a/test/backupstorefix/testbackupstorefix.cpp +++ b/test/backupstorefix/testbackupstorefix.cpp @@ -720,7 +720,7 @@ int test(int argc, const char *argv[]) # define RUN(x) TEST_THAT(system(x) == 0); # ifdef WIN32 - RUN("rmdir /s/q testfiles\\0_2\\backup\\01234567\\02\\01"); + RUN("rd /s/q testfiles\\0_2\\backup\\01234567\\02\\01"); # else // !WIN32 RUN("rm -r testfiles/0_2/backup/01234567/02/01"); # endif // WIN32 |