From 34bd39d5ca100f9417423cedc6d0228af73acd35 Mon Sep 17 00:00:00 2001 From: dpranke Date: Tue, 23 Jun 2015 19:36:52 -0700 Subject: [PATCH] Fix various windows-isms in the MB gen code paths. We needed to handle windows-style path separators properly, and handle the fact that binaries have ".exe" in their names. R=maruel@chromium.org BUG=480053 Review URL: https://codereview.chromium.org/1204863002 Cr-Commit-Position: refs/heads/master@{#335859} --- tools/mb/mb.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/mb/mb.py b/tools/mb/mb.py index 35c0e9124fd6..7f9aab69fa61 100755 --- a/tools/mb/mb.py +++ b/tools/mb/mb.py @@ -350,7 +350,10 @@ class MetaBuildWrapper(object): ret, _, _ = self.Run(cmd) for target in swarming_targets: - deps_path = self.ToAbsPath(path, target + '.runtime_deps') + if sys.platform == 'win32': + deps_path = self.ToAbsPath(path, target + '.exe.runtime_deps') + else: + deps_path = self.ToAbsPath(path, target + '.runtime_deps') if not self.Exists(deps_path): raise MBErr('did not generate %s' % deps_path) @@ -372,9 +375,9 @@ class MetaBuildWrapper(object): { 'args': [ '--isolated', - self.ToSrcRelPath('%s/%s.isolated' % (path, target)), + self.ToSrcRelPath('%s%s%s.isolated' % (path, os.sep, target)), '--isolate', - self.ToSrcRelPath('%s/%s.isolate' % (path, target)), + self.ToSrcRelPath('%s%s%s.isolate' % (path, os.sep, target)), ], 'dir': self.chromium_src_dir, 'version': 1, @@ -557,7 +560,7 @@ class MetaBuildWrapper(object): """Returns a relative path from the top of the repo.""" # TODO: Support normal paths in addition to source-absolute paths. assert(path.startswith('//')) - return path[2:] + return path[2:].replace('/', os.sep) def ParseGYPConfigPath(self, path): rpath = self.ToSrcRelPath(path) -- 2.11.4.GIT