From d153e95a86e80d31041d204862e9cf684e88b471 Mon Sep 17 00:00:00 2001 From: Philippe Gil Date: Wed, 20 Sep 2023 18:10:12 +0200 Subject: [PATCH] Remove gprname references in tests as it was removed from gpr2 Part of gpr_issues#146 --- testsuite/tests/command_line/test.out | 96 ------------------- testsuite/tests/command_line/test.py | 8 +- testsuite/tests/display-version/test.out | 1 - testsuite/tests/display-version/test.py | 5 +- .../testsuite_support/builder_and_runner.py | 3 +- 5 files changed, 5 insertions(+), 108 deletions(-) diff --git a/testsuite/tests/command_line/test.out b/testsuite/tests/command_line/test.out index 06bfade87..598bddfd6 100644 --- a/testsuite/tests/command_line/test.out +++ b/testsuite/tests/command_line/test.out @@ -238,45 +238,6 @@ Verbosity switches: -v Verbose output -ws Suppress all warnings -------------------------- -gprname -h -------------------------- -Usage: gprname [switches] naming-pattern [naming-patterns] - {--and [switches] naming-pattern [naming-patterns]} - -general switches: - --version Display version and exit - -h, --help Display usage and exit - - -eL For backwards compatibility, has no effect - -P[ ] Update or create project file - - --ignore-duplicate-files Ignore duplicate file names - --ignore-predefined-units Ignore predefined units - - --no-backup Do not create backup of project file - --target= Indicates the target of the GNAT compiler - --RTS= Specify the Ada runtime - - -gnateD= Preprocess with symbol definition - -gnatep= Preprocess files with data file - - --minimal-dirs Keep as Source_Dirs only the directories that contain at least one source. - This will also expand any /** suffix to an explicit list of directories. - - -v Verbose output - -v -v Very verbose output - -vP Specify verbosity when parsing Project Files (x = 0/1/2) - -switches for naming pattern sections: - --and Begin a new naming patterns section - -d[ ] Use as one of the source directories for the current section - -D[ ] Get source directories and files from - [-x][ ] [exclude] pattern for Ada source - -[x]f[ ] [exclude] pattern for C source - -[x]f:[ ] [exclude] pattern for source of language - - ------------------------- gprls --help ------------------------- @@ -517,45 +478,6 @@ Verbosity switches: -v Verbose output -ws Suppress all warnings -------------------------- -gprname --help -------------------------- -Usage: gprname [switches] naming-pattern [naming-patterns] - {--and [switches] naming-pattern [naming-patterns]} - -general switches: - --version Display version and exit - -h, --help Display usage and exit - - -eL For backwards compatibility, has no effect - -P[ ] Update or create project file - - --ignore-duplicate-files Ignore duplicate file names - --ignore-predefined-units Ignore predefined units - - --no-backup Do not create backup of project file - --target= Indicates the target of the GNAT compiler - --RTS= Specify the Ada runtime - - -gnateD= Preprocess with symbol definition - -gnatep= Preprocess files with data file - - --minimal-dirs Keep as Source_Dirs only the directories that contain at least one source. - This will also expand any /** suffix to an explicit list of directories. - - -v Verbose output - -v -v Very verbose output - -vP Specify verbosity when parsing Project Files (x = 0/1/2) - -switches for naming pattern sections: - --and Begin a new naming patterns section - -d[ ] Use as one of the source directories for the current section - -D[ ] Get source directories and files from - [-x][ ] [exclude] pattern for Ada source - -[x]f[ ] [exclude] pattern for C source - -[x]f:[ ] [exclude] pattern for source of language - - ------------------------- gprls --no-such-switch ------------------------- @@ -577,12 +499,6 @@ gprinstall: unrecognized option '--no-such-switch' try "gprinstall --help" for more information. STATUS: 4 -------------------------- -gprname --no-such-switch -------------------------- -gprname: wrong switch: --no-such-switch -STATUS: 4 - ------------------------- gprls --config:conf.cgpr ------------------------- @@ -604,12 +520,6 @@ gprinstall: unexpected index for '--config:conf.cgpr' try "gprinstall --help" for more information. STATUS: 4 -------------------------- -gprname -gnatep:foo -------------------------- -gprname: project file name missing -STATUS: 4 - ------------------------- gprls -P ------------------------- @@ -631,12 +541,6 @@ gprinstall: parameter expected for argument '-P' try "gprinstall --help" for more information. STATUS: 4 -------------------------- -gprname -P -------------------------- -gprname: project file name missing -STATUS: 4 - ------------------------- gprls -s ------------------------- diff --git a/testsuite/tests/command_line/test.py b/testsuite/tests/command_line/test.py index 76c23acd6..b6e02208a 100644 --- a/testsuite/tests/command_line/test.py +++ b/testsuite/tests/command_line/test.py @@ -3,12 +3,11 @@ GPRLS, GPRCLEAN, GPRINSTALL, - GPRNAME, ) bnr = BuilderAndRunner() -all_tools = [GPRLS, GPRCLEAN, GPRINSTALL, GPRNAME] +all_tools = [GPRLS, GPRCLEAN, GPRINSTALL] def execute(cmd, check=False): @@ -42,10 +41,7 @@ def execute(cmd, check=False): # check invalid parameter delimiter for t in all_tools: - if t == GPRNAME: - execute([t, "-gnatep:foo"]) - else: - execute([t, "--config:conf.cgpr"]) + execute([t, "--config:conf.cgpr"]) # check no parameter diff --git a/testsuite/tests/display-version/test.out b/testsuite/tests/display-version/test.out index 6a16b2544..f532e2445 100644 --- a/testsuite/tests/display-version/test.out +++ b/testsuite/tests/display-version/test.out @@ -1,4 +1,3 @@ -GPRNAME: OK GPRLS: OK GPRINSTALL: OK GPRCLEAN: OK diff --git a/testsuite/tests/display-version/test.py b/testsuite/tests/display-version/test.py index e01514a58..e12d0bdfd 100644 --- a/testsuite/tests/display-version/test.py +++ b/testsuite/tests/display-version/test.py @@ -1,6 +1,6 @@ import re -from testsuite_support.builder_and_runner import BuilderAndRunner, GPRNAME, GPRLS, \ +from testsuite_support.builder_and_runner import BuilderAndRunner, GPRLS, \ GPRINSTALL, GPRCLEAN, GPRCONFIG, \ GPRREMOTE @@ -11,7 +11,7 @@ def check(toolname, tool): try: p = BuilderAndRunner().run([tool, '--version']) if p.status != 0: - print('gprname returned ' + str(p.status)) + print(toolname + ' returned ' + str(p.status)) print(p.out) else: output = p.out @@ -28,7 +28,6 @@ def check(toolname, tool): print('*** Error: %s' % str(E)) -check('GPRNAME', GPRNAME) check('GPRLS', GPRLS) check('GPRINSTALL', GPRINSTALL) check('GPRCLEAN', GPRCLEAN) diff --git a/testsuite/testsuite_support/builder_and_runner.py b/testsuite/testsuite_support/builder_and_runner.py index 20023b418..b01e64211 100644 --- a/testsuite/testsuite_support/builder_and_runner.py +++ b/testsuite/testsuite_support/builder_and_runner.py @@ -14,12 +14,11 @@ GPRLS = GPR + "ls" GPRCLEAN = GPR + "clean" GPRINSTALL = GPR + "install" -GPRNAME = GPR + "name" GPRCONFIG = GPR + "config" GPRREMOTE = GPR + "remote" GPRDOC = GPR + "doc" GPRINSPECT = GPR + "inspect" -GPRTOOLS = [GPRLS, GPRCLEAN, GPRINSTALL, GPRNAME, GPRCONFIG, GPRREMOTE, GPRDOC, GPRINSPECT] +GPRTOOLS = [GPRLS, GPRCLEAN, GPRINSTALL, GPRCONFIG, GPRREMOTE, GPRDOC, GPRINSPECT] class BuilderAndRunner(object):