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

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

Issue 566643002: [Android] JUnit test runner changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deps-changes
Patch Set: rebase + fresh CQ Created 6 years, 3 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/junit/test_dispatcher.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..d0803ea43e7fcb3682e29ce5c7737a059598ac4b
--- /dev/null
+++ b/build/android/pylib/junit/test_runner.py
@@ -0,0 +1,40 @@
+# 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 os
+
+from pylib import cmd_helper
+from pylib import constants
+
+class JavaTestRunner(object):
+ """Runs java tests on the host."""
+
+ def __init__(self, options):
+ self._package_filter = options.package_filter
+ self._runner_filter = options.runner_filter
+ self._sdk_version = options.sdk_version
+ self._test_filter = options.test_filter
+ self._test_suite = options.test_suite
+
+ def SetUp(self):
+ pass
+
+ def RunTest(self, _test):
+ """Runs junit tests from |self._test_suite|."""
+ command = ['java',
+ '-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:
+ command.extend(['-package-filter', self._package_filter])
+ if self._runner_filter:
+ command.extend(['-runner-filter', self._runner_filter])
+ if self._sdk_version:
+ command.extend(['-sdk-version', self._sdk_version])
+ return cmd_helper.RunCmd(command)
+
+ def TearDown(self):
+ pass
+
« no previous file with comments | « build/android/pylib/junit/test_dispatcher.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698