json and test submodules, use env variable rather than changing golbals at runtime for device and pp tests