From fa319612f186a049c550d3d3500cb558200cfdcb Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Tue, 2 Nov 2021 22:55:58 +0000 Subject: [PATCH] Remove fetch_end_to_end_test recipe This recipe is not used anymore. Bug: 1256330 Change-Id: If62153733836bdde27709b0c1cda9bca261c1252 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3258100 Reviewed-by: Josip Sokcevic Commit-Queue: Gavin Mak --- recipes/README.recipes.md | 8 - .../fetch_end_to_end_test.expected/basic.json | 176 ------------------ recipes/recipes/fetch_end_to_end_test.py | 56 ------ 3 files changed, 240 deletions(-) delete mode 100644 recipes/recipes/fetch_end_to_end_test.expected/basic.json delete mode 100644 recipes/recipes/fetch_end_to_end_test.py diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index cbb382b88..7eda59c93 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -21,7 +21,6 @@ * [bot_update:tests/do_not_retry_patch_failures_in_cq](#recipes-bot_update_tests_do_not_retry_patch_failures_in_cq) (Python3 ✅) * [bot_update:tests/ensure_checkout](#recipes-bot_update_tests_ensure_checkout) (Python3 ✅) * [depot_tools:examples/full](#recipes-depot_tools_examples_full) (Python3 ✅) - * [fetch_end_to_end_test](#recipes-fetch_end_to_end_test) * [gclient:examples/full](#recipes-gclient_examples_full) (Python3 ✅) * [gclient:tests/diff_deps](#recipes-gclient_tests_diff_deps) (Python3 ✅) * [gclient:tests/patch_project](#recipes-gclient_tests_patch_project) (Python3 ✅) @@ -980,13 +979,6 @@ PYTHON_VERSION_COMPATIBILITY: PY2+3 PYTHON_VERSION_COMPATIBILITY: PY2+3 — **def [RunSteps](/recipes/recipe_modules/depot_tools/examples/full.py#16)(api):** -### *recipes* / [fetch\_end\_to\_end\_test](/recipes/recipes/fetch_end_to_end_test.py) - -[DEPS](/recipes/recipes/fetch_end_to_end_test.py#5): [bot\_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step] - -PYTHON_VERSION_COMPATIBILITY: PY2 - -— **def [RunSteps](/recipes/recipes/fetch_end_to_end_test.py#16)(api):** ### *recipes* / [gclient:examples/full](/recipes/recipe_modules/gclient/examples/full.py) [DEPS](/recipes/recipe_modules/gclient/examples/full.py#7): [gclient](#recipe_modules-gclient), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] diff --git a/recipes/recipes/fetch_end_to_end_test.expected/basic.json b/recipes/recipes/fetch_end_to_end_test.expected/basic.json deleted file mode 100644 index 102792c3f..000000000 --- a/recipes/recipes/fetch_end_to_end_test.expected/basic.json +++ /dev/null @@ -1,176 +0,0 @@ -[ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", - "--spec-path", - "cache_dir = '[CACHE]/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'depot_tools', 'url': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'}]", - "--revision_mapping_file", - "{\"got_revision\": \"depot_tools\"}", - "--git-cache-dir", - "[CACHE]/git", - "--cleanup-dir", - "[CLEANUP]/bot_update", - "--output_json", - "/path/to/tmp/json", - "--revision", - "depot_tools@HEAD" - ], - "env": { - "DEPOT_TOOLS_COLLECT_METRICS": "0", - "GIT_HTTP_LOW_SPEED_LIMIT": "102400", - "GIT_HTTP_LOW_SPEED_TIME": "1800" - }, - "env_suffixes": { - "DEPOT_TOOLS_UPDATE": [ - "0" - ], - "PATH": [ - "RECIPE_REPO[depot_tools]" - ] - }, - "infra_step": true, - "name": "bot_update", - "~followup_annotations": [ - "@@@STEP_TEXT@Some step text@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", - "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": \"HEAD\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/depot_tools.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"59bbfb4465019d8ed83bfe88fef566922953452a\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", - "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"depot_tools\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"59bbfb4465019d8ed83bfe88fef566922953452a\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/main@{#91780}\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"root\": \"depot_tools\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"depot_tools\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/depot_tools.git\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"revision\": \"59bbfb4465019d8ed83bfe88fef566922953452a\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@SET_BUILD_PROPERTY@got_revision@\"59bbfb4465019d8ed83bfe88fef566922953452a\"@@@", - "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/main@{#91780}\"@@@" - ] - }, - { - "cmd": [ - "vpython", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/depot_tools/fetch_configs" - ], - "infra_step": true, - "name": "listdir fetch_configs", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/depot_tools/fetch_configs/depot_tools.py@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/depot_tools/fetch_configs/infra.py@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "[START_DIR]/depot_tools/fetch.py", - "depot_tools" - ], - "cwd": "[CLEANUP]/fetch_end_to_end_test_depot_tools_tmp_1", - "env": { - "CHROME_HEADLESS": "1", - "DEPOT_TOOLS_UPDATE": "0" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/depot_tools" - ] - }, - "name": "fetch depot_tools" - }, - { - "cmd": [ - "vpython", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "rmtree", - "[CLEANUP]/fetch_end_to_end_test_depot_tools_tmp_1" - ], - "env": { - "CHROME_HEADLESS": "1", - "DEPOT_TOOLS_UPDATE": "0" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/depot_tools" - ] - }, - "infra_step": true, - "name": "cleanup" - }, - { - "cmd": [ - "python", - "-u", - "[START_DIR]/depot_tools/fetch.py", - "infra" - ], - "cwd": "[CLEANUP]/fetch_end_to_end_test_infra_tmp_1", - "env": { - "CHROME_HEADLESS": "1", - "DEPOT_TOOLS_UPDATE": "0" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/depot_tools" - ] - }, - "name": "fetch infra" - }, - { - "cmd": [ - "vpython", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "rmtree", - "[CLEANUP]/fetch_end_to_end_test_infra_tmp_1" - ], - "env": { - "CHROME_HEADLESS": "1", - "DEPOT_TOOLS_UPDATE": "0" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/depot_tools" - ] - }, - "infra_step": true, - "name": "cleanup (2)" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipes/fetch_end_to_end_test.py b/recipes/recipes/fetch_end_to_end_test.py deleted file mode 100644 index a80ee053c..000000000 --- a/recipes/recipes/fetch_end_to_end_test.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -DEPS = [ - 'bot_update', - 'gclient', - 'recipe_engine/context', - 'recipe_engine/file', - 'recipe_engine/path', - 'recipe_engine/python', - 'recipe_engine/step', -] - - -def RunSteps(api): - # Create a test depot_tools checkout, possibly applying user patches. - api.gclient.set_config('depot_tools') - api.bot_update.ensure_checkout() - - # List fetch configs available in the test depot_tools checkout. - fetch_configs = set( - api.path.basename(f)[:-3] for f in api.file.listdir( - 'listdir fetch_configs', api.path['checkout'].join('fetch_configs')) - if str(f).endswith('.py')) - - # config_util is a helper library, not a config. - fetch_configs.discard('config_util') - - # Try to run "fetch" for each of the configs. It's important to use - # the checkout under test. - with api.context( - env={'DEPOT_TOOLS_UPDATE': '0', 'CHROME_HEADLESS': '1'}, - env_prefixes={'PATH': [api.path['checkout']]}): - with api.step.defer_results(): - for config_name in sorted(fetch_configs): - # Create a dedicated temp directory. We want to test checking out - # from scratch. - temp_dir = api.path.mkdtemp('fetch_end_to_end_test_%s' % config_name) - - try: - with api.context(cwd=temp_dir): - api.python( - 'fetch %s' % config_name, - api.path['checkout'].join('fetch.py'), - [config_name]) - finally: - api.file.rmtree('cleanup', temp_dir) - - -def GenTests(api): - yield ( - api.test('basic') + - api.step_data('listdir fetch_configs', api.file.listdir( - ['depot_tools.py', 'infra.py'])) - )