зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1265796 - fix mach devtools-css-db for linux, debug builds; r=gregtatum
MozReview-Commit-ID: 57s2Pqzc31S --HG-- extra : rebase_source : 47a585935b9aef26c10c2525209193315b80e5ae
This commit is contained in:
Родитель
d5da1a9162
Коммит
894924cc78
|
@ -16,6 +16,10 @@ dump(JSON.stringify({
|
|||
cssProperties: cssProperties(),
|
||||
pseudoElements: pseudoElements()
|
||||
}));
|
||||
// In a debug build, xpcshell might print extra debugging information,
|
||||
// so we emit a trailing newline and then arrange to just read a
|
||||
// single (long) line of JSON from the output.
|
||||
dump("\n");
|
||||
|
||||
/*
|
||||
* A list of CSS Properties and their various characteristics. This is used on the
|
||||
|
|
|
@ -58,7 +58,10 @@ class MachCommands(MachCommandBase):
|
|||
print("build and try this again.")
|
||||
sys.exit(1)
|
||||
|
||||
cmd = shellutil.split(cpp)
|
||||
if type(cpp) is list:
|
||||
cmd = cpp
|
||||
else:
|
||||
cmd = shellutil.split(cpp)
|
||||
cmd += shellutil.split(self.substs['ACDEFINES'])
|
||||
cmd.append(headerPath)
|
||||
|
||||
|
@ -82,14 +85,24 @@ class MachCommands(MachCommandBase):
|
|||
# Get the paths
|
||||
script_path = resolve_path(self.topsrcdir,
|
||||
'devtools/shared/css/generated/generate-properties-db.js')
|
||||
gre_path = resolve_path(self.topobjdir, 'dist/bin')
|
||||
browser_path = resolve_path(self.topobjdir, 'dist/bin/browser')
|
||||
xpcshell_path = build.get_binary_path(what='xpcshell')
|
||||
print(browser_path)
|
||||
|
||||
sub_env = dict(os.environ)
|
||||
if sys.platform.startswith('linux'):
|
||||
sub_env["LD_LIBRARY_PATH"] = gre_path
|
||||
|
||||
# Run the xcpshell script, and set the appdir flag to the browser path so that
|
||||
# we have the proper dependencies for requiring the loader.
|
||||
contents = subprocess.check_output([xpcshell_path, '-a', browser_path,
|
||||
script_path])
|
||||
contents = subprocess.check_output([xpcshell_path, '-g', gre_path,
|
||||
'-a', browser_path, script_path],
|
||||
env = sub_env)
|
||||
# Extract just the first line of output, since a debug-build
|
||||
# xpcshell might emit extra output that we don't want.
|
||||
contents = contents.split('\n')[0]
|
||||
|
||||
return json.loads(contents)
|
||||
|
||||
def output_template(self, substitutions):
|
||||
|
|
Загрузка…
Ссылка в новой задаче