Skip to content
Snippets Groups Projects
Commit 49bca462 authored by Nicolas Noble's avatar Nicolas Noble
Browse files

Merge pull request #3970 from murgatroid99/node_runtests_no_make

Prevent run_tests.py from running make if the language has no make targets
parents ceced33a 8ae409f5
No related branches found
No related tags found
No related merge requests found
...@@ -637,13 +637,16 @@ if platform.system() == 'Windows': ...@@ -637,13 +637,16 @@ if platform.system() == 'Windows':
for target in targets] for target in targets]
else: else:
def make_jobspec(cfg, targets, makefile='Makefile'): def make_jobspec(cfg, targets, makefile='Makefile'):
return [jobset.JobSpec([os.getenv('MAKE', 'make'), if targets:
'-f', makefile, return [jobset.JobSpec([os.getenv('MAKE', 'make'),
'-j', '%d' % (multiprocessing.cpu_count() + 1), '-f', makefile,
'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % '-j', '%d' % (multiprocessing.cpu_count() + 1),
args.slowdown, 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
'CONFIG=%s' % cfg] + targets, args.slowdown,
timeout_seconds=30*60)] 'CONFIG=%s' % cfg] + targets,
timeout_seconds=30*60)]
else:
return []
make_targets = {} make_targets = {}
for l in languages: for l in languages:
makefile = l.makefile_name() makefile = l.makefile_name()
...@@ -840,9 +843,9 @@ def _build_and_run( ...@@ -840,9 +843,9 @@ def _build_and_run(
testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') if xml_report else None testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') if xml_report else None
number_failures, _ = jobset.run( 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, 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, cache=cache if not xml_report else None,
xml_report=testsuite, xml_report=testsuite,
add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment