Chromium Code Reviews| Index: scripts/slave/recipes/bisection/desktop_bisect.py |
| diff --git a/scripts/slave/recipes/bisection/desktop_bisect.py b/scripts/slave/recipes/bisection/desktop_bisect.py |
| index 9c4440333b17b14f29454ad5506adedbc72e2659..3e251ff364e544d80ea4f849dc76ae0d6a8d34f6 100644 |
| --- a/scripts/slave/recipes/bisection/desktop_bisect.py |
| +++ b/scripts/slave/recipes/bisection/desktop_bisect.py |
| @@ -68,50 +68,109 @@ View online at http://storage.googleapis.com/chromium-telemetry/html-results/\ |
| results-without_patch |
| """ |
| + buildbucket_put_response = { |
| + "results":[{ |
| + "build":{ |
| + "status": "SCHEDULED", |
| + "created_ts": "1459200369835900", |
| + "bucket": "user.username", |
| + "result_details_json": "null", |
| + "status_changed_ts": "1459200369835930", |
| + "created_by": "user:username@example.com", |
| + "updated_ts": "1459200369835940", |
| + "utcnow_ts": "1459200369962370", |
| + "parameters_json": "{\"This_has_been\": \"removed\"}", |
| + "id": "9016911228971028736" |
| + }, |
| + "kind": "buildbucket#resourcesItem", |
| + "etag": "\"8uCIh8TRuYs4vPN3iWmly9SJMqw\"" |
| + }] |
| + } |
| + |
| + buildbucket_get_response = { |
| + "bucket": "master.tryserver.chromium.perf", |
| + "id": "9009962699124567824", |
| + "result": "SUCCESS", |
| + "status": "COMPLETED", |
| + "status_changed_utc": "Mon Jun 13 19:32:37 2016", |
| + "updated_utc": "Mon Jun 13 19:32:37 2016", |
| + "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux_perf_bisect/builds/6537", |
| + "utcnow_utc": "Tue Jun 21 21:33:56 2016" |
| +} |
| + |
| yield (api.test('basic_perf_tryjob') + api.properties.tryserver( |
| mastername='tryserver.chromium.perf', |
| - buildername='linux_perf_bisect') + api.override_step_data( |
| + buildername='linux_perf_bisect', |
| + patch_storage='rietveld', |
| + patchset='20001', |
| + issue='12345', |
| + rietveld="https://codereview.chromium.org") + api.override_step_data( |
| 'git diff to analyze patch', |
| api.raw_io.stream_output('tools/run-perf-test.cfg')) + |
| api.override_step_data('load config', api.json.output(config_json)) + |
| - api.step_data('Performance Test (Without Patch) 1 of 1', |
| - stdout=api.raw_io.output(str(results_without_patch))) + |
| - api.step_data('Performance Test (With Patch) 1 of 1', |
| - stdout=api.raw_io.output(str(results_with_patch))) + |
| - api.step_data('Post bisect results', |
| - stdout=api.json.output({'status_code': 200}))) |
| + api.step_data('gsutil check.file.exist', retcode=1) + |
| + api.step_data('buildbucket.put', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.put (2)', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.get', |
| + stdout=api.json.output(buildbucket_get_response)) + |
| + api.step_data('buildbucket.get (2)', |
| + stdout=api.json.output(buildbucket_get_response))) |
| config_json.update({'metric': 'dummy/dummy'}) |
| yield (api.test('basic_perf_tryjob_with_metric') + api.properties.tryserver( |
| mastername='tryserver.chromium.perf', |
| - buildername='linux_perf_bisect') + api.override_step_data( |
| + buildername='linux_perf_bisect', |
| + patch_storage='rietveld', |
| + patchset='20001', |
| + issue='12345', |
| + rietveld="https://codereview.chromium.org") + api.override_step_data( |
| 'git diff to analyze patch', |
| api.raw_io.stream_output('tools/run-perf-test.cfg')) + |
| api.override_step_data('load config', api.json.output(config_json)) + |
| - api.step_data('Performance Test (Without Patch) 1 of 1', |
| - stdout=api.raw_io.output(results_without_patch)) + |
| - api.step_data('Performance Test (With Patch) 1 of 1', |
| - stdout=api.raw_io.output(results_with_patch)) + |
| - api.step_data('Post bisect results', |
| - stdout=api.json.output({'status_code': 200}))) |
| + api.step_data('gsutil check.file.exist', retcode=1) + |
| + api.step_data('buildbucket.put', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.put (2)', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.get', |
| + stdout=api.json.output(buildbucket_get_response)) + |
| + api.step_data('buildbucket.get (2)', |
| + stdout=api.json.output(buildbucket_get_response))) |
| yield (api.test('perf_tryjob_failed_test') + api.properties.tryserver( |
| mastername='tryserver.chromium.perf', |
| - buildername='linux_perf_bisect') + api.override_step_data( |
| + buildername='linux_perf_bisect', |
| + patch_storage='rietveld', |
| + patchset='20001', |
| + issue='12345', |
| + rietveld="https://codereview.chromium.org") + api.override_step_data( |
| 'git diff to analyze patch', |
| api.raw_io.stream_output('tools/run-perf-test.cfg')) + |
| api.override_step_data('load config', api.json.output(config_json)) + |
| - api.step_data('Performance Test (With Patch) 1 of 1', |
| - retcode=1)) |
| + api.step_data('gsutil check.file.exist', retcode=1) + |
| + api.step_data('buildbucket.put', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.put (2)', |
| + stdout=api.json.output(buildbucket_put_response)) + |
| + api.step_data('buildbucket.get', |
| + stdout=api.json.output(buildbucket_get_response)) + |
| + api.step_data('buildbucket.get (2)', |
| + stdout=api.json.output(buildbucket_get_response))) |
| config_json.update({'good_revision': '306475', 'bad_revision': '306476'}) |
| yield ( |
| api.test('basic_perf_tryjob_with_revisions') + api.properties.tryserver( |
| mastername='tryserver.chromium.perf', |
| - buildername='linux_perf_bisect') + api.override_step_data( |
| + buildername='linux_perf_bisect', |
| + patch_storage='rietveld', |
| + patchset='20001', |
| + issue='12345', |
| + rietveld="https://codereview.chromium.org") + api.override_step_data( |
| 'git diff to analyze patch', |
| api.raw_io.stream_output('tools/run-perf-test.cfg')) + |
| api.override_step_data('load config', api.json.output(config_json)) + |
| @@ -121,13 +180,11 @@ results-without_patch |
| api.step_data( |
| 'resolving commit_pos ' + config_json['bad_revision'], |
| stdout=api.raw_io.output('hash:bad49c331def2a3bbf3ddd0096eb51551155')) |
| - + api.step_data( |
| - 'Performance Test (d49c331def2a3bbf3ddd0096eb51551155) 1 of 1', |
| - stdout=api.raw_io.output(results_without_patch)) + api.step_data( |
| - 'Performance Test (bad49c331def2a3bbf3ddd0096eb51551155) 1 of 1', |
| - stdout=api.raw_io.output(results_with_patch)) + |
| - api.step_data('Post bisect results', |
| - stdout=api.json.output({'status_code': 200}))) |
| + + api.step_data('gsutil check.file.exist', retcode=1) |
|
RobertoCN
2016/06/24 18:46:37
Consider changing the label of the step to a forma
Ziqi Xiong
2016/06/27 18:47:54
I changed it to 'gsutil exists'. Does that sound b
|
| + + api.step_data('buildbucket.put', |
| + stdout=api.json.output(buildbucket_put_response)) |
| + + api.step_data('buildbucket.get', |
| + stdout=api.json.output(buildbucket_get_response))) |
| config_json = { |
| 'max_time_minutes': '25', |