summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authordbeam <dbeam@chromium.org>2015-05-04 17:14:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 00:14:23 +0000
commit6e328d40cc4958a5f989a794ceb5ecf4f208cc9d (patch)
tree9409a5e246133a97789338f28d510c208b5520a3 /third_party
parent4bf6435cebca5218ab9901e281b701a5e11511c3 (diff)
downloadchromium_src-6e328d40cc4958a5f989a794ceb5ecf4f208cc9d.zip
chromium_src-6e328d40cc4958a5f989a794ceb5ecf4f208cc9d.tar.gz
chromium_src-6e328d40cc4958a5f989a794ceb5ecf4f208cc9d.tar.bz2
Ensure . is on PYTHONPATH on bots for closure pass tests.
R=tbreisacher@chromium.org BUG=393873 NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1118223003 Cr-Commit-Position: refs/heads/master@{#328228}
Diffstat (limited to 'third_party')
-rwxr-xr-xthird_party/closure_compiler/compiler_customization_test.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/closure_compiler/compiler_customization_test.py b/third_party/closure_compiler/compiler_customization_test.py
index ead5b2e..f7e5658 100755
--- a/third_party/closure_compiler/compiler_customization_test.py
+++ b/third_party/closure_compiler/compiler_customization_test.py
@@ -4,12 +4,15 @@
# found in the LICENSE file.
import os
+from sys import path as sys_path
import unittest
+SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
+sys_path.insert(0, SCRIPT_PATH)
+
from checker import Checker
from processor import FileCache, Processor
-
ASSERT_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js",
"assert.js")
CR_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js", "cr.js")
@@ -18,8 +21,7 @@ UI_FILE = os.path.join("..", "..", "ui", "webui", "resources", "js", "cr",
def rel_to_abs(rel_path):
- script_path = os.path.dirname(os.path.abspath(__file__))
- return os.path.join(script_path, rel_path)
+ return os.path.join(SCRIPT_PATH, rel_path)
class CompilerCustomizationTest(unittest.TestCase):