mirror of
https://git.yoctoproject.org/poky
synced 2026-06-04 02:00:04 +00:00
rootfs-postcommands: put image testdata under sstate control
The testdata.json is being written to DEPLOY_DIR_IMAGE directly, thus bypassing sstate, which results in an ever growing list of files. Write them to IMGDEPLOYDIR instead, so as to benefit from the automatic management via sstate. (From OE-Core rev: 1f7399a5e5d12b7ca3faf399a70c1613d522c28d) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
09a2975e72
commit
8f16469e97
@@ -316,17 +316,18 @@ rootfs_sysroot_relativelinks () {
|
||||
python write_image_test_data() {
|
||||
from oe.data import export2json
|
||||
|
||||
testdata = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_NAME'))
|
||||
testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('IMAGE_LINK_NAME'))
|
||||
deploy_dir = d.getVar('IMGDEPLOYDIR')
|
||||
link_name = d.getVar('IMAGE_LINK_NAME')
|
||||
testdata_name = os.path.join(deploy_dir, "%s.testdata.json" % d.getVar('IMAGE_NAME'))
|
||||
|
||||
bb.utils.mkdirhier(os.path.dirname(testdata))
|
||||
searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
|
||||
export2json(d, testdata,searchString=searchString,replaceString="")
|
||||
export2json(d, testdata_name, searchString=searchString, replaceString="")
|
||||
|
||||
if testdata_link != testdata:
|
||||
if os.path.exists(testdata_name):
|
||||
testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
|
||||
if os.path.lexists(testdata_link):
|
||||
os.remove(testdata_link)
|
||||
os.symlink(os.path.basename(testdata), testdata_link)
|
||||
os.remove(testdata_link)
|
||||
os.symlink(os.path.basename(testdata_name), testdata_link)
|
||||
}
|
||||
write_image_test_data[vardepsexclude] += "TOPDIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user