throw;
}
#if wxDEBUG_LEVEL
- catch ( TestAssertFailure& e )
+ catch ( TestAssertFailure& )
{
msg = s_lastAssertMessage;
s_lastAssertMessage.clear();
return online;
}
+extern bool IsAutomaticTest()
+{
+ static int s_isAutomatic = -1;
+ if ( s_isAutomatic == -1 )
+ {
+ // Allow setting an environment variable to emulate buildslave user for
+ // testing.
+ wxString username;
+ if ( !wxGetEnv("WX_TEST_USER", &username) )
+ username = wxGetUserId();
+
+ s_isAutomatic = username.Lower().Matches("buildslave*");
+ }
+
+ return s_isAutomatic == 1;
+}
+
// helper of OnRun(): gets the test with the given name, returning NULL (and
// not an empty test suite) if there is no such test
static Test *GetTestByName(const wxString& name)
#endif
<< "build: " << WX_BUILD_OPTIONS_SIGNATURE << std::endl;
+ if ( m_detail )
+ {
+ // Output some important information about the test environment.
+ cout << "Running under " << wxGetOsDescription() << ", "
+ "locale is " << setlocale(LC_ALL, NULL) << std::endl;
+ }
+
#if wxUSE_GUI
// create a hidden parent window to be used as parent for the GUI controls
wxTestableFrame* frame = new wxTestableFrame();