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

Unified Diff: testing/scripts/run_telemetry_benchmark_as_googletest.py

Issue 1507723003: Set CHROME_DEVEL_SANDBOX environment variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/scripts/run_telemetry_benchmark_as_googletest.py
diff --git a/testing/scripts/run_telemetry_benchmark_as_googletest.py b/testing/scripts/run_telemetry_benchmark_as_googletest.py
index c232bef5ffd4d992bcd905a743f76abeb50b700b..571542224c74de34dac38d707b34cccbc822ff3b 100755
--- a/testing/scripts/run_telemetry_benchmark_as_googletest.py
+++ b/testing/scripts/run_telemetry_benchmark_as_googletest.py
@@ -33,6 +33,11 @@ import common
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import xvfb
+# Unfortunately we need to copy these variables from ../test_env.py.
+# Importing it and using its get_sandbox_env breaks test runs on Linux
+# (it seems to unset DISPLAY).
+CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX'
+CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox'
def main():
parser = argparse.ArgumentParser()
@@ -44,6 +49,10 @@ def main():
xvfb_proc = None
openbox_proc = None
env = os.environ.copy()
+ # Assume we want to set up the sandbox environment variables all the
+ # time; doing so is harmless on non-Linux platforms and is needed
+ # all the time on Linux.
+ env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH
if args.xvfb and xvfb.should_start_xvfb(env):
xvfb_proc, openbox_proc = xvfb.start_xvfb(env=env, build_dir='.')
assert xvfb_proc and openbox_proc, 'Failed to start xvfb'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698