Lines Matching full:path
43 CHROMIUM_SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(
44 os.path.abspath(__file__))))
45 sys.path = [os.path.join(CHROMIUM_SRC_DIR, 'build')] + sys.path
83 self.default_config = os.path.join(self.chromium_src_dir, 'infra', 'mb',
85 self.default_isolate_map = os.path.join(self.chromium_src_dir, 'infra',
128 subp.add_argument('-f', '--config-file', metavar='PATH',
130 help='path to config file '
132 subp.add_argument('-i', '--isolate-map-file', metavar='PATH',
133 help='path to isolate map file '
139 help='path to goma directory')
157 subp.add_argument('path', nargs=1,
158 help='path build was generated into.')
160 help='path to a file containing the input arguments '
163 help='path to a file containing the output arguments '
172 subp.add_argument('-f', '--config-file', metavar='PATH',
174 help='path to config file (default is %(default)s)')
176 help='path to goma directory')
187 subp.add_argument('path', nargs=1,
188 help='path to generate build into')
195 subp.add_argument('path', nargs=1,
196 help='path build was generated into')
240 subp.add_argument('path', nargs=1,
241 help=('path to generate build into (or use).'
242 ' This can be either a regular path or a '
243 'GN-style source-relative path like '
261 subp.add_argument('-f', '--config-file', metavar='PATH',
263 help='path to config file (default is %(default)s)')
269 subp.add_argument('-f', '--config-file', metavar='PATH',
271 help='path to config file (default is %(default)s)')
284 def DumpContentsOfFilePassedTo(arg_name, path):
285 if path and self.Exists(path):
287 self.Print("%% cat > %s <<EOF" % path)
288 contents = self.ReadFile(path)
365 build_dir = self.args.path[0]
490 build_dir = self.args.path[0]
503 self.Print('Must either specify a path to an existing GN build dir '
545 path = self.PathJoin(self.chromium_src_dir, 'ios', 'build', 'bots',
547 if not self.Exists(path):
550 contents = json.loads(self.ReadFile(path))
677 build_dir = self.args.path[0]
696 path = self.args.swarming_targets_file
697 if not self.Exists(path):
698 self.WriteFailureAndRaise('"%s" does not exist' % path,
700 contents = self.ReadFile(path)
772 build_dir = self.args.path[0]
837 def GNCmd(self, subcommand, path, *args):
848 # use gn in PATH
852 return [gn_path, subcommand, path] + list(args)
901 def ToSrcRelPath(self, path):
902 """Returns a relative path from the top of the repo."""
903 if path.startswith('//'):
904 return path[2:].replace('/', self.sep)
905 return self.RelPath(path, self.chromium_src_dir)
914 build_path = self.args.path[0]
1045 path = self.args.input_path[0]
1047 if not self.Exists(path):
1048 self.WriteFailureAndRaise('"%s" does not exist' % path, output_path)
1051 inp = json.loads(self.ReadFile(path))
1054 (path, e), output_path)
1068 def WriteJSON(self, obj, path, force_verbose=False):
1070 self.WriteFile(path, json.dumps(obj, indent=2, sort_keys=True) + '\n',
1073 raise MBErr('Error %s writing to the output path "%s"' %
1074 (e, path))
1122 build_dir = self.ToSrcRelPath(self.args.path[0])
1162 def ExpandUser(self, path):
1164 return os.path.expanduser(path)
1166 def Exists(self, path):
1168 return os.path.exists(path)
1177 def MaybeMakeDirectory(self, path):
1179 os.makedirs(path)
1186 return os.path.join(*comps)
1194 def ReadFile(self, path):
1196 with open(path) as fp:
1199 def RelPath(self, path, start='.'):
1201 return os.path.relpath(path, start)
1203 def RemoveFile(self, path):
1205 os.remove(path)
1222 def WriteFile(self, path, contents, force_verbose=False):
1225 self.Print('\nWriting """\\\n%s""" to %s.\n' % (contents, path))
1226 with open(path, 'w') as fp: