From 24db179bbf20e75d07827567c5acd9bbf1ae0f98 Mon Sep 17 00:00:00 2001 From: Henrik Kjellander Date: Thu, 15 Dec 2016 10:20:10 +0100 Subject: [PATCH] Move tools/autoroller to tools-webrtc/ + rename script The script is now capable of rolling more than the chromium_revision so the name should reflect that. BUG=webrtc:5006 TBR=charujain@webrtc.org Review-Url: https://codereview.webrtc.org/2581493003 . Cr-Commit-Position: refs/heads/master@{#15624} --- PRESUBMIT.py | 2 +- .../autoroller/roll_deps.py | 2 +- .../autoroller/unittests/roll_deps_test.py | 13 ++++++------- .../autoroller/unittests/testdata/DEPS | 0 .../autoroller/unittests/testdata/DEPS.chromium.new | 0 .../autoroller/unittests/testdata/DEPS.chromium.old | 0 6 files changed, 8 insertions(+), 9 deletions(-) rename tools/autoroller/roll_chromium_revision.py => tools-webrtc/autoroller/roll_deps.py (99%) rename tools/autoroller/unittests/roll_chromium_revision_test.py => tools-webrtc/autoroller/unittests/roll_deps_test.py (93%) rename {tools => tools-webrtc}/autoroller/unittests/testdata/DEPS (100%) rename {tools => tools-webrtc}/autoroller/unittests/testdata/DEPS.chromium.new (100%) rename {tools => tools-webrtc}/autoroller/unittests/testdata/DEPS.chromium.old (100%) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index e05ac75a47..05297dc865 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -405,7 +405,7 @@ def _RunPythonTests(input_api, output_api): return input_api.os_path.join(input_api.PresubmitLocalPath(), *args) test_directories = [ - join('tools', 'autoroller', 'unittests'), + join('tools-webrtc', 'autoroller', 'unittests'), join('webrtc', 'tools', 'py_event_log_analyzer'), ] diff --git a/tools/autoroller/roll_chromium_revision.py b/tools-webrtc/autoroller/roll_deps.py similarity index 99% rename from tools/autoroller/roll_chromium_revision.py rename to tools-webrtc/autoroller/roll_deps.py index 85cbbe9d36..1bfcaee701 100755 --- a/tools/autoroller/roll_chromium_revision.py +++ b/tools-webrtc/autoroller/roll_deps.py @@ -7,7 +7,7 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. -"""Script to roll chromium_revision in the WebRTC DEPS file.""" +"""Script to automatically roll dependencies in the WebRTC DEPS file.""" import argparse import base64 diff --git a/tools/autoroller/unittests/roll_chromium_revision_test.py b/tools-webrtc/autoroller/unittests/roll_deps_test.py similarity index 93% rename from tools/autoroller/unittests/roll_chromium_revision_test.py rename to tools-webrtc/autoroller/unittests/roll_deps_test.py index d7b3e26bde..20772d9d7f 100755 --- a/tools/autoroller/unittests/roll_chromium_revision_test.py +++ b/tools-webrtc/autoroller/unittests/roll_deps_test.py @@ -18,10 +18,9 @@ import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.join(SCRIPT_DIR, os.pardir) sys.path.append(PARENT_DIR) -import roll_chromium_revision -from roll_chromium_revision import CalculateChangedDepsProper, \ - GetMatchingDepsEntries, ParseDepsDict, \ - ParseLocalDepsFile, UpdateDepsFile +import roll_deps +from roll_deps import CalculateChangedDepsProper, GetMatchingDepsEntries, \ + ParseDepsDict, ParseLocalDepsFile, UpdateDepsFile TEST_DATA_VARS = { @@ -75,13 +74,13 @@ class TestRollChromiumRevision(unittest.TestCase): self._new_cr_depsfile = os.path.join(self._output_dir, 'DEPS.chromium.new') self.fake = FakeCmd() - self.old_RunCommand = getattr(roll_chromium_revision, '_RunCommand') - setattr(roll_chromium_revision, '_RunCommand', self.fake) + self.old_RunCommand = getattr(roll_deps, '_RunCommand') + setattr(roll_deps, '_RunCommand', self.fake) def tearDown(self): shutil.rmtree(self._output_dir, ignore_errors=True) self.assertEqual(self.fake.expectations, []) - setattr(roll_chromium_revision, '_RunCommand', self.old_RunCommand) + setattr(roll_deps, '_RunCommand', self.old_RunCommand) def testUpdateDepsFile(self): new_rev = 'aaaaabbbbbcccccdddddeeeeefffff0000011111' diff --git a/tools/autoroller/unittests/testdata/DEPS b/tools-webrtc/autoroller/unittests/testdata/DEPS similarity index 100% rename from tools/autoroller/unittests/testdata/DEPS rename to tools-webrtc/autoroller/unittests/testdata/DEPS diff --git a/tools/autoroller/unittests/testdata/DEPS.chromium.new b/tools-webrtc/autoroller/unittests/testdata/DEPS.chromium.new similarity index 100% rename from tools/autoroller/unittests/testdata/DEPS.chromium.new rename to tools-webrtc/autoroller/unittests/testdata/DEPS.chromium.new diff --git a/tools/autoroller/unittests/testdata/DEPS.chromium.old b/tools-webrtc/autoroller/unittests/testdata/DEPS.chromium.old similarity index 100% rename from tools/autoroller/unittests/testdata/DEPS.chromium.old rename to tools-webrtc/autoroller/unittests/testdata/DEPS.chromium.old