From ce6e614097a56bda5ebf412c62dea5678ad74603 Mon Sep 17 00:00:00 2001 From: Dhananjay Nakrani Date: Sun, 6 Sep 2015 14:57:24 -0700 Subject: [PATCH] Execute `mach build` from servo's root directory. --- slave/build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/slave/build.py b/slave/build.py index ddb0a79..360fbf6 100644 --- a/slave/build.py +++ b/slave/build.py @@ -258,8 +258,16 @@ class ServoBuilder(Builder): return os.path.join(self.objdir(), 'release', 'servo') def make(self): - args = [os.path.join('.', self.folder, 'mach'), 'build' ,'--release'] - Run(args, self.env.get()) + # Remember cwd + cwd = os.getcwd() + # cd into servo's root directory. Requirement of 'mach build' + os.chdir(self.folder) + try: + args = [os.path.join('.', 'mach'), 'build' ,'--release'] + Run(args, self.env.get()) + finally: + # Go back to the cwd + os.chdir(cwd) def getBuilder(config, path): # fingerprint the known builders