fgfs_test_suite: improve the --help output
- The program name is fgfs_test_suite, not run_test_suite. - Add three examples for particularly useful tasks; be explicit about how to discover available test names. - std::endl flushes the stream every time it is used; better use '\n' in most places (more efficient and takes less space on screen). :-)
This commit is contained in:
parent
876330772b
commit
56f60c381f
1 changed files with 59 additions and 51 deletions
|
@ -33,57 +33,65 @@ using namespace std;
|
||||||
|
|
||||||
// The help message.
|
// The help message.
|
||||||
void helpPrintout(std::ostream &stream) {
|
void helpPrintout(std::ostream &stream) {
|
||||||
stream << "Usage: run_test_suite [options]" << std::endl << std::endl;
|
stream << "Usage: fgfs_test_suite [options]\n";
|
||||||
stream << "Options:" << std::endl;
|
stream << '\n';
|
||||||
stream << " -h, --help show this help message and exit." << std::endl;
|
stream << "Options:\n";
|
||||||
stream << std::endl;
|
stream << " -h, --help show this help message and exit.\n";
|
||||||
stream << " Test selection options:" << std::endl;
|
stream << '\n';
|
||||||
stream << " -s, --system-tests execute the system/functional tests." << std::endl;
|
stream << " Test selection options:\n";
|
||||||
stream << " -u, --unit-tests execute the unit tests." << std::endl;
|
stream << " -s, --system-tests execute the system/functional tests.\n";
|
||||||
stream << " -g, --gui-tests execute the GUI tests." << std::endl;
|
stream << " -u, --unit-tests execute the unit tests.\n";
|
||||||
stream << " -m, --simgear-tests execute the simgear tests." << std::endl;
|
stream << " -g, --gui-tests execute the GUI tests.\n";
|
||||||
stream << " -f, --fgdata-tests execute the FGData tests." << std::endl;
|
stream << " -m, --simgear-tests execute the simgear tests.\n";
|
||||||
stream << std::endl;
|
stream << " -f, --fgdata-tests execute the FGData tests.\n";
|
||||||
stream << " The -s, -u, -g, and -m options accept an optional argument to perform a" << std::endl;
|
stream << '\n';
|
||||||
stream << " subset of all tests. This argument should either be the name of a test" << std::endl;
|
stream << " The -s, -u, -g, and -m options accept an optional argument to perform a\n";
|
||||||
stream << " suite, the full name of an individual test, or a comma separated list." << std::endl;
|
stream << " subset of all tests. This argument should either be the name of a test\n";
|
||||||
stream << " E.g. -u DigitalFilterTests\n";
|
stream << " suite, the full name of an individual test, or a comma separated list.\n";
|
||||||
stream << std::endl;
|
stream << '\n';
|
||||||
stream << " Full test names consist of the test suite name, the separator '::' and then" << std::endl;
|
stream << " Full test names consist of the test suite name, the separator '::' and\n";
|
||||||
stream << " the individual test name. The test names can revealed with the verbose" << std::endl;
|
stream << " then the individual test name. The test names can revealed with the -t\n";
|
||||||
stream << " option." << std::endl;
|
stream << " option.\n";
|
||||||
stream << std::endl;
|
stream << '\n';
|
||||||
stream << " Logging options:" << std::endl;
|
stream << " Examples:\n";
|
||||||
stream << " --log-level={bulk,debug,info,warn,alert,popup,dev_warn,dev_alert}" << std::endl;
|
stream << " - perform and print the names of all available unit tests:\n";
|
||||||
stream << " specify the minimum logging level to output" << std::endl;
|
stream << " --> fgfs_test_suite -t -u\n";
|
||||||
stream << " --log-class=[none, terrain, astro, flight, input, gl, view, cockpit," << std::endl;
|
stream << " - run all tests from the NavRadioTests test suite:\n";
|
||||||
stream << " general, math, event, aircraft, autopilot, io, clipper," << std::endl;
|
stream << " --> fgfs_test_suite -u NavRadioTests\n";
|
||||||
stream << " network, atc, nasal, instrumentation, systems, ai, environment," << std::endl;
|
stream << " - run a specific test without discarding its output:\n";
|
||||||
stream << " sound, navaid, gui, terrasync, particles, headless, osg," << std::endl;
|
stream << " --> fgfs_test_suite --no-summary -d -u NavRadioTests::testGS\n";
|
||||||
stream << " undefined, all]" << std::endl;
|
stream << '\n';
|
||||||
stream << " select the logging class(es) to output." << std::endl;
|
stream << " Logging options:\n";
|
||||||
stream << " --log-split output the different non-interleaved log streams" << std::endl;
|
stream << " --log-level={bulk,debug,info,warn,alert,popup,dev_warn,dev_alert}\n";
|
||||||
stream << " sequentially." << std::endl;
|
stream << " specify the minimum logging level to output\n";
|
||||||
stream << std::endl;
|
stream << " --log-class=[none, terrain, astro, flight, input, gl, view, cockpit,\n";
|
||||||
stream << " Verbosity options:" << std::endl;
|
stream << " general, math, event, aircraft, autopilot, io, clipper,\n";
|
||||||
stream << " -t, --timings verbose output including names and timings for all" << std::endl;
|
stream << " network, atc, nasal, instrumentation, systems, ai, environment,\n";
|
||||||
stream << " tests." << std::endl;
|
stream << " sound, navaid, gui, terrasync, particles, headless, osg,\n";
|
||||||
stream << " -c, --ctest simplified output suitable for running via CTest." << std::endl;
|
stream << " undefined, all]\n";
|
||||||
stream << " -d, --debug disable IO capture for debugging (super verbose output)." << std::endl;
|
stream << " select the logging class(es) to output.\n";
|
||||||
stream << " --no-summary disable the final summary printout." << std::endl;
|
stream << " --log-split output the different non-interleaved log streams\n";
|
||||||
stream << std::endl;
|
stream << " sequentially.\n";
|
||||||
stream << " FG options:" << std::endl;
|
stream << '\n';
|
||||||
stream << " --fg-root the path to FGData." << std::endl;
|
stream << " Verbosity options:\n";
|
||||||
stream << std::endl;
|
stream << " -t, --timings verbose output including names and timings for all\n";
|
||||||
stream << "Environmental variables:" << std::endl;
|
stream << " tests.\n";
|
||||||
stream << " FG_TEST_LOG_LEVEL equivalent to the --log-level option." << std::endl;
|
stream << " -c, --ctest simplified output suitable for running via CTest.\n";
|
||||||
stream << " FG_TEST_LOG_CLASS equivalent to the --log-class option." << std::endl;
|
stream << " -d, --debug disable IO capture for debugging (super verbose output).\n";
|
||||||
stream << " FG_TEST_LOG_SPLIT equivalent to the --log-split option." << std::endl;
|
stream << " --no-summary disable the final summary printout.\n";
|
||||||
stream << " FG_TEST_TIMINGS equivalent to the -t or --timings option." << std::endl;
|
stream << '\n';
|
||||||
stream << " FG_TEST_DEBUG equivalent to the -d or --debug option." << std::endl;
|
stream << " FG options:\n";
|
||||||
stream << " FG_ROOT the path to FGData. The order of precedence is" << std::endl;
|
stream << " --fg-root the path to FGData.\n";
|
||||||
stream << " --fg-root, the FG_DATA_DIR CMake option, FG_ROOT," << std::endl;
|
stream << '\n';
|
||||||
stream << " '../fgdata/', and '../data/'." << std::endl;
|
stream << "Environmental variables:\n";
|
||||||
|
stream << " FG_TEST_LOG_LEVEL equivalent to the --log-level option.\n";
|
||||||
|
stream << " FG_TEST_LOG_CLASS equivalent to the --log-class option.\n";
|
||||||
|
stream << " FG_TEST_LOG_SPLIT equivalent to the --log-split option.\n";
|
||||||
|
stream << " FG_TEST_TIMINGS equivalent to the -t or --timings option.\n";
|
||||||
|
stream << " FG_TEST_DEBUG equivalent to the -d or --debug option.\n";
|
||||||
|
stream << " FG_ROOT the path to FGData. The order of precedence is\n";
|
||||||
|
stream << " --fg-root, the FG_DATA_DIR CMake option, FG_ROOT,\n";
|
||||||
|
stream << " '../fgdata/', and '../data/'.\n";
|
||||||
stream.flush();
|
stream.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue