[Box Backup-commit] COMMIT r3471 - box/trunk/test/bbackupd
subversion at boxbackup.org
subversion at boxbackup.org
Sun Dec 21 15:32:38 GMT 2014
Author: chris
Date: 2014-12-21 15:32:38 +0000 (Sun, 21 Dec 2014)
New Revision: 3471
Modified:
box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Fix tar commands to work on OpenBSD.
BSD tar seems to not like additional options after the first block.
Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-21 13:44:26 UTC (rev 3470)
+++ box/trunk/test/bbackupd/testbbackupd.cpp 2014-12-21 15:32:38 UTC (rev 3471)
@@ -337,16 +337,16 @@
<< ": " << 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 @@
{
// 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();
More information about the Boxbackup-commit
mailing list