diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-15 14:38:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:27:45 +0000 |
commit | fa5ebe62e22842709567123e31987824f0a6db29 (patch) | |
tree | 2114d1f141d5fc73f13d0fcb4676c67c980e2a10 /meta | |
parent | 7375570a2439cdcc398f8a173e80b277af8b2f2f (diff) | |
download | poky-fa5ebe62e22842709567123e31987824f0a6db29.tar.gz |
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)
(From OE-Core rev: d58fe9d352ae7de857e7f55b88f6e7d35b2cd706)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/testimage.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/testsdk.bbclass | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index a9e8b499dd..3e4ffcaca8 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -141,7 +141,7 @@ def get_testimage_configuration(d, test_type, machine): | |||
141 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), | 141 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), |
142 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), | 142 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), |
143 | 'STARTTIME': d.getVar("DATETIME"), | 143 | 'STARTTIME': d.getVar("DATETIME"), |
144 | 'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'), | 144 | 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), |
145 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} | 145 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} |
146 | return configuration | 146 | return configuration |
147 | get_testimage_configuration[vardepsexclude] = "DATETIME" | 147 | get_testimage_configuration[vardepsexclude] = "DATETIME" |
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 6981d40be1..4374d8775b 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass | |||
@@ -23,7 +23,7 @@ def get_sdk_configuration(d, test_type): | |||
23 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), | 23 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), |
24 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), | 24 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), |
25 | 'STARTTIME': d.getVar("DATETIME"), | 25 | 'STARTTIME': d.getVar("DATETIME"), |
26 | 'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'), | 26 | 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), |
27 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} | 27 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} |
28 | return configuration | 28 | return configuration |
29 | get_sdk_configuration[vardepsexclude] = "DATETIME" | 29 | get_sdk_configuration[vardepsexclude] = "DATETIME" |
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 9a56888c2f..da7f26b30f 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -11,6 +11,7 @@ from shutil import copyfile | |||
11 | from random import choice | 11 | from random import choice |
12 | 12 | ||
13 | import oeqa | 13 | import oeqa |
14 | import oe | ||
14 | 15 | ||
15 | from oeqa.core.context import OETestContext, OETestContextExecutor | 16 | from oeqa.core.context import OETestContext, OETestContextExecutor |
16 | from oeqa.core.exception import OEQAPreRun, OEQATestNotFound | 17 | from oeqa.core.exception import OEQAPreRun, OEQATestNotFound |
@@ -216,7 +217,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
216 | configuration = {'TEST_TYPE': 'oeselftest', | 217 | configuration = {'TEST_TYPE': 'oeselftest', |
217 | 'STARTTIME': args.test_start_time, | 218 | 'STARTTIME': args.test_start_time, |
218 | 'MACHINE': self.tc.td["MACHINE"], | 219 | 'MACHINE': self.tc.td["MACHINE"], |
219 | 'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'), | 220 | 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), |
220 | 'HOST_NAME': metadata['hostname'], | 221 | 'HOST_NAME': metadata['hostname'], |
221 | 'LAYERS': metadata['layers']} | 222 | 'LAYERS': metadata['layers']} |
222 | return configuration | 223 | return configuration |