diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-01 08:00:04 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-01 08:00:04 +0000 |
commit | 51b47019e88e86de7bc8636f134664e05296b68a (patch) | |
tree | 689d6e9f94d395faf71140cb265e115134d4ec8d /test/backupdiff | |
parent | 66e7ea3352c7025bd171a87c714cc6f7d45d271a (diff) |
(refs #3)
This test takes a long time on Win32 (slow file access? VMware?), so:
* Disable verbose debug logging, which makes it even slower
* Print a warning before the slow test starts
* Increase timeout
Diffstat (limited to 'test/backupdiff')
-rw-r--r-- | test/backupdiff/testbackupdiff.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/backupdiff/testbackupdiff.cpp b/test/backupdiff/testbackupdiff.cpp index c5301d9b..806ede89 100644 --- a/test/backupdiff/testbackupdiff.cpp +++ b/test/backupdiff/testbackupdiff.cpp @@ -369,8 +369,10 @@ int test(int argc, const char *argv[]) { // Want to trace out all the details #ifndef NDEBUG + #ifndef WIN32 BackupStoreFile::TraceDetailsOfDiffProcess = true; #endif + #endif // Create all the test files create_test_files(); @@ -503,8 +505,15 @@ int test(int argc, const char *argv[]) // suck up lots of processor time -- because of lots of matches // found. Check this out! + #ifdef WIN32 + ::fprintf(stdout, "Testing diffing two large streams, " + "may take a while!\n"); + ::fflush(stdout); + #endif + make_file_of_zeros("testfiles/zero.0", 20*1024*1024); make_file_of_zeros("testfiles/zero.1", 200*1024*1024); + // Generate a first encoded file { BackupStoreFilenameClear f0name("zero.0"); @@ -524,7 +533,14 @@ int test(int argc, const char *argv[]) 2000 /* object ID of the file diffing from */, blockindex, IOStream::TimeOutInfinite, 0, 0)); encoded->CopyStreamTo(out); + + printf("Time taken: %d seconds\n", (int)(time(0) - beginTime)); + + #ifdef WIN32 + TEST_THAT(time(0) < (beginTime + 300)); + #else TEST_THAT(time(0) < (beginTime + 40)); + #endif } // Remove zero-files to save disk space remove("testfiles/zero.0"); |