Commit e16a8443 authored by qsr's avatar qsr Committed by Commit bot

mojo: Add isolate test for python bindings test

R=yzshen@chromium.org

Review URL: https://codereview.chromium.org/571373002

Cr-Commit-Position: refs/heads/master@{#295093}
parent 9235f2ea
......@@ -624,5 +624,24 @@
},
],
}],
['component!="shared_library" and OS=="linux" and test_isolation_mode!="noop"', {
'targets': [
{
'target_name': 'mojo_python_unittests_run',
'type': 'none',
'dependencies': [
'mojo_python',
'mojo_base.gyp:mojo_public_test_interfaces',
],
'includes': [
'../build/isolate.gypi',
'mojo_python_unittests.isolate',
],
'sources': [
'mojo_python_unittests.isolate',
],
},
],
}],
],
}
# 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.
{
'conditions': [
['OS=="linux"', {
'variables': {
'command': [
'tools/run_mojo_python_bindings_tests.py',
'--build-dir=<(PRODUCT_DIR)',
],
'isolate_dependency_tracked': [
'tools/pylib/mojo_python_tests_runner.py',
'tools/run_mojo_python_bindings_tests.py',
],
'isolate_dependency_untracked': [
'python/tests/',
'<(PRODUCT_DIR)/gen/mojo/public/interfaces/bindings/tests/',
'<(PRODUCT_DIR)/python/',
],
},
}],
],
}
......@@ -51,7 +51,7 @@ class MojoPythonTestRunner(object):
loader = unittest.loader.TestLoader()
print "Running Python unit tests under %s..." % self._test_dir
pylib_dir = os.path.join(chromium_src_dir, self._test_dir)
pylib_dir = os.path.abspath(os.path.join(chromium_src_dir, self._test_dir))
if args.tests:
if pylib_dir not in sys.path:
sys.path.append(pylib_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment