Commit 26b3cd45 authored by Caleb Rouleau's avatar Caleb Rouleau Committed by Commit Bot

[telemetry smoke tests] Mark skipped if nothing is run.

This depends on the return code being -1 if nothing is run,
which is implemented in
https://chromium-review.googlesource.com/c/catapult/+/1605791
This change is safe to commit before
https://chromium-review.googlesource.com/c/catapult/+/1605791
since it only does things if the return code is -1.

Bug: 944909
Change-Id: I9619b2455c2cfe6e69d91c1d0c8f5a1d9c998e35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604339Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659098}
parent 45b87ecc
......@@ -96,8 +96,10 @@ def SmokeTestGenerator(benchmark, num_pages=1):
with open(path_util.GetExpectationsPath()) as fp:
single_page_benchmark.AugmentExpectationsWithParser(fp.read())
self.assertEqual(0, single_page_benchmark.Run(options),
msg='Failed: %s' % benchmark)
return_code = single_page_benchmark.Run(options)
if return_code == -1:
self.skipTest('The benchmark was not run.')
self.assertEqual(0, return_code, msg='Failed: %s' % benchmark)
return BenchmarkSmokeTest
......
......@@ -218,8 +218,10 @@ def _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test):
with open(path_util.GetExpectationsPath()) as fp:
single_page_benchmark.AugmentExpectationsWithParser(fp.read())
self.assertEqual(0, single_page_benchmark.Run(options),
msg='Failed: %s' % benchmark_class)
return_code = single_page_benchmark.Run(options)
if return_code == -1:
self.skipTest('The benchmark was not run.')
self.assertEqual(0, return_code, msg='Failed: %s' % benchmark_class)
# We attach the test method to SystemHealthBenchmarkSmokeTest dynamically
# so that we can set the test method name to include
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment