add backward-compatibility aliases for test-runner command-line arguments
authorMathieu Lacage <mathieu.lacage@gmail.com>
Thu, 11 Aug 2011 08:52:28 -0400
changeset 7426 d2d7a32fd452
parent 7425 a3527215d75b
child 7427 710d6ff1d227
add backward-compatibility aliases for test-runner command-line arguments
src/core/model/test.cc
--- a/src/core/model/test.cc	Thu Aug 11 08:45:29 2011 -0400
+++ b/src/core/model/test.cc	Thu Aug 11 08:52:28 2011 -0400
@@ -545,10 +545,13 @@
             << "Options: "
             << "  --help                 : print these options" << std::endl
             << "  --print-test-name-list : print the list of names of tests available" << std::endl
+            << "  --list                 : an alias for --print-test-name-list" << std::endl
             << "  --print-test-type-list : print the list of types of tests available" << std::endl
             << "  --print-temp-dir       : Print name of temporary directory before running the tests" << std::endl
             << "  --test-type=TYPE       : Process only tests of type TYPE" << std::endl
             << "  --test-name=NAME       : Process only test whose name matches NAME" << std::endl
+            << "  --suite=NAME           : an alias (here for compatibility reasons only) "
+            << "for --test-name=NAME" << std::endl
             << "  --assert-on-failure    : when a test fails, crash immediately (useful" << std::endl
             << "                           when running under a debugger" << std::endl
             << "  --stop-on-failure      : when a test fails, stop immediately" << std::endl
@@ -653,7 +656,8 @@
           PrintHelp (progname);
           return 0;
         }
-      else if (strcmp (arg, "--print-test-name-list") == 0)
+      else if (strcmp (arg, "--print-test-name-list") == 0 ||
+               strcmp(arg, "--list") == 0)
         {
           printTestNameList = true;
         }
@@ -677,6 +681,10 @@
         {
           testName = arg + strlen("--test-name=");
         }
+      else if (strncmp(arg, "--suite=", strlen("--suite=")) == 0)
+        {
+          testName = arg + strlen("--suite=");
+        }
       else if (strncmp(arg, "--tempdir=", strlen("--tempdir=")) == 0)
         {
           m_tempDir = arg + strlen("--tempdir=");