Merge pull request #4054 from jtattermusch/port_server_cwd_elsewhere

Put cwd of port server elsewhere
pull/4090/head
Craig Tiller 9 years ago
commit 31ee320bc9
  1. 2
      tools/run_tests/port_server.py
  2. 10
      tools/run_tests/run_tests.py

@ -42,7 +42,7 @@ import time
# increment this number whenever making a change to ensure that
# the changes are picked up by running CI servers
# note that all changes must be backwards compatible
_MY_VERSION = 5
_MY_VERSION = 7
if len(sys.argv) == 2 and sys.argv[1] == 'dump_version':

@ -744,7 +744,8 @@ def _start_port_server(port_server_port):
running = False
if running:
current_version = int(subprocess.check_output(
[sys.executable, 'tools/run_tests/port_server.py', 'dump_version']))
[sys.executable, os.path.abspath('tools/run_tests/port_server.py'),
'dump_version']))
print 'my port server is version %d' % current_version
running = (version >= current_version)
if not running:
@ -755,13 +756,18 @@ def _start_port_server(port_server_port):
fd, logfile = tempfile.mkstemp()
os.close(fd)
print 'starting port_server, with log file %s' % logfile
args = [sys.executable, 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port, '-l', logfile]
args = [sys.executable, os.path.abspath('tools/run_tests/port_server.py'),
'-p', '%d' % port_server_port, '-l', logfile]
env = dict(os.environ)
env['BUILD_ID'] = 'pleaseDontKillMeJenkins'
if platform.system() == 'Windows':
# Working directory of port server needs to be outside of Jenkins
# workspace to prevent file lock issues.
tempdir = tempfile.mkdtemp()
port_server = subprocess.Popen(
args,
env=env,
cwd=tempdir,
creationflags = 0x00000008, # detached process
close_fds=True)
else:

Loading…
Cancel
Save