Commit 30a0d4c9 authored by jln@chromium.org's avatar jln@chromium.org

NaCl: have browser_tester set-up the sandbox environment

On Linux, the setuid sandbox needs to be set in the environment.
Fix browser_tester to make use of the test_env script that
sets up the sandbox.

BUG=249900
R=mseaborn@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207950 0039d316-1c4b-4281-b951-d872f2087c98
parent 10065941
...@@ -16,6 +16,7 @@ import urllib ...@@ -16,6 +16,7 @@ import urllib
script_dir = os.path.dirname(os.path.abspath(__file__)) script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(script_dir, '../../../../third_party/')) sys.path.append(os.path.join(script_dir, '../../../../third_party/'))
sys.path.append(os.path.join(script_dir, '../../../../tools/valgrind/')) sys.path.append(os.path.join(script_dir, '../../../../tools/valgrind/'))
sys.path.append(os.path.join(script_dir, '../../../../testing/'))
import browsertester.browserlauncher import browsertester.browserlauncher
import browsertester.rpclistener import browsertester.rpclistener
...@@ -24,6 +25,8 @@ import browsertester.server ...@@ -24,6 +25,8 @@ import browsertester.server
import memcheck_analyze import memcheck_analyze
import tsan_analyze import tsan_analyze
import test_env
def BuildArgParser(): def BuildArgParser():
usage = 'usage: %prog [options]' usage = 'usage: %prog [options]'
parser = optparse.OptionParser(usage) parser = optparse.OptionParser(usage)
...@@ -197,6 +200,9 @@ def RunTestsOnce(url, options): ...@@ -197,6 +200,9 @@ def RunTestsOnce(url, options):
options.files.append(os.path.join(script_dir, 'browserdata', 'nacltest.js')) options.files.append(os.path.join(script_dir, 'browserdata', 'nacltest.js'))
# Setup the environment with the setuid sandbox path.
test_env.enable_sandbox_if_required(os.environ)
# Create server # Create server
host = GetHostName() host = GetHostName()
try: try:
......
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