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() |