TestSuite: Renamed the 'verbose' command line option to 'timings'.
This is to better reflect what the option does. The -v or --verbose options are now called -t or --timings respectively.
This commit is contained in:
parent
aee367e8c2
commit
f9f201b830
4 changed files with 15 additions and 15 deletions
|
@ -59,8 +59,8 @@ void fgTestListener::endTest(CppUnit::Test *test)
|
||||||
else
|
else
|
||||||
cerr << '.';
|
cerr << '.';
|
||||||
|
|
||||||
// Verbose output.
|
// Timing output.
|
||||||
if (verbose || ctest_output || debug) {
|
if (timings || ctest_output || debug) {
|
||||||
// Test timing.
|
// Test timing.
|
||||||
float time = ((float)(clock()-m_time))/CLOCKS_PER_SEC;
|
float time = ((float)(clock()-m_time))/CLOCKS_PER_SEC;
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
|
|
|
@ -84,7 +84,7 @@ protected:
|
||||||
std::vector<TestIOCapt> io_capt;
|
std::vector<TestIOCapt> io_capt;
|
||||||
|
|
||||||
// Output settings.
|
// Output settings.
|
||||||
bool verbose;
|
bool timings;
|
||||||
bool ctest_output;
|
bool ctest_output;
|
||||||
bool debug;
|
bool debug;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
// Execute all test suites for the given test category.
|
// Execute all test suites for the given test category.
|
||||||
int testRunner(const std::string& type, const std::string& title, char *subset, bool verbose, bool ctest_output, bool debug)
|
int testRunner(const std::string& type, const std::string& title, char *subset, bool timings, bool ctest_output, bool debug)
|
||||||
{
|
{
|
||||||
// Declarations.
|
// Declarations.
|
||||||
CppUnit::TextTestRunner runner;
|
CppUnit::TextTestRunner runner;
|
||||||
|
@ -45,7 +45,7 @@ int testRunner(const std::string& type, const std::string& title, char *subset,
|
||||||
fgTestListener *testListener;
|
fgTestListener *testListener;
|
||||||
testListener = new fgTestListener;
|
testListener = new fgTestListener;
|
||||||
runner.eventManager().addListener(testListener);
|
runner.eventManager().addListener(testListener);
|
||||||
testListener->verbose = verbose;
|
testListener->timings = timings;
|
||||||
testListener->ctest_output = ctest_output;
|
testListener->ctest_output = ctest_output;
|
||||||
testListener->debug = debug;
|
testListener->debug = debug;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ int main(int argc, char **argv)
|
||||||
int status_gui=-1, status_simgear=-1, status_system=-1, status_unit=-1, status_fgdata=-1;
|
int status_gui=-1, status_simgear=-1, status_system=-1, status_unit=-1, status_fgdata=-1;
|
||||||
bool run_system=false, run_unit=false, run_gui=false, run_simgear=false, run_fgdata=false;
|
bool run_system=false, run_unit=false, run_gui=false, run_simgear=false, run_fgdata=false;
|
||||||
bool logSplit=false;
|
bool logSplit=false;
|
||||||
bool verbose=false, ctest_output=false, debug=false, printSummary=true, help=false;
|
bool timings=false, ctest_output=false, debug=false, printSummary=true, help=false;
|
||||||
char *subset_system=NULL, *subset_unit=NULL, *subset_gui=NULL, *subset_simgear=NULL, *subset_fgdata=NULL;
|
char *subset_system=NULL, *subset_unit=NULL, *subset_gui=NULL, *subset_simgear=NULL, *subset_fgdata=NULL;
|
||||||
char firstchar;
|
char firstchar;
|
||||||
std::string arg, delim, fgRoot, logClassVal, logClassItem, logLevel, val;
|
std::string arg, delim, fgRoot, logClassVal, logClassItem, logLevel, val;
|
||||||
|
@ -261,9 +261,9 @@ int main(int argc, char **argv)
|
||||||
} else if (arg == "--log-split") {
|
} else if (arg == "--log-split") {
|
||||||
logSplit = true;
|
logSplit = true;
|
||||||
|
|
||||||
// Verbose output.
|
// Timing output.
|
||||||
} else if (arg == "-v" || arg == "--verbose") {
|
} else if (arg == "-t" || arg == "--timings") {
|
||||||
verbose = true;
|
timings = true;
|
||||||
|
|
||||||
// CTest suitable output.
|
// CTest suitable output.
|
||||||
} else if (arg == "-c" || arg == "--ctest") {
|
} else if (arg == "-c" || arg == "--ctest") {
|
||||||
|
@ -322,7 +322,7 @@ int main(int argc, char **argv)
|
||||||
std::cout << " sequentially" << std::endl;
|
std::cout << " sequentially" << std::endl;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::cout << " Verbosity options:" << std::endl;
|
std::cout << " Verbosity options:" << std::endl;
|
||||||
std::cout << " -v, --verbose verbose output including names and timings for all" << std::endl;
|
std::cout << " -t, --timings verbose output including names and timings for all" << std::endl;
|
||||||
std::cout << " tests." << std::endl;
|
std::cout << " tests." << std::endl;
|
||||||
std::cout << " -c, --ctest simplified output suitable for running via CTest." << std::endl;
|
std::cout << " -c, --ctest simplified output suitable for running via CTest." << std::endl;
|
||||||
std::cout << " -d, --debug disable IO capture for debugging (super verbose output)." << std::endl;
|
std::cout << " -d, --debug disable IO capture for debugging (super verbose output)." << std::endl;
|
||||||
|
@ -358,15 +358,15 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
// Execute each of the test suite categories.
|
// Execute each of the test suite categories.
|
||||||
if (run_system)
|
if (run_system)
|
||||||
status_system = testRunner("System tests", "System / functional tests", subset_system, verbose, ctest_output, debug);
|
status_system = testRunner("System tests", "System / functional tests", subset_system, timings, ctest_output, debug);
|
||||||
if (run_unit)
|
if (run_unit)
|
||||||
status_unit = testRunner("Unit tests", "Unit tests", subset_unit, verbose, ctest_output, debug);
|
status_unit = testRunner("Unit tests", "Unit tests", subset_unit, timings, ctest_output, debug);
|
||||||
if (run_gui && 0) // Disabled as there are no GUI tests yet.
|
if (run_gui && 0) // Disabled as there are no GUI tests yet.
|
||||||
status_gui = testRunner("GUI tests", "GUI tests", subset_gui, verbose, ctest_output, debug);
|
status_gui = testRunner("GUI tests", "GUI tests", subset_gui, timings, ctest_output, debug);
|
||||||
if (run_simgear)
|
if (run_simgear)
|
||||||
status_simgear = testRunner("Simgear unit tests", "Simgear unit tests", subset_simgear, verbose, ctest_output, debug);
|
status_simgear = testRunner("Simgear unit tests", "Simgear unit tests", subset_simgear, timings, ctest_output, debug);
|
||||||
if (run_fgdata)
|
if (run_fgdata)
|
||||||
status_fgdata = testRunner("FGData tests", "FGData tests", subset_fgdata, verbose, ctest_output, debug);
|
status_fgdata = testRunner("FGData tests", "FGData tests", subset_fgdata, timings, ctest_output, debug);
|
||||||
|
|
||||||
// Summary printout.
|
// Summary printout.
|
||||||
if (printSummary && !ctest_output)
|
if (printSummary && !ctest_output)
|
||||||
|
|
Loading…
Reference in a new issue