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

Unified Diff: Tools/AutoSheriff/reasons_unittest.py

Issue 398823008: WIP: Add auto-sheriff.appspot.com code to Blink Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Tools/AutoSheriff/reasons_unittest.py
diff --git a/Tools/AutoSheriff/reasons_unittest.py b/Tools/AutoSheriff/reasons_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..a02e8c2ca4eba3dcea00b482c0f4886c0918bb84
--- /dev/null
+++ b/Tools/AutoSheriff/reasons_unittest.py
@@ -0,0 +1,25 @@
+# Copyright 2014 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.
+
+import unittest
+import reasons
+
+
+class JUnitSplitterTest(unittest.TestCase):
+ def test_failed_tests_from_stdio(self):
+ splitter = reasons.JUnitSplitter()
+ stdio = """
+C 367.973s Main [ FAILED ] 14 tests, listed below:
+C 367.973s Main [ FAILED ] org.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest#testCalledForUnsupportedSchemes
+C 59.798s Main [ FAILED ] org.chromium.mojo.system.impl.CoreImplTest#testAsyncWaiterWaitingOnDefaultInvalidHandle (CRASHED)
+"""
+ expected = [
+ 'org.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest#testCalledForUnsupportedSchemes',
+ 'org.chromium.mojo.system.impl.CoreImplTest#testAsyncWaiterWaitingOnDefaultInvalidHandle',
+ ]
+ self.assertEquals(splitter.failed_tests_from_stdio(stdio), expected)
+
+
+if __name__ == '__main__':
+ unittest.main()

Powered by Google App Engine
This is Rietveld 408576698