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
e6cc9c7a
Commit
e6cc9c7a
authored
9 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
custom test target for parallel test running
parent
6537ab9d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
setup.py
+1
-0
1 addition, 0 deletions
setup.py
src/python/grpcio/commands.py
+35
-0
35 additions, 0 deletions
src/python/grpcio/commands.py
tools/run_tests/run_python.sh
+1
-1
1 addition, 1 deletion
tools/run_tests/run_python.sh
with
37 additions
and
1 deletion
setup.py
+
1
−
0
View file @
e6cc9c7a
...
...
@@ -165,6 +165,7 @@ COMMAND_CLASS = {
'
build_tagged_ext
'
:
precompiled
.
BuildTaggedExt
,
'
gather
'
:
commands
.
Gather
,
'
run_interop
'
:
commands
.
RunInterop
,
'
test_lite
'
:
commands
.
TestLite
}
# Ensure that package data is copied over before any commands have been run:
...
...
This diff is collapsed.
Click to expand it.
src/python/grpcio/commands.py
+
35
−
0
View file @
e6cc9c7a
...
...
@@ -264,6 +264,41 @@ class Gather(setuptools.Command):
self
.
distribution
.
fetch_build_eggs
(
self
.
distribution
.
tests_require
)
class
TestLite
(
setuptools
.
Command
):
"""
Command to run tests without fetching or building anything.
"""
description
=
'
run tests without fetching or building anything.
'
user_options
=
[]
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
# distutils requires this override.
pass
def
run
(
self
):
self
.
_add_eggs_to_path
()
import
tests
loader
=
tests
.
Loader
()
loader
.
loadTestsFromNames
([
'
tests
'
])
runner
=
tests
.
Runner
()
result
=
runner
.
run
(
loader
.
suite
)
if
not
result
.
wasSuccessful
():
sys
.
exit
(
1
)
def
_add_eggs_to_path
(
self
):
"""
Adds all egg files under .eggs to sys.path
"""
import
pkg_resources
eggs_dir
=
os
.
path
.
join
(
PYTHON_STEM
,
'
../../../.eggs
'
)
eggs
=
[
os
.
path
.
join
(
eggs_dir
,
filename
)
for
filename
in
os
.
listdir
(
eggs_dir
)
if
filename
.
endswith
(
'
.egg
'
)]
for
egg
in
eggs
:
sys
.
path
.
insert
(
0
,
pkg_resources
.
normalize_path
(
egg
))
class
RunInterop
(
test
.
test
):
description
=
'
run interop test client/server
'
...
...
This diff is collapsed.
Click to expand it.
tools/run_tests/run_python.sh
+
1
−
1
View file @
e6cc9c7a
...
...
@@ -46,7 +46,7 @@ if [ "$CONFIG" = "gcov" ]
then
tox
else
$ROOT
/.tox/py27/bin/python
$ROOT
/setup.py
test
$ROOT
/.tox/py27/bin/python
$ROOT
/setup.py test
_lite
fi
mkdir
-p
$ROOT
/reports
...
...
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