Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
6a85129d
Commit
6a85129d
authored
8 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
support --exclude in run_tests_matrix.py
parent
1a741606
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/run_tests/run_tests_matrix.py
+15
-9
15 additions, 9 deletions
tools/run_tests/run_tests_matrix.py
with
15 additions
and
9 deletions
tools/run_tests/run_tests_matrix.py
+
15
−
9
View file @
6a85129d
...
...
@@ -243,14 +243,14 @@ def _allowed_labels():
def
_runs_per_test_type
(
arg_str
):
"""
Auxiliary function to parse the
"
runs_per_test
"
flag.
"""
try
:
n
=
int
(
arg_str
)
if
n
<=
0
:
raise
ValueError
return
n
except
:
msg
=
'
\'
{}
\'
is not a positive integer
'
.
format
(
arg_str
)
raise
argparse
.
ArgumentTypeError
(
msg
)
"""
Auxiliary function to parse the
"
runs_per_test
"
flag.
"""
try
:
n
=
int
(
arg_str
)
if
n
<=
0
:
raise
ValueError
return
n
except
:
msg
=
'
\'
{}
\'
is not a positive integer
'
.
format
(
arg_str
)
raise
argparse
.
ArgumentTypeError
(
msg
)
if
__name__
==
"
__main__
"
:
...
...
@@ -264,6 +264,11 @@ if __name__ == "__main__":
nargs
=
'
+
'
,
default
=
[],
help
=
'
Filter targets to run by label with AND semantics.
'
)
argp
.
add_argument
(
'
--exclude
'
,
choices
=
_allowed_labels
(),
nargs
=
'
+
'
,
default
=
[],
help
=
'
Exclude targets with any of given labels.
'
)
argp
.
add_argument
(
'
--build_only
'
,
default
=
False
,
action
=
'
store_const
'
,
...
...
@@ -310,7 +315,8 @@ if __name__ == "__main__":
jobs
=
[]
for
job
in
all_jobs
:
if
not
args
.
filter
or
all
(
filter
in
job
.
labels
for
filter
in
args
.
filter
):
jobs
.
append
(
job
)
if
not
any
(
exclude_label
in
job
.
labels
for
exclude_label
in
args
.
exclude
):
jobs
.
append
(
job
)
if
not
jobs
:
jobset
.
message
(
'
FAILED
'
,
'
No test suites match given criteria.
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment