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

Unified Diff: mojo/tools/mopy/mojo_python_tests_runner.py

Issue 707893005: Add mojo/tools/mopy with paths and version utilities (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: mojo/tools/mopy/mojo_python_tests_runner.py
diff --git a/mojo/tools/pylib/mojo_python_tests_runner.py b/mojo/tools/mopy/mojo_python_tests_runner.py
similarity index 84%
copy from mojo/tools/pylib/mojo_python_tests_runner.py
copy to mojo/tools/mopy/mojo_python_tests_runner.py
index 3d52f1df5abf9a16dd4bb51ebbb910f06e581993..ef9a6b2b318b07fe438a8bea7ceddb3ed3430e1c 100644
--- a/mojo/tools/pylib/mojo_python_tests_runner.py
+++ b/mojo/tools/mopy/mojo_python_tests_runner.py
@@ -7,6 +7,8 @@ import os
import sys
import unittest
+import mopy.paths
+
class MojoPythonTestRunner(object):
"""Helper class to run python tests on the bots."""
@@ -23,15 +25,11 @@ class MojoPythonTestRunner(object):
args = parser.parse_args()
self.apply_customization(args)
- root_src_dir = os.path.join(os.path.dirname(__file__),
- os.pardir,
- os.pardir,
- os.pardir)
-
loader = unittest.loader.TestLoader()
print "Running Python unit tests under %s..." % self._test_dir
- pylib_dir = os.path.abspath(os.path.join(root_src_dir, self._test_dir))
+ src_root = mopy.paths.Paths().src_root
+ pylib_dir = os.path.abspath(os.path.join(src_root, self._test_dir))
if args.tests:
if pylib_dir not in sys.path:
sys.path.append(pylib_dir)
« no previous file with comments | « mojo/tools/mopy/__init__.py ('k') | mojo/tools/mopy/paths.py » ('j') | mojo/tools/mopy/paths.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698