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

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance_test.py

Issue 2268193002: Add new Android JUnit Instrumentation Skip code to python script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder imports Created 4 years, 4 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
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/instrumentation_test_instance_test.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
index 666e89239897dadfba8156fe4ee80925f1062192..f74b6e13888bd98072dfd72177f5bcdb279c60c1 100755
--- a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
@@ -7,8 +7,12 @@
# pylint: disable=protected-access
+import os
+import sys
import unittest
+sys.path.append(os.path.abspath(
+ os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)))
jbudorick 2016/08/24 20:33:07 nit: You shouldn't need to add this.
the real yoland 2016/08/26 19:53:12 Done
from pylib.base import base_test_result
from pylib.constants import host_paths
from pylib.instrumentation import instrumentation_test_instance
@@ -599,6 +603,23 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
self.assertEqual(base_test_result.ResultType.FAIL, results[0].GetType())
self.assertEqual(stacktrace, results[0].GetLog())
+ def testGenerateJUnitTestResults_testSkipped_true(self):
+ statuses = [
+ (1, {
+ 'class': 'test.package.TestClass',
+ 'test': 'testMethod',
+ }),
+ (-3, {
+ 'class': 'test.package.TestClass',
+ 'test': 'testMethod',
+ }),
+ ]
+ results = instrumentation_test_instance.GenerateTestResults(
+ None, None, statuses, 0, 1000)
+ self.assertEqual(1, len(results))
+ self.assertEqual(base_test_result.ResultType.SKIP, results[0].GetType())
+
+
if __name__ == '__main__':
unittest.main(verbosity=2)
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698