Skip to content
Snippets Groups Projects
Commit 2d337ca8 authored by Nathan Wilcox's avatar Nathan Wilcox
Browse files

DEV-44838 - See if buildconsole is confused by having the absolute path (with...

DEV-44838 - See if buildconsole is confused by having the absolute path (with spaces) in the commandline.  To accomplish this we put relative paths in the command string but lookup the absolute path for the executable parameter.
parent 33df0692
No related branches found
No related tags found
No related merge requests found
...@@ -574,7 +574,7 @@ def get_build_cmd(self): ...@@ -574,7 +574,7 @@ def get_build_cmd(self):
if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]: if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]:
config = '\"%s|Win32\"' % config config = '\"%s|Win32\"' % config
executable = self.find_in_path('buildconsole')[0] executable = 'buildconsole'
cmd = "%(bin)s %(prj)s.sln /build /cfg=%(cfg)s" % {'prj': self.project_name, 'cfg': config, 'bin': executable} cmd = "%(bin)s %(prj)s.sln /build /cfg=%(cfg)s" % {'prj': self.project_name, 'cfg': config, 'bin': executable}
return (executable, cmd) return (executable, cmd)
...@@ -587,18 +587,17 @@ def get_build_cmd(self): ...@@ -587,18 +587,17 @@ def get_build_cmd(self):
def run(self, command, name=None, retry_on=None, retries=1): def run(self, command, name=None, retry_on=None, retries=1):
'''Run a program. If the program fails, raise an exception.''' '''Run a program. If the program fails, raise an exception.'''
assert name is not None, 'On windows an executable path must be given in name.' assert name is not None, 'On windows an executable path must be given in name.'
if not os.path.isfile(name): if os.path.isfile(name):
name = self.find_in_path(name)[0] path = name
else:
path = self.find_in_path(name)[0]
while retries: while retries:
retries = retries - 1 retries = retries - 1
print "develop.py tries to run:", command print "develop.py tries to run:", command
ret = subprocess.call(command, executable=name) ret = subprocess.call(command, executable=path)
print "got ret", ret, "from", command print "got ret", ret, "from", command
if ret: if ret:
if not name: error = 'exited with status %d' % ret
error = 'was not found'
else:
error = 'exited with status %d' % ret
if retry_on is not None and retry_on == ret: if retry_on is not None and retry_on == ret:
print "Retrying... the command %r %s" % (name, error) print "Retrying... the command %r %s" % (name, error)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment