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

Unified Diff: chrome/test/chromedriver/test_environment.py

Issue 14130017: [chromedriver] Add option to relaunch the test harness after each java test for debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nits Created 7 years, 8 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 | « chrome/test/chromedriver/run_java_tests.py ('k') | chrome/test/chromedriver/test_expectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test_environment.py
diff --git a/chrome/test/chromedriver/test_environment.py b/chrome/test/chromedriver/test_environment.py
index e56b519c506a93851bf74eb2b4a3cb460cfdfb52..4cbc1ab9369650c7f8e761d7cb98bd0b5c681efc 100644
--- a/chrome/test/chromedriver/test_environment.py
+++ b/chrome/test/chromedriver/test_environment.py
@@ -42,6 +42,10 @@ class BaseTestEnvironment(object):
"""
self._chrome_version = chrome_version
+ def GetOS(self):
+ """Name of the OS."""
+ raise NotImplementedError
+
def GlobalSetUp(self):
"""Sets up the global test environment state."""
pass
@@ -51,21 +55,32 @@ class BaseTestEnvironment(object):
pass
def GetPassedJavaTestFilter(self):
- """Returns the test filter for running all passing tests.
+ """Get the test filter for running all passing tests.
Returns:
Filter string, in Google Test (C++) format.
"""
- raise NotImplementedError
+ return _EXPECTATIONS['GetPassedJavaTestFilter'](
+ 'android', self._chrome_version)
+
+ def GetPassedJavaTests(self):
+ """Get the list of passed java tests.
+
+ Returns:
+ List of passed test names.
+ """
+ with open(os.path.join(_THIS_DIR, 'java_tests.txt'), 'r') as f:
+ return _EXPECTATIONS['ApplyJavaTestFilter'](
+ 'android', self._chrome_version,
+ [t.strip('\n') for t in f.readlines()])
class DesktopTestEnvironment(BaseTestEnvironment):
"""Manages the environment java tests require to run on Desktop."""
#override
- def GetPassedJavaTestFilter(self):
- return _EXPECTATIONS['GetPassedJavaTestFilter'](
- util.GetPlatformName(), self._chrome_version)
+ def GetOS(self):
+ return util.GetPlatformName()
class AndroidTestEnvironment(DesktopTestEnvironment):
@@ -95,6 +110,5 @@ class AndroidTestEnvironment(DesktopTestEnvironment):
self._forwarder.Close()
#override
- def GetPassedJavaTestFilter(self):
- return _EXPECTATIONS['GetPassedJavaTestFilter'](
- 'android', self._chrome_version)
+ def GetOS(self):
+ return 'android'
« no previous file with comments | « chrome/test/chromedriver/run_java_tests.py ('k') | chrome/test/chromedriver/test_expectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698