mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 03:32:13 +02:00
testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation warnings
Use our own lsb function instead as used elsewhere by the codebase. (From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3) (From OE-Core rev: 570256a64af5a3fa994a20a5cc4c74d59ffc361f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -151,7 +151,7 @@ def get_testimage_configuration(d, test_type, machine):
|
||||
'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
|
||||
'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
|
||||
'STARTTIME': d.getVar("DATETIME"),
|
||||
'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'),
|
||||
'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
|
||||
'LAYERS': get_layers(d.getVar("BBLAYERS"))}
|
||||
return configuration
|
||||
get_testimage_configuration[vardepsexclude] = "DATETIME"
|
||||
|
||||
@@ -23,7 +23,7 @@ def get_sdk_configuration(d, test_type):
|
||||
'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
|
||||
'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
|
||||
'STARTTIME': d.getVar("DATETIME"),
|
||||
'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'),
|
||||
'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
|
||||
'LAYERS': get_layers(d.getVar("BBLAYERS"))}
|
||||
return configuration
|
||||
get_sdk_configuration[vardepsexclude] = "DATETIME"
|
||||
|
||||
@@ -11,6 +11,7 @@ from shutil import copyfile
|
||||
from random import choice
|
||||
|
||||
import oeqa
|
||||
import oe
|
||||
|
||||
from oeqa.core.context import OETestContext, OETestContextExecutor
|
||||
from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
|
||||
@@ -223,7 +224,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
|
||||
configuration = {'TEST_TYPE': 'oeselftest',
|
||||
'STARTTIME': args.test_start_time,
|
||||
'MACHINE': self.tc.td["MACHINE"],
|
||||
'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'),
|
||||
'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
|
||||
'HOST_NAME': metadata['hostname'],
|
||||
'LAYERS': metadata['layers']}
|
||||
return configuration
|
||||
|
||||
Reference in New Issue
Block a user