From 69b7133df32f931240bfdaedc0cce5e3842ebbe3 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 27 Jun 2008 19:47:58 -0400 Subject: [PATCH] Fix problem with running wvlog.t.cc on win32. --- streams/t/wvlog.t.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/streams/t/wvlog.t.cc b/streams/t/wvlog.t.cc index 22613f80..40f2e9bb 100644 --- a/streams/t/wvlog.t.cc +++ b/streams/t/wvlog.t.cc @@ -159,16 +159,27 @@ WVTEST_MAIN("Recursion avoidance") WvString noise("Recursive noise"); WvNoisyLogRcv noisy(noise, dup(1), WvLog::Debug5); + mkdir("/tmp"); WvString logfilename("/tmp/wvlog-recursive-test.%s", getpid()); WvLogFileBase logfile(logfilename, WvLog::Debug5); - + + if (!WVPASS(logfile.isok())) + { + wverr->print("open %s: %s\n", logfilename, logfile.errstr()); + return; + } + WvLog log("Regular log", WvLog::Error); WvString logmsg("The pebble that starts an avalanche..."); log(logmsg); logfile.close(); WvFile file(logfilename, O_RDONLY); - WVPASS(file.isok()); + if (!WVPASS(file.isok())) + { + wverr->print("open %s: %s\n", logfilename, file.errstr()); + return; + } // Test that we received all the log messages we were due WVPASS(strstr(file.getline(), "Too many extra log messages " -- 2.11.4.GIT