Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix parsing of options for testall.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 19 Apr 2012 08:59:52 +0000 (10:59 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 20 Apr 2012 07:25:19 +0000 (09:25 +0200)
Options such as --helpless or --dumpfoobar were wrongly treated as synonyms
for --help or --dump.

tools/sg_unit_extractor.pl

index 0aa5faf..031329a 100755 (executable)
@@ -148,11 +148,11 @@ int main(int argc, char *argv[]) {
           strcat(selection, \",\");
           strcat(selection, p);
         }
-      } else if (!strncmp(argv[i],\"--dump-only\",strlen(\"--dump-only\"))||
-                !strncmp(argv[i],\"--dump\",     strlen(\"--dump\"))) {
+      } else if (!strcmp(argv[i], \"--dump-only\")||
+                 !strcmp(argv[i], \"--dump\")) {
         xbt_test_dump(selection);
         return 0;
-      } else if (!strncmp(argv[i],\"--help\",strlen(\"--help\"))) {
+      } else if (!strcmp(argv[i], \"--help\")) {
          printf(
              "Usage: testall [--help] [--tests=selection] [--dump-only]\\n\\n"
              "--help: display this help\\n"