Skip to content

Commit

Permalink
Merge pull request grpc#4054 from jtattermusch/port_server_cwd_elsewhere
Browse files Browse the repository at this point in the history
Put cwd of port server elsewhere
  • Loading branch information
ctiller committed Nov 6, 2015
2 parents c8bd16b + 3bd0827 commit 31ee320
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/run_tests/port_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# 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':
Expand Down
10 changes: 8 additions & 2 deletions tools/run_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 31ee320

Please sign in to comment.