Skip to content

Commit 69c1282

Browse files
committed
Travis uses <M42 Chrome with the setuid sandbox.
Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
1 parent f30e4be commit 69c1282

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/chromium/script.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,21 @@ class bcolors:
2525
UNDERLINE = '\033[4m'
2626

2727

28+
chromeOps = webdriver.ChromeOptions()
29+
chromeOps.add_extension(sys.argv[1])
30+
2831
if sys.platform.startswith("linux"):
2932
chromedriver_path = "/usr/lib/chromium-browser/chromedriver"
3033
elif 'TRAVIS' in os.environ:
3134
# For TravisCI, we manually copy chromedriver to the local path.
3235
chromedriver_path = os.path.abspath("test/chromium/chromedriver")
33-
else:
34-
chromedriver_path = "chromedriver" # Let's just hope it's in the user's path.
3536

37+
# Travis has setuid restrictions. I think this becomes unnecessary in M42+
38+
chromeOps.add_argument('--no-suid-sandbox')
39+
else:
40+
# Let's hope it's in the user's path.
41+
chromedriver_path = "chromedriver"
3642

37-
chromeOps = webdriver.ChromeOptions()
38-
chromeOps.add_extension(sys.argv[1])
3943

4044
try:
4145
# First argument is optional, if not specified will search path.

0 commit comments

Comments
 (0)