| Index: scripts/slave/recipes/bisect_test/example_bisect_results.py
|
| diff --git a/scripts/slave/recipes/bisect_test/example_bisect_results.py b/scripts/slave/recipes/bisect_test/example_bisect_results.py
|
| index 6572d24fcfb5b2675e504f396f1a943d13cb6e18..139e82f712eda805b8e8b1926bf1c4d3954ea9e7 100644
|
| --- a/scripts/slave/recipes/bisect_test/example_bisect_results.py
|
| +++ b/scripts/slave/recipes/bisect_test/example_bisect_results.py
|
| @@ -6,6 +6,7 @@
|
|
|
| DEPS = [
|
| 'auto_bisect',
|
| + 'gsutil',
|
| 'recipe_engine/json',
|
| 'recipe_engine/path',
|
| 'recipe_engine/properties',
|
| @@ -58,6 +59,9 @@ ABORTED_BISECT_ATTRIBUTES['culprit_present'] = False
|
|
|
|
|
| def RunSteps(api):
|
| + # For coverage only
|
| + api.gsutil.cat('gs://fakebucket/fake/path/fake_file.txt')
|
| +
|
| api.path['checkout'] = api.path.mkdtemp('bogus')
|
| bisector = api.auto_bisect.create_bisector(api.properties['bisect_config'],
|
| dummy_mode=True)
|
| @@ -88,18 +92,6 @@ def set_attributes(target, attributes):
|
| setattr(target, k, v)
|
|
|
|
|
| -def add_revision_mapping(api, test, pos, sha):
|
| - step_name = ('Resolving reference range.crrev get commit hash for ' +
|
| - 'refs/heads/master@{#%s}' % pos)
|
| - stdout = api.json.output({'git_sha': sha})
|
| - test += api.step_data(step_name, stdout=stdout)
|
| -
|
| - step_name = 'Resolving reference range.resolving hash ' + sha
|
| - pos = 'refs/heads/master@{#%s}' % pos
|
| - stdout = api.raw_io.output(pos)
|
| - return test
|
| -
|
| -
|
| def add_revision_info(api, test):
|
| step_name = 'Reading culprit cl information.'
|
| rev_info = {
|
| @@ -123,54 +115,63 @@ def get_post_bisect_step_data(api, test):
|
| def GenTests(api):
|
| basic_test = api.test('basic_test')
|
| basic_test = get_post_bisect_step_data(api, basic_test)
|
| - basic_test = add_revision_mapping(api, basic_test, '314015', 'c001c0de')
|
| - basic_test = add_revision_mapping(api, basic_test, '314017', 'deadbeef')
|
| basic_test = add_revision_info(api, basic_test)
|
| basic_test += api.properties(
|
| bisect_config = BASIC_CONFIG,
|
| dummy_bisector_attributes = BASIC_ATTRIBUTES)
|
| + basic_test += api.auto_bisect([
|
| + {'hash': 'c001c0de', 'commit_pos': '314015'},
|
| + {'hash': 'deadc0de', 'commit_pos': '314016'},
|
| + {'hash': 'deadbeef', 'commit_pos': '314017'},
|
| + ])
|
| yield basic_test
|
|
|
| deps_culprit_test = api.test('deps_culprit_test')
|
| deps_culprit_test = get_post_bisect_step_data(api, deps_culprit_test)
|
| - deps_culprit_test = add_revision_mapping(
|
| - api, deps_culprit_test, '314015', 'c001c0de')
|
| - deps_culprit_test = add_revision_mapping(
|
| - api, deps_culprit_test, '314017', 'deadbeef')
|
| deps_culprit_test = add_revision_info(api, deps_culprit_test)
|
| deps_culprit_test += api.properties(
|
| bisect_config = BASIC_CONFIG,
|
| dummy_bisector_attributes = DEPS_CULPRIT_ATTRIBUTES)
|
| + deps_culprit_test += api.auto_bisect([
|
| + {'hash': 'c001c0de', 'commit_pos': '314015'},
|
| + {'hash': 'deadc0de', 'commit_pos': '314016'},
|
| + {'hash': 'deadbeef', 'commit_pos': '314017'},
|
| + ])
|
| yield deps_culprit_test
|
|
|
| failed_test = api.test('failed_test')
|
| failed_test = get_post_bisect_step_data(api, failed_test)
|
| - failed_test = add_revision_mapping(api, failed_test, '314015', 'c001c0de')
|
| - failed_test = add_revision_mapping(api, failed_test, '314017', 'deadbeef')
|
| failed_test += api.properties(
|
| bisect_config = BASIC_CONFIG,
|
| dummy_bisector_attributes = FAILED_ATTRIBUTES)
|
| + failed_test += api.auto_bisect([
|
| + {'hash': 'c001c0de', 'commit_pos': '314015'},
|
| + {'hash': 'deadc0de', 'commit_pos': '314016'},
|
| + {'hash': 'deadbeef', 'commit_pos': '314017'},
|
| + ])
|
| yield failed_test
|
|
|
| failed_direction_test = api.test('failed_direction_test')
|
| - failed_direction_test = get_post_bisect_step_data(api,
|
| - failed_direction_test)
|
| - failed_direction_test = add_revision_mapping(api, failed_direction_test,
|
| - '314015', 'c001c0de')
|
| - failed_direction_test = add_revision_mapping(api, failed_direction_test,
|
| - '314017', 'deadbeef')
|
| + failed_direction_test = get_post_bisect_step_data(
|
| + api, failed_direction_test)
|
| failed_direction_test += api.properties(
|
| bisect_config = BASIC_CONFIG,
|
| dummy_bisector_attributes = FAILED_DIRECTION_ATTRIBUTES)
|
| + failed_direction_test += api.auto_bisect([
|
| + {'hash': 'c001c0de', 'commit_pos': '314015'},
|
| + {'hash': 'deadc0de', 'commit_pos': '314016'},
|
| + {'hash': 'deadbeef', 'commit_pos': '314017'},
|
| + ])
|
| yield failed_direction_test
|
|
|
| aborted_bisect_test = api.test('aborted_non_telemetry_test')
|
| aborted_bisect_test = get_post_bisect_step_data(api, aborted_bisect_test)
|
| - aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314015',
|
| - 'c001c0de')
|
| - aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314017',
|
| - 'deadbeef')
|
| aborted_bisect_test += api.properties(
|
| bisect_config = NON_TELEMETRY_TEST_CONFIG,
|
| dummy_bisector_attributes = ABORTED_BISECT_ATTRIBUTES)
|
| + aborted_bisect_test += api.auto_bisect([
|
| + {'hash': 'c001c0de', 'commit_pos': '314015'},
|
| + {'hash': 'deadc0de', 'commit_pos': '314016'},
|
| + {'hash': 'deadbeef', 'commit_pos': '314017'},
|
| + ])
|
| yield aborted_bisect_test
|
|
|