summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-21 11:36:57 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-21 11:36:57 +0000
commit262688916c54014e03331985ed41fd840dfc8851 (patch)
tree77ffa4f37ba0123d795fef22d11fa6be5b724738 /test/bbackupd
parent2c0a1804229dacc22eb1aa65c6b18080dbbedfb7 (diff)
Work around lack of pipe support in Win32 system() command (refs #3)
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 17c48d45..742a11dd 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -757,8 +757,15 @@ int test_bbackupd()
// unpack the files for the initial test
TEST_THAT(::system("rm -rf testfiles/TestDir1") == 0);
- TEST_THAT(::system("mkdir testfiles/TestDir1") == 0);
- TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz | ( cd testfiles/TestDir1 && tar xf - )") == 0);
+ TEST_THAT(::mkdir("testfiles/TestDir1", 0) == 0);
+
+ #ifdef WIN32
+ TEST_THAT(::system("tar xzvf testfiles/spacetest1.tgz "
+ "-C testfiles/TestDir1") == 0);
+ #else
+ TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz "
+ "| ( cd testfiles/TestDir1 && tar xf - )") == 0);
+ #endif
#ifdef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
printf("Skipping intercept-based KeepAlive tests on this platform.\n");