Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] placement_new test failure under VC++8
From: Brad King (brad.king_at_[hidden])
Date: 2009-05-18 10:52:15


Doug Gregor wrote:
> That's very bad; CTest should be disabling this dialog, because this
> is going to happen often. Unless our tests are doing something to
> re-enable the dialog?

We usually use _CrtSetReportHook:

   http://msdn.microsoft.com/en-us/library/0yysf5e6(VS.80).aspx

in our tests to disable these when running from a dashboard build:

   if(getenv("DASHBOARD_TEST_FROM_CTEST"))
     {
     _CrtSetReportHook(MyReport);
     }

where MyReport is something like

   static int MyReport(int, char* message, int*)
   {
     fprintf(stderr, "%s", message);
     fflush(stderr);
     return 1; // no further reporting required
   }

CTest sets the "DASHBOARD_TEST_FROM_CTEST" environment variable
when running tests. With this approach you can keep /RTC1 for
interactive debugging but avoid the dialog during automated builds.

-Brad


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk