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

Unified Diff: build/android/pylib/junit/test_runner.py

Issue 942083003: Add a custom Robolectric testrunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: build/android/pylib/junit/test_runner.py
diff --git a/build/android/pylib/junit/test_runner.py b/build/android/pylib/junit/test_runner.py
index 35ac666fae887bc82c257893872a730cf5567b2c..b4e32422d5eda1e5a0c1a42c5f5c81c3d9308102 100644
--- a/build/android/pylib/junit/test_runner.py
+++ b/build/android/pylib/junit/test_runner.py
@@ -22,9 +22,14 @@ class JavaTestRunner(object):
def RunTest(self, _test):
"""Runs junit tests from |self._test_suite|."""
- command = ['java',
+ # Specifies where robolectric runtime dependencies are.
+ java_args = ('-Drobolectric.dependency.dir=%s' %
jbudorick 2015/02/27 15:12:48 Why isn't this just in the command list assignment
mikecase (-- gone --) 2015/03/02 19:08:38 This option, -Drobolectric.dependency.dir, needs t
+ os.path.join(constants.GetOutDirectory(), 'lib.java'))
+
+ command = ['java', java_args,
'-jar', os.path.join(constants.GetOutDirectory(), 'lib.java',
'%s.jar' % self._test_suite)]
+
if self._test_filter:
command.extend(['-gtest-filter', self._test_filter])
if self._package_filter:

Powered by Google App Engine
This is Rietveld 408576698