Chromium Code Reviews| Index: scripts/slave/test_env.py |
| diff --git a/scripts/slave/test_env.py b/scripts/slave/test_env.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..967c7f5d79bbc939f27a3e9982116e6d24ee5e23 |
| --- /dev/null |
| +++ b/scripts/slave/test_env.py |
| @@ -0,0 +1,20 @@ |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
M-A Ruel
2012/04/19 18:31:28
Can you put this and the tests into slave/unittest
csharp
2012/04/19 19:02:16
Done.
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Script to setup the environment to run unit tests. |
| + |
| +Modifies PYTHONPATH to automatically include parent, common and pylibs |
| +directories. |
| +""" |
| + |
| +import os |
| +import sys |
| + |
| +RUNTESTS_DIR = os.path.dirname(os.path.abspath(__file__)) |
| +BASE_DIR = os.path.abspath(os.path.join(RUNTESTS_DIR, '..', '..')) |
| +DEPOT_TOOLS = os.path.join(BASE_DIR, '..', 'depot_tools') |
| +sys.path.insert(0, RUNTESTS_DIR) |
| +sys.path.insert(0, os.path.join(RUNTESTS_DIR, '..')) |
| +sys.path.insert(0, BASE_DIR) |
| +sys.path.insert(0, DEPOT_TOOLS) |