aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_performance_tests.py
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-10-24 21:06:40 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-10-24 21:14:21 +0200
commit94d40cbd5a0b827e28b6bd1dd91022c3557c063f (patch)
tree148cc6528f5be7a1d1a87d959a2361d83b6c828c /tools/run_tests/run_performance_tests.py
parent13ca42dbae2656b97b3e40e0fa8b63aae7fd5dd5 (diff)
make benchmarks create report.xml
Diffstat (limited to 'tools/run_tests/run_performance_tests.py')
-rwxr-xr-xtools/run_tests/run_performance_tests.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py
index 099ab89ddf..7cb827ecea 100755
--- a/tools/run_tests/run_performance_tests.py
+++ b/tools/run_tests/run_performance_tests.py
@@ -42,6 +42,7 @@ import os
import performance.scenario_config as scenario_config
import pipes
import re
+import report_utils
import subprocess
import sys
import tempfile
@@ -453,6 +454,7 @@ if not scenarios:
total_scenario_failures = 0
qps_workers_killed = 0
+merged_resultset = {}
for scenario in scenarios:
if args.dry_run:
print(scenario.name)
@@ -460,14 +462,20 @@ for scenario in scenarios:
try:
for worker in scenario.workers:
worker.start()
- scenario_failures, _ = jobset.run([scenario.jobspec,
- create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
- newline_on_success=True, maxjobs=1)
+ scenario_failures, resultset = jobset.run([scenario.jobspec,
+ create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
+ newline_on_success=True, maxjobs=1)
total_scenario_failures += scenario_failures
+ merged_resultset = dict(itertools.chain(merged_resultset.iteritems(),
+ resultset.iteritems()))
finally:
# Consider qps workers that need to be killed as failures
qps_workers_killed += finish_qps_workers(scenario.workers)
+
+report_utils.render_junit_xml_report(merged_resultset, 'report.xml',
+ suite_name='benchmarks')
+
if total_scenario_failures > 0 or qps_workers_killed > 0:
print ("%s scenarios failed and %s qps worker jobs killed" % (total_scenario_failures, qps_workers_killed))
sys.exit(1)