--- a/utils/test-runner.cc Thu Apr 15 15:11:49 2010 -0700
+++ b/utils/test-runner.cc Thu Apr 15 16:37:57 2010 -0700
@@ -30,6 +30,8 @@
#include <dirent.h>
#include <string.h>
+extern bool gBreakOnFailure;
+
using namespace ns3;
//
@@ -172,6 +174,8 @@
bool doSuite = false;
bool doKinds = false;
+ gBreakOnFailure = false;
+
bool haveBasedir = false;
bool haveTempdir = false;
bool haveOutfile = false;
@@ -183,10 +187,16 @@
std::string outfileName;
std::string typeName;
+
for (int i = 1; i < argc; ++i)
{
std::string arg(argv[i]);
+ if (arg.find ("--assert") != std::string::npos)
+ {
+ gBreakOnFailure = true;
+ }
+
if (arg.find ("--basedir=") != std::string::npos)
{
basedir = arg.substr (arg.find_first_of ("=") + 1, 9999);
@@ -249,6 +259,7 @@
//
if (doHelp)
{
+ std::cout << " --assert: Tell tests to segfault (like assert) if an error is detected" << std::endl;
std::cout << " --basedir=dir: Set the base directory (where to find src) to \"dir\"" << std::endl;
std::cout << " --tempdir=dir: Set the temporary directory (where to find data files) to \"dir\"" << std::endl;
std::cout << " --constrain=test-type: Constrain checks to test suites of type \"test-type\"" << std::endl;