core: skip results checking when introspecting the command line
This commit is contained in:
committed by
Gabriel Ferreira
parent
bf0708e61f
commit
e1e07f2ffd
@@ -25,7 +25,8 @@
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <cstdlib> // itoa(), system ()
|
||||
#include <cstdlib> // itoa(), system (), getenv ()
|
||||
#include <cstring>
|
||||
|
||||
/**
|
||||
* \file
|
||||
@@ -122,6 +123,13 @@ ExampleAsTestCase::DoRun (void)
|
||||
// Make sure the example didn't outright crash
|
||||
NS_TEST_ASSERT_MSG_EQ (status, 0, "example " + m_program + " failed");
|
||||
|
||||
// Check that we're not just introspecting the command-line
|
||||
const char * envVar = std::getenv ("NS_COMMANDLINE_INTROSPECTION");
|
||||
if (envVar != 0 && std::strlen (envVar) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Compare the testFile to the reference file
|
||||
NS_ASCII_TEST_EXPECT_EQ (testFile, refFile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user