[Box Backup-commit] COMMIT r3514 - box/trunk/test/bbackupd
subversion at boxbackup.org
subversion at boxbackup.org
Fri Jan 2 20:13:33 GMT 2015
Author: chris
Date: 2015-01-02 20:13:33 +0000 (Fri, 02 Jan 2015)
New Revision: 3514
Modified:
box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Fix test failing on OpenBSD because tar -m behaves differently.
Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp 2015-01-02 19:18:19 UTC (rev 3513)
+++ box/trunk/test/bbackupd/testbbackupd.cpp 2015-01-02 20:13:33 UTC (rev 3514)
@@ -3708,11 +3708,17 @@
// TODO FIXME dedent
{
- // Add some more files and modify others
- // Use the m flag this time so they have a recent modification time
+ // 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"));
+
+ // OpenBSD's tar interprets the "-m" option quite differently:
+ // it sets the time to epoch zero (1 Jan 1970) instead of the
+ // current time, which doesn't help us. So reset the timestamp
+ // on a file with the touch command, so it won't be backed up.
+ TEST_RETURN(::system("touch testfiles/TestDir1/chsh"), 0);
- // Wait and test
+ // At least one file is too new to be backed up on the first run.
bbackupd.RunSyncNow();
TEST_COMPARE(Compare_Different);
More information about the Boxbackup-commit
mailing list