gecko-dev/testing/mozbase/mozinfo
Gregory Szorc a358731e48 Bug 1286900 - Add environment variable to define location of mozinfo.json; r=ted
As part of converting WPT to run from a source checkout in automation,
I ran into problems where mozinfo.json wasn't being loaded, causing
several tests to fail. This is because mozinfo.json is only found
from a source directory or from a parent of the WPT meta directory.

Before, mozinfo.json was provided by the "common" tests zip file
and extracted to the base of the destination directory. WPT files
were extracted to a "web-platform" sub-directory. So mozinfo.json
was in a parent directory of "web-platform/meta" and was loaded
automatically.

Now that we want to run WPT out of the source directory, there is
no mozinfo.json and the source directory and no mozinfo.json can be
loaded.

This commit teaches mozinfo.json to look in a MOZINFO_PATH environment
variable for the path to mozinfo.json. This allows mozinfo.json
to exist anywhere on the filesystem. This provides a lot more
flexibility for loading the file.

MozReview-Commit-ID: 1I1cxS1IeyY

--HG--
extra : rebase_source : b06de2b53d3fb26df2c7b1c6d034644c20e47577
2016-09-26 15:51:32 -07:00
..
mozinfo Bug 1286900 - Add environment variable to define location of mozinfo.json; r=ted 2016-09-26 15:51:32 -07:00
tests Bug 1286900 - Add environment variable to define location of mozinfo.json; r=ted 2016-09-26 15:51:32 -07:00
setup.py Bug 1185632 - [mozinfo] bump release to 0.9. r=wlach 2015-10-30 17:38:42 +01:00