d.getVar('IMAGE_LINK_NAME') or d.getVar('IMAGE_NAME')))
tdname = "%s.testdata.json" % image_name
- td = json.load(open(tdname, "r"))
+ with open(tdname, "r") as f:
+ td = json.load(f)
logger = logging.getLogger("BitBake")
sdk_envs = OESDKTestContextExecutor._get_sdk_environs(d.getVar("DEPLOY_DIR_IMAGE"))
tdname = d.expand("${DEPLOY_DIR_IMAGE}/${PN}.testdata.json")
- test_data = json.load(open(tdname, "r"))
+ with open(tdname, "r") as f:
+ test_data = json.load(f)
host_pkg_manifest = {"cmake-native":"", "gcc-cross":"", "gettext-native":"", "meson-native":"", "perl-native":"", "python3-core-native":"", }
target_pkg_manifest = {"gtk+3":""}
bb.fatal("The toolchain %s is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' ." % tcname)
tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
- test_data = json.load(open(tdname, "r"))
+ with open(tdname, "r") as f:
+ test_data = json.load(f)
target_pkg_manifest = self.context_executor_class._load_manifest(
d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
" tests: 'bitbake <image> -c populate_sdk_ext' ." % tcname)
tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
- test_data = json.load(open(tdname, "r"))
+ with open(tdname, "r") as f:
+ test_data = json.load(f)
target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"))