taskcluster/scripts/builder/get-objdir.py
author kearwood
Fri, 02 Sep 2016 14:45:54 -0700
changeset 356383 89b9735661b9f19ece9b6a2bb54b1c50d0556b34
parent 343192 d503738745c7637beb31d420d211e550d3c309b6
permissions -rwxr-xr-x
Bug 1288193 - Ensure that the content process receives the presentation status of a VRDisplay immediately after adding or removing layers r=gw280 - Corrects issues with the onvrdisplaypresentationchange events being delayed by up to 5 seconds. - Caused a delay to enter or exit WebVR presentation on many sites. MozReview-Commit-ID: 2LACZNwKIxW

#!/usr/bin/env python2.7

from __future__ import print_function
import sys
import os
import json
import subprocess
from StringIO import StringIO

gecko_dir = sys.argv[1]
os.chdir(gecko_dir)

result = subprocess.check_output(["./mach", "environment", "--format", "json"])
environment = json.load(StringIO(result))

topobjdir = environment["mozconfig"]["topobjdir"]
if topobjdir is None:
    topobjdir = sys.argv[2]

print(topobjdir)