summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-21 15:32:38 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-21 15:32:38 +0000
commit8634c79096f14b787713b175956566e8d379ec9f (patch)
treeac83e065c5e4eea5dc06734b6930caf56e07a6c7 /test
parent04963a419540b2b18fc5a92e4440f3f887603c5b (diff)
Fix tar commands to work on OpenBSD.
BSD tar seems to not like additional options after the first block.
Diffstat (limited to 'test')
-rw-r--r--test/bbackupd/testbbackupd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 20eed16d..f84625ce 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -337,16 +337,16 @@ bool unpack_files(const std::string& archive_file,
<< ": " << archive_file);
#ifdef WIN32
- std::string cmd("tar xz ");
+ std::string cmd("tar xz");
cmd += tar_options + " -f testfiles/" + archive_file + ".tgz " +
"-C " + destination_dir;
#else
std::string cmd("gzip -d < testfiles/");
- cmd += archive_file + ".tgz | ( cd " + destination_dir + " && tar xf - " +
- tar_options + ")";
+ cmd += archive_file + ".tgz | ( cd " + destination_dir + " && tar xf" +
+ tar_options + " -)";
#endif
- TEST_THAT_OR(::system(cmd.c_str()) == 0, return false);
+ TEST_LINE_OR(::system(cmd.c_str()) == 0, cmd, return false);
return true;
}
@@ -3682,7 +3682,7 @@ bool test_sync_new_files()
{
// Add some more files and modify others
// Use the m flag this time so they have a recent modification time
- TEST_THAT(unpack_files("test3", "testfiles", "-m"));
+ TEST_THAT(unpack_files("test3", "testfiles", "m"));
// Wait and test
bbackupd.RunSyncNow();