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

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

Issue 2003213002: Made junit coverage-dir take directory, not file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 7 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 | « no previous file | no next file » | 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
index a97841264dfaf13e314bdd553e5dda3226cc610b..9a60c12a991abd28ed2514689a7aa394c0c9ed2e 100644
--- a/build/android/pylib/junit/test_runner.py
+++ b/build/android/pylib/junit/test_runner.py
@@ -47,7 +47,12 @@ class JavaTestRunner(object):
# Add JVM arguments.
jvm_args = []
if self._coverage_dir:
- jvm_args.append('-Demma.coverage.out.file=%s' % self._coverage_dir)
+ if not os.path.exists(self._coverage_dir):
+ os.makedirs(self._coverage_dir)
+ elif not os.path.isdir(self._coverage_dir):
+ raise Exception('--coverage-dir takes a directory, not file path.')
+ jvm_args.append('-Demma.coverage.out.file=%s' % os.path.join(
+ self._coverage_dir, '%s.ec' % self._test_suite))
if jvm_args:
command.extend(['--jvm-args', '"%s"' % ' '.join(jvm_args)])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698