Skip to content

Commit

Permalink
Remove gprname references in tests as it was removed from gpr2
Browse files Browse the repository at this point in the history
As gprname is not part of of gprname, remove all gprname related tests from gpr2 testsuite.

Closes gpr_issues#146

Merge request eng/gpr/gpr!166 from branch 'mr/gpr_issues-146/updating-tests-after-gprname-removed' into 'master'
  • Loading branch information
Philippe Gil committed Sep 20, 2023
2 parents 2c247ab + d153e95 commit 965de29
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 108 deletions.
96 changes: 0 additions & 96 deletions testsuite/tests/command_line/test.out
Original file line number Diff line number Diff line change
Expand Up @@ -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[ ]<proj> Update or create project file <proj>

--ignore-duplicate-files Ignore duplicate file names
--ignore-predefined-units Ignore predefined units

--no-backup Do not create backup of project file
--target=<targ> Indicates the target of the GNAT compiler
--RTS=<dir> Specify the Ada runtime

-gnateD<sym>=<val> Preprocess with symbol definition
-gnatep=<data> 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<x> Specify verbosity when parsing Project Files (x = 0/1/2)

switches for naming pattern sections:
--and Begin a new naming patterns section
-d[ ]<dir> Use <dir> as one of the source directories for the current section
-D[ ]<file> Get source directories and files from <file>
[-x][ ]<pat> [exclude] pattern <pat> for Ada source
-[x]f[ ]<pat> [exclude] pattern <pat> for C source
-[x]f:<lang>[ ]<pat> [exclude] pattern <pat> for source of language <lang>


-------------------------
gprls --help
-------------------------
Expand Down Expand Up @@ -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[ ]<proj> Update or create project file <proj>

--ignore-duplicate-files Ignore duplicate file names
--ignore-predefined-units Ignore predefined units

--no-backup Do not create backup of project file
--target=<targ> Indicates the target of the GNAT compiler
--RTS=<dir> Specify the Ada runtime

-gnateD<sym>=<val> Preprocess with symbol definition
-gnatep=<data> 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<x> Specify verbosity when parsing Project Files (x = 0/1/2)

switches for naming pattern sections:
--and Begin a new naming patterns section
-d[ ]<dir> Use <dir> as one of the source directories for the current section
-D[ ]<file> Get source directories and files from <file>
[-x][ ]<pat> [exclude] pattern <pat> for Ada source
-[x]f[ ]<pat> [exclude] pattern <pat> for C source
-[x]f:<lang>[ ]<pat> [exclude] pattern <pat> for source of language <lang>


-------------------------
gprls --no-such-switch
-------------------------
Expand All @@ -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
-------------------------
Expand All @@ -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
-------------------------
Expand All @@ -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
-------------------------
Expand Down
8 changes: 2 additions & 6 deletions testsuite/tests/command_line/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion testsuite/tests/display-version/test.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
GPRNAME: OK
GPRLS: OK
GPRINSTALL: OK
GPRCLEAN: OK
Expand Down
5 changes: 2 additions & 3 deletions testsuite/tests/display-version/test.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions testsuite/testsuite_support/builder_and_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 965de29

Please sign in to comment.