From: Arnaud Giersch Date: Thu, 19 Apr 2012 08:59:52 +0000 (+0200) Subject: Fix parsing of options for testall. X-Git-Tag: v3_7~65^2~4^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6eb1203decdbf9770b36a9b2103d4e5a364edffe?hp=49e717ce62a05692fc037261e131f78ba52adff2 Fix parsing of options for testall. Options such as --helpless or --dumpfoobar were wrongly treated as synonyms for --help or --dump. --- diff --git a/tools/sg_unit_extractor.pl b/tools/sg_unit_extractor.pl index 0aa5faf6de..031329acaa 100755 --- a/tools/sg_unit_extractor.pl +++ b/tools/sg_unit_extractor.pl @@ -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"