From c21f78eac273eb4c45c4513b6c4125e63f717d03 Mon Sep 17 00:00:00 2001 From: Dana Dahlstrom Date: Tue, 30 Apr 2024 12:00:00 -0700 Subject: [PATCH] Move download_from_gcs to cobalt/tools This belongs to Cobalt; tools belongs to Chromium. Issue: 169056570 Reviewed-on: https://github.com/youtube/cobalt/pull/3114 --- .pre-commit-config.yaml | 3 +-- cobalt/media/testing/BUILD.gn | 2 +- cobalt/renderer/BUILD.gn | 2 +- {tools => cobalt/tools}/download_from_gcs.py | 0 {tools => cobalt/tools}/download_from_gcs_test.py | 2 +- .../tools}/testing/download_from_gcs/clang-format.sha1 | 0 .../testing/download_from_gcs/test_dir/clang-format.exe.sha1 | 0 .../testing/download_from_gcs/test_dir/clang-format.sha1 | 0 components/crx_file/BUILD.gn | 2 +- download_resources.py | 2 +- starboard/shared/starboard/player/BUILD.gn | 2 +- 11 files changed, 7 insertions(+), 8 deletions(-) rename {tools => cobalt/tools}/download_from_gcs.py (100%) rename {tools => cobalt/tools}/download_from_gcs_test.py (98%) rename {tools => cobalt/tools}/testing/download_from_gcs/clang-format.sha1 (100%) rename {tools => cobalt/tools}/testing/download_from_gcs/test_dir/clang-format.exe.sha1 (100%) rename {tools => cobalt/tools}/testing/download_from_gcs/test_dir/clang-format.sha1 (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 79b871fc3b58..c0093a3d3632 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,6 @@ files: | starboard| tools/metrics/actions/cobalt| tools/metrics/histograms/metadata/cobalt| - tools/testing| )/ | ^[^/]+$ # files in the root ) @@ -176,7 +175,7 @@ repos: pass_filenames: false always_run: true stages: [push] - args: [-m, unittest, tools/download_from_gcs_test.py] + args: [-m, unittest, cobalt/tools/download_from_gcs_test.py] - id: test-python3-compatibility name: Test Python 3 Compatibility description: Checks that scripts can be run in Python 3 diff --git a/cobalt/media/testing/BUILD.gn b/cobalt/media/testing/BUILD.gn index 0e0529c29690..49052ff3706e 100644 --- a/cobalt/media/testing/BUILD.gn +++ b/cobalt/media/testing/BUILD.gn @@ -17,7 +17,7 @@ import("//cobalt/media/testing/data/sha1_files.gni") action("cobalt_media_download_test_data") { install_content = true - script = "//tools/download_from_gcs.py" + script = "//cobalt/tools/download_from_gcs.py" sha_sources = [] foreach(sha1_file, sha1_files) { diff --git a/cobalt/renderer/BUILD.gn b/cobalt/renderer/BUILD.gn index e734036af6f5..140e187b46e8 100644 --- a/cobalt/renderer/BUILD.gn +++ b/cobalt/renderer/BUILD.gn @@ -502,7 +502,7 @@ copy("renderer_copy_lottie_test_data") { action("renderer_download_lottie_test_data") { install_content = true - script = "//tools/download_from_gcs.py" + script = "//cobalt/tools/download_from_gcs.py" inputs = [ "$_lottie_resource_path/finger_print-expected.png.sha1", diff --git a/tools/download_from_gcs.py b/cobalt/tools/download_from_gcs.py similarity index 100% rename from tools/download_from_gcs.py rename to cobalt/tools/download_from_gcs.py diff --git a/tools/download_from_gcs_test.py b/cobalt/tools/download_from_gcs_test.py similarity index 98% rename from tools/download_from_gcs_test.py rename to cobalt/tools/download_from_gcs_test.py index 6731305e84ac..120e77a0994a 100755 --- a/tools/download_from_gcs_test.py +++ b/cobalt/tools/download_from_gcs_test.py @@ -18,7 +18,7 @@ import tempfile import unittest -from tools import download_from_gcs +from cobalt.tools import download_from_gcs _BUCKET = 'chromium-clang-format' _HASH_FILE_EXT = '.sha1' diff --git a/tools/testing/download_from_gcs/clang-format.sha1 b/cobalt/tools/testing/download_from_gcs/clang-format.sha1 similarity index 100% rename from tools/testing/download_from_gcs/clang-format.sha1 rename to cobalt/tools/testing/download_from_gcs/clang-format.sha1 diff --git a/tools/testing/download_from_gcs/test_dir/clang-format.exe.sha1 b/cobalt/tools/testing/download_from_gcs/test_dir/clang-format.exe.sha1 similarity index 100% rename from tools/testing/download_from_gcs/test_dir/clang-format.exe.sha1 rename to cobalt/tools/testing/download_from_gcs/test_dir/clang-format.exe.sha1 diff --git a/tools/testing/download_from_gcs/test_dir/clang-format.sha1 b/cobalt/tools/testing/download_from_gcs/test_dir/clang-format.sha1 similarity index 100% rename from tools/testing/download_from_gcs/test_dir/clang-format.sha1 rename to cobalt/tools/testing/download_from_gcs/test_dir/clang-format.sha1 diff --git a/components/crx_file/BUILD.gn b/components/crx_file/BUILD.gn index 074de4c708a6..0614a146e2b5 100644 --- a/components/crx_file/BUILD.gn +++ b/components/crx_file/BUILD.gn @@ -35,7 +35,7 @@ if (is_starboard) { action("crx_file_download_test_data") { install_content = true - script = "//tools/download_from_gcs.py" + script = "//cobalt/tools/download_from_gcs.py" sha_sources = [] foreach(sha1_file, sha1_files) { diff --git a/download_resources.py b/download_resources.py index db26837815cc..3f5e6bdacbd5 100644 --- a/download_resources.py +++ b/download_resources.py @@ -22,7 +22,7 @@ except ImportError: import urllib2 as urllib -from tools import download_from_gcs +from cobalt.tools import download_from_gcs def DownloadGerritCommitMsgHook(force=False): diff --git a/starboard/shared/starboard/player/BUILD.gn b/starboard/shared/starboard/player/BUILD.gn index 46de5c9ecf40..25b786f71583 100644 --- a/starboard/shared/starboard/player/BUILD.gn +++ b/starboard/shared/starboard/player/BUILD.gn @@ -34,7 +34,7 @@ static_library("video_dmp") { action("player_download_test_data") { install_content = true - script = "//tools/download_from_gcs.py" + script = "//cobalt/tools/download_from_gcs.py" sha_sources = [] foreach(sha1_file, sha1_files) {