From fcf09ea42e0a4216292152b12514329ce49e7706 Mon Sep 17 00:00:00 2001 From: Alex Polcyn Date: Tue, 6 Dec 2016 04:00:05 +0000 Subject: handle empty string for qps workers in driver and dont quit them on netperf --- test/cpp/qps/driver.cc | 2 +- tools/run_tests/run_performance_tests.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index ea0b38e8ad..22b2cd080d 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -101,7 +101,7 @@ static std::unordered_map> get_hosts_and_cores( static deque get_workers(const string& name) { char* env = gpr_getenv(name.c_str()); - if (!env) return deque(); + if (!env || strlen(env) == 0) return deque(); deque out; char* p = env; diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 1d0c98fb69..5e6ff44f4f 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -464,9 +464,10 @@ for scenario in scenarios: try: for worker in scenario.workers: worker.start() - scenario_failures, resultset = jobset.run([scenario.jobspec, - create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)], - newline_on_success=True, maxjobs=1) + jobs = [scenario.jobspec] + if len(scenario.workers) > 0: + jobs.append(create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)) + scenario_failures, resultset = jobset.run(jobs, newline_on_success=True, maxjobs=1) total_scenario_failures += scenario_failures merged_resultset = dict(itertools.chain(merged_resultset.iteritems(), resultset.iteritems())) -- cgit v1.2.3 From ca5e92442fedd5bd72fe2438f7d03c7bf2f9b00d Mon Sep 17 00:00:00 2001 From: Alex Polcyn Date: Tue, 6 Dec 2016 04:21:37 +0000 Subject: clean up scenario.workers length check --- tools/run_tests/run_performance_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 5e6ff44f4f..0109099ccc 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -465,7 +465,7 @@ for scenario in scenarios: for worker in scenario.workers: worker.start() jobs = [scenario.jobspec] - if len(scenario.workers) > 0: + if scenario.workers: jobs.append(create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)) scenario_failures, resultset = jobset.run(jobs, newline_on_success=True, maxjobs=1) total_scenario_failures += scenario_failures -- cgit v1.2.3