Commit e2daee3f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use ~/.Xauthority in debug mode.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26600 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6b257e2
......@@ -3,6 +3,7 @@ import os
import re
import signal
import sys
import shutil
import getopt
from time import sleep
import urllib2
......@@ -192,11 +193,16 @@ user_pref("capability.principal.codebase.p1.subjectName", "");""" % \
pref_file.close()
def runFirefox():
os.environ['MOZ_NO_REMOTE'] = '1'
if not debug:
prepareFirefox()
if debug:
try:
shutil.copy2(os.path.expanduser('~/.Xauthority'), '%s/.Xauthority' % profile_dir)
except IOError:
pass
else:
os.environ['DISPLAY'] = ':123'
os.environ['MOZ_NO_REMOTE'] = '1'
os.environ['HOME'] = profile_dir
prepareFirefox()
# check if old zelenium or new zelenium
try:
urllib2.urlopen("%s/portal_tests/core/scripts/selenium-version.js" % portal_url)
......
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