aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-10-26 17:36:51 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-10-26 17:36:51 -0700
commit49bca4626485202a184cc57a95d1afb3215650d1 (patch)
treef423e0c6554a5ee1ded0b5d012d3d0624db6e615
parentceced33a4962cc6eb83d6d27be884500733ce5c2 (diff)
parent8ae409f574f1594ca14433ddd432babc33dc2632 (diff)
Merge pull request #3970 from murgatroid99/node_runtests_no_make
Prevent run_tests.py from running make if the language has no make targets
-rwxr-xr-xtools/run_tests/run_tests.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index b1ca4cf4c2..99f454397e 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -637,13 +637,16 @@ if platform.system() == 'Windows':
for target in targets]
else:
def make_jobspec(cfg, targets, makefile='Makefile'):
- return [jobset.JobSpec([os.getenv('MAKE', 'make'),
- '-f', makefile,
- '-j', '%d' % (multiprocessing.cpu_count() + 1),
- 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
- args.slowdown,
- 'CONFIG=%s' % cfg] + targets,
- timeout_seconds=30*60)]
+ if targets:
+ return [jobset.JobSpec([os.getenv('MAKE', 'make'),
+ '-f', makefile,
+ '-j', '%d' % (multiprocessing.cpu_count() + 1),
+ 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
+ args.slowdown,
+ 'CONFIG=%s' % cfg] + targets,
+ timeout_seconds=30*60)]
+ else:
+ return []
make_targets = {}
for l in languages:
makefile = l.makefile_name()
@@ -840,9 +843,9 @@ def _build_and_run(
testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') if xml_report else None
number_failures, _ = jobset.run(
- all_runs, check_cancelled, newline_on_success=newline_on_success,
+ all_runs, check_cancelled, newline_on_success=newline_on_success,
travis=travis, infinite_runs=infinite_runs, maxjobs=args.jobs,
- stop_on_failure=args.stop_on_failure,
+ stop_on_failure=args.stop_on_failure,
cache=cache if not xml_report else None,
xml_report=testsuite,
add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port})