From 6eb1203decdbf9770b36a9b2103d4e5a364edffe Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 19 Apr 2012 10:59:52 +0200 Subject: [PATCH 1/1] Fix parsing of options for testall. Options such as --helpless or --dumpfoobar were wrongly treated as synonyms for --help or --dump. --- tools/sg_unit_extractor.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" -- 2.20.1