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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py

Issue 2107993002: Add --auto-update flag which uploads committed CL and initiates the CQ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added unittest Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..de848fc28634cd66ceae0b0713a8fa04fc59dac5
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
@@ -0,0 +1,69 @@
+# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the following
+# disclaimer.
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials
+# provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
qyearsley 2016/07/06 22:13:29 This copyright notice isn't required for new files
+
+import unittest
+
+from webkitpy.w3c.deps_updater import DepsUpdater
+from webkitpy.common.host_mock import MockHost
+
+
+class DepsUpdaterTest(unittest.TestCase):
+
+ def test_parse_try_job_results(self):
+ output = """Successes:
+android_compile_dbg https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/90409
+cast_shell_android https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/90216
+cast_shell_linux http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/184862
+chromeos_x86-generic_chromium_compile_only_ng http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/161783
+chromium_presubmit http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/210938
+ios-device http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/29825
+ios-device-gn http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/30004
+linux_android_rel_ng https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/97103
+linux_chromium_asan_rel_ng http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/186393
+mac_chromium_compile_dbg_ng http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/228025
+win_chromium_rel_ng http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/248882
+Failures:
+android_arm64_dbg_recipe https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/90183
+android_clang_dbg_recipe https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/90470
+linux_chromium_rel_ng http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/255933
+mac_chromium_10.10_rel_ng http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_10.10_rel_ng/builds/106036
+win_chromium_rel_ng http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/248882
+win_chromium_x64_rel_ng http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/238748
+Started:
+chromeos_amd64-generic_chromium_compile_only_ng http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/161674
+chromeos_daisy_chromium_compile_only_ng http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/161832
+Total: 30 tryjobs
+"""
+ host = MockHost()
+ updater = DepsUpdater(host)
+ self.assertEqual(updater.parse_try_job_results(output), {'Successes': set(['cast_shell_android', 'mac_chromium_compile_dbg_ng', 'ios-device-gn',
+ 'android_compile_dbg', 'win_chromium_rel_ng', 'cast_shell_linux', 'ios-device',
+ 'chromeos_x86-generic_chromium_compile_only_ng', 'chromium_presubmit',
+ 'linux_chromium_asan_rel_ng', 'linux_android_rel_ng']),
+ 'Failures': set(['win_chromium_x64_rel_ng', 'android_arm64_dbg_recipe',
+ 'android_clang_dbg_recipe', 'mac_chromium_10.10_rel_ng', 'linux_chromium_rel_ng']),
+ 'Started': set(['chromeos_amd64-generic_chromium_compile_only_ng', 'chromeos_daisy_chromium_compile_only_ng'])})
qyearsley 2016/07/06 22:13:29 It might be easier to read the test if the test ex

Powered by Google App Engine
This is Rietveld 408576698