Commit ba584cf7 by Dirk Pranke Committed by Commit Bot

Fix import paths for //scripts/run_gtest_angle_test.py.

We added run_gtest_angle_test.py in a86c8547, but didn't actually check that it worked :(. This CL adds the missing sys.path imports needed to find the rest of the Chromium test script modules. Bug: chromium:816629, angleproject:3162 Change-Id: I4c381bda334df4d2e648aab65ca4cc0310d840bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2283694Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Dirk Pranke <dpranke@google.com>
parent 69fa4d23
...@@ -21,8 +21,6 @@ of tests. This list is parsed by this harness and sent down via the ...@@ -21,8 +21,6 @@ of tests. This list is parsed by this harness and sent down via the
This script is intended to be the base command invoked by the isolate, This script is intended to be the base command invoked by the isolate,
followed by a subsequent non-python executable. For a similar script see followed by a subsequent non-python executable. For a similar script see
run_performance_test.py. run_performance_test.py.
# TODO(jmadill): Move this into the ANGLE repo. http://anglebug.com/3162
""" """
import argparse import argparse
...@@ -33,16 +31,21 @@ import sys ...@@ -33,16 +31,21 @@ import sys
import tempfile import tempfile
import traceback import traceback
import common # Add //src/testing into sys.path for importing xvfb and test_env, and
# //src/testing/scripts for importing common.
d = os.path.dirname
THIS_DIR = d(os.path.abspath(__file__))
CHROMIUM_SRC_DIR = d(d(d(THIS_DIR)))
sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing'))
sys.path.insert(0, os.path.join(CHROMIUM_SRC_DIR, 'testing', 'scripts'))
# Add src/testing/ into sys.path for importing xvfb and test_env. import common
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import xvfb import xvfb
import test_env import test_env
# Unfortunately we need to copy these variables from ../test_env.py. # Unfortunately we need to copy these variables from
# Importing it and using its get_sandbox_env breaks test runs on Linux # //src/testing/scripts/test_env.py. Importing it and using its
# (it seems to unset DISPLAY). # get_sandbox_env breaks test runs on Linux (it seems to unset DISPLAY).
CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX'
CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox'
......
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