Chromium Code Reviews| Index: tools/telemetry/telemetry/page/profile_generator.py |
| diff --git a/tools/telemetry/telemetry/page/profile_generator.py b/tools/telemetry/telemetry/page/profile_generator.py |
| index 7491345849b1183b6b5d7430b74f9679e830f4e7..ca53a882748aa3f1ea51c446a16267e28402030c 100644 |
| --- a/tools/telemetry/telemetry/page/profile_generator.py |
| +++ b/tools/telemetry/telemetry/page/profile_generator.py |
| @@ -68,20 +68,16 @@ def _IsPseudoFile(directory, paths): |
| def GenerateProfiles(profile_creator_class, profile_creator_name, options): |
| """Generate a profile""" |
| - expectations = test_expectations.TestExpectations() |
| - test = profile_creator_class() |
| temp_output_directory = tempfile.mkdtemp() |
| options.output_profile_path = temp_output_directory |
| - results = results_options.CreateResults( |
| - benchmark.BenchmarkMetadata(test.__class__.__name__), options) |
| - user_story_runner.Run(test, test.page_set, expectations, options, results) |
| - |
| - if results.failures: |
| - logging.warning('Some pages failed.') |
| - logging.warning('Failed pages:\n%s', |
| - '\n'.join(map(str, results.pages_that_failed))) |
| + profile_creator_instance = profile_creator_class() |
| + try: |
| + profile_creator_instance.Run(options) |
| + except Exception: |
| + logging.exception('Profile creation failed.') |
| + shutil.rmtree(temp_output_directory) |
| return 1 |
|
dtu
2015/01/09 01:23:58
I prefer re-raising the exception here, so we get
erikchen
2015/01/09 03:12:42
Sounds reasonable to me. Done. I re-raised the exc
|
| # Everything is a-ok, move results to final destination. |