Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/example.py

Issue 1831843002: Revert of Add bisect config validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 6
7 DEPS = [ 7 DEPS = [
8 'auto_bisect', 8 'auto_bisect',
9 'chromium_tests', 9 'chromium_tests',
10 'recipe_engine/json', 10 'recipe_engine/json',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 api.chromium_tests.prepare_checkout(bot_config) 66 api.chromium_tests.prepare_checkout(bot_config)
67 api.auto_bisect.run_bisect_script('dummy_extra_src', '/dummy/path/') 67 api.auto_bisect.run_bisect_script('dummy_extra_src', '/dummy/path/')
68 68
69 69
70 def GenTests(api): 70 def GenTests(api):
71 dummy_gs_location = ('gs://chrome-perf/bisect-results/' 71 dummy_gs_location = ('gs://chrome-perf/bisect-results/'
72 'a6298e4afedbf2cd461755ea6f45b0ad64222222-test.results') 72 'a6298e4afedbf2cd461755ea6f45b0ad64222222-test.results')
73 basic_test = _make_test(api, _get_basic_test_data(), 'basic') 73 basic_test = _make_test(api, _get_basic_test_data(), 'basic')
74 yield basic_test 74 yield basic_test
75 75
76 invalid_config_test = api.test('invalid_config')
77 invalid_config_test += api.properties(
78 bisect_config=_get_config({'good_revision': 'not a valid revision'}))
79 yield invalid_config_test
80
81 failed_build_test = _make_test( 76 failed_build_test = _make_test(
82 api, _get_ref_range_only_test_data(), 'failed_build_test', 77 api, _get_ref_range_only_test_data(), 'failed_build_test',
83 extra_config={'dummy_builds': None}) 78 extra_config={'dummy_builds': None})
84 failed_build_test += api.step_data('gsutil ls', retcode=1) 79 failed_build_test += api.step_data('gsutil ls', retcode=1)
85 failed_build_test += api.step_data( 80 failed_build_test += api.step_data(
86 'Waiting for chromium@a6298e4afe.gsutil ls' , retcode=1) 81 'Waiting for chromium@a6298e4afe.gsutil ls' , retcode=1)
87 failed_build_test += api.step_data( 82 failed_build_test += api.step_data(
88 'Waiting for chromium@a6298e4afe.fetch builder state', 83 'Waiting for chromium@a6298e4afe.fetch builder state',
89 stdout=api.raw_io.output('{"cachedBuilds": ["2106"]}')) 84 stdout=api.raw_io.output('{"cachedBuilds": ["2106"]}'))
90 failed_build_test += api.step_data( 85 failed_build_test += api.step_data(
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 """Returns a sample bisect config dict with some fields overridden.""" 379 """Returns a sample bisect config dict with some fields overridden."""
385 example_config = { 380 example_config = {
386 'test_type': 'perf', 381 'test_type': 'perf',
387 'command': ( 382 'command': (
388 'src/tools/perf/run_benchmark -v --browser=release smoothness.' 383 'src/tools/perf/run_benchmark -v --browser=release smoothness.'
389 'tough_scrolling_cases'), 384 'tough_scrolling_cases'),
390 'good_revision': '314015', 385 'good_revision': '314015',
391 'bad_revision': '314017', 386 'bad_revision': '314017',
392 'metric': 'mean_input_event_latency/mean_input_event_latency', 387 'metric': 'mean_input_event_latency/mean_input_event_latency',
393 'repeat_count': '2', 388 'repeat_count': '2',
394 'bug_id': '-1',
395 'max_time_minutes': '5', 389 'max_time_minutes': '5',
390 'bug_id': '',
396 'gs_bucket': 'chrome-perf', 391 'gs_bucket': 'chrome-perf',
397 'builder_host': 'master4.golo.chromium.org', 392 'builder_host': 'master4.golo.chromium.org',
398 'builder_port': '8341', 393 'builder_port': '8341',
399 'dummy_builds': 'True', 394 'dummy_builds': 'True',
400 'dummy_job_names': 'True', 395 'dummy_job_names': 'True',
401 'bypass_stats_check': 'True', 396 'bypass_stats_check': 'True',
402 'skip_gclient_ops': 'True', 397 'skip_gclient_ops': 'True',
403 'recipe_tester_name': 'linux_perf_tester', 398 'recipe_tester_name': 'linux_perf_tester'
404 } 399 }
405 if params: 400 if params:
406 example_config.update(params) 401 example_config.update(params)
407 return example_config 402 return example_config
408 403
409 404
410 def _get_step_data_for_revision(api, revision_data, include_build_steps=True): 405 def _get_step_data_for_revision(api, revision_data, include_build_steps=True):
411 """Generator that produces step patches for fake results.""" 406 """Generator that produces step patches for fake results."""
412 commit_pos = revision_data['commit_pos'] 407 commit_pos = revision_data['commit_pos']
413 commit_hash = revision_data['hash'] 408 commit_hash = revision_data['hash']
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) 444 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash))
450 step_name = 'Expanding revision range for revision %s on depot %s' 445 step_name = 'Expanding revision range for revision %s on depot %s'
451 step_name %= (interval[-1], depot_name) 446 step_name %= (interval[-1], depot_name)
452 stdout = api.json.output([(r, 0) for r in interval[:-1]]) 447 stdout = api.json.output([(r, 0) for r in interval[:-1]])
453 yield api.step_data(step_name, stdout=stdout) 448 yield api.step_data(step_name, stdout=stdout)
454 449
455 if 'cl_info' in revision_data: 450 if 'cl_info' in revision_data:
456 step_name = 'Reading culprit cl information.' 451 step_name = 'Reading culprit cl information.'
457 stdout = api.json.output(revision_data['cl_info']) 452 stdout = api.json.output(revision_data['cl_info'])
458 yield api.step_data(step_name, stdout=stdout) 453 yield api.step_data(step_name, stdout=stdout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698