{"basehash":"2797163b6b9424f82bb9a905be3cdb03d699cc94156c75af56ef7b7f342f487f","basehash_ignore_vars":{"_set_object":["BBPATH","BBSERVER","BB_CURRENTTASK","BB_HASHSERVE","BB_LIMITEDDEPS","BB_TASKHASH","BB_UNIHASH","BB_WORKERCONTEXT","BUILDHISTORY_DIR","BUILD_ARCH","CCACHE","CCACHE_DIR","CCACHE_NOHASHDIR","CCACHE_TOP_DIR","COREBASE","DEPLOY_DIR","DL_DIR","EXTERNAL_TOOLCHAIN","FILE","FILESEXTRAPATHS","FILESPATH","FILE_DIRNAME","GIT_CEILING_DIRECTORIES","HOME","LICENSE_PATH","LOGNAME","OMP_NUM_THREADS","PARALLEL_MAKE","PATH","PKGDATA_DIR","PLNX_SCRIPTS_PATH","PRSERV_DUMPDIR","PRSERV_DUMPFILE","PRSERV_HOST","PRSERV_LOCKDOWN","PSEUDO_IGNORE_PATHS","PWD","RUST_BUILD_SYS","RUST_HOST_SYS","RUST_TARGET_SYS","SDKPKGSUFFIX","SHELL","SOURCE_DATE_EPOCH","SSTATE_DIR","SSTATE_HASHEQUIV_METHOD","SSTATE_HASHEQUIV_OWNER","SSTATE_HASHEQUIV_REPORT_TASKDATA","SSTATE_PKGARCH","STAGING_DIR_HOST","STAGING_DIR_TARGET","STAMPCLEAN","STAMPS_DIR","THISDIR","TMPDIR","USER","WARN_QA","WORKDIR","extend_recipe_sysroot"]},"file_checksum_values":[],"gendeps":{"B":{"_set_object":[]},"BPN":{"_set_object":["PN","SPECIAL_PKGSUFFIX","oe.utils.prune_suffix"]},"CARGO_TEST_BINARIES_FILES":{"_set_object":["B"]},"D":{"_set_object":[]},"MLPREFIX":{"_set_object":[]},"PN":{"_set_object":[]},"PTEST_PATH":{"_set_object":["BPN","libdir"]},"RUST_TEST_ARGS":{"_set_object":[]},"SPECIAL_PKGSUFFIX":{"_set_object":[]},"baselib":{"_set_object":[]},"do_install_ptest_cargo[fakeroot]":{"_set_object":[]},"do_install_ptest_cargo[umask]":{"_set_object":[]},"exec_prefix":{"_set_object":["prefix"]},"libdir":{"_set_object":["baselib","exec_prefix"]},"oe.utils.prune_suffix":{"_set_object":["MLPREFIX"]},"prefix":{"_set_object":[]}},"runtaskdeps":["python3-bcrypt:do_install_ptest_base"],"runtaskhashes":{"python3-bcrypt:do_install_ptest_base":"c2ad8bdebd94fdbd87da52a6ade8bcf4878723dd2869ddbfb2cbaae1650d2f11"},"task":"do_install_ptest_cargo","taskdeps":{"_set_object":["B","BPN","CARGO_TEST_BINARIES_FILES","D","MLPREFIX","PN","PTEST_PATH","RUST_TEST_ARGS","SPECIAL_PKGSUFFIX","baselib","do_install_ptest_cargo[fakeroot]","do_install_ptest_cargo[umask]","exec_prefix","libdir","oe.utils.prune_suffix","prefix"]},"taskhash":"fd36d8b07a7d253234328cd8c305c21344310c0d2286f16d27c3ecf867ca4456","taskhash_ignore_tasks":null,"unihash":"fd36d8b07a7d253234328cd8c305c21344310c0d2286f16d27c3ecf867ca4456","varvals":{"B":"${WORKDIR}/build","BPN":"${@oe.utils.prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}","CARGO_TEST_BINARIES_FILES":"${B}/test_binaries_list","D":"${WORKDIR}/image","MLPREFIX":"","PN":"${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}","PTEST_PATH":"${libdir}/${BPN}/ptest","RUST_TEST_ARGS":"","SPECIAL_PKGSUFFIX":"-native -cross -initial -intermediate -crosssdk -cross-canadian","baselib":"lib","do_install_ptest_cargo":"    import shutil\n\n    dest_dir = d.getVar(\"D\")\n    pn = d.getVar(\"PN\")\n    ptest_path = d.getVar(\"PTEST_PATH\")\n    cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES')\n    rust_test_args = d.getVar('RUST_TEST_ARGS') or \"\"\n\n    ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))\n    os.makedirs(ptest_dir, exist_ok=True)\n\n    test_bins = []\n    with open(cargo_test_binaries_file, \"r\") as f:\n        for line in f.readlines():\n            test_bins.append(line.strip('\\n'))\n\n    test_paths = []\n    for test_bin in test_bins:\n        shutil.copy2(test_bin, ptest_dir)\n        test_paths.append(os.path.join(ptest_path, os.path.basename(test_bin)))\n\n    ptest_script = os.path.join(ptest_dir, \"run-ptest\")\n    if os.path.exists(ptest_script):\n        with open(ptest_script, \"a\") as f:\n            f.write(f\"\\necho \\\"\\\"\\n\")\n            f.write(f\"echo \\\"## starting to run rust tests ##\\\"\\n\")\n            for test_path in test_paths:\n                f.write(f\"{test_path} {rust_test_args}\\n\")\n    else:\n        with open(ptest_script, \"a\") as f:\n            f.write(\"#!/bin/sh\\n\")\n            for test_path in test_paths:\n                f.write(f\"{test_path} {rust_test_args}\\n\")\n        os.chmod(ptest_script, 0o755)\n\n    # this is chown -R root:root ${D}${PTEST_PATH}\n    for root, dirs, files in os.walk(ptest_dir):\n        for d in dirs:\n            shutil.chown(os.path.join(root, d), \"root\", \"root\")\n        for f in files:\n            shutil.chown(os.path.join(root, f), \"root\", \"root\")\n","do_install_ptest_cargo[fakeroot]":"1","do_install_ptest_cargo[umask]":"022","exec_prefix":"${prefix}","libdir":"${exec_prefix}/${baselib}","oe.utils.prune_suffix":"c5c5b6b4a2571ad1375036c0926222b48da21cdec3bbce5ff0207087e2f107b8","prefix":"/usr"}}