diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-15 14:38:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 11:46:07 +0000 |
commit | 99f0e68973e078d1d0030741435b51ccbe759ef5 (patch) | |
tree | 1380de0bdb44e4749c5ddf534f4032db70c92dda | |
parent | 8cee6d31bbc7ae2341074471cd36b87bb3748cfe (diff) | |
download | poky-99f0e68973e078d1d0030741435b51ccbe759ef5.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)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 914c9b36c8..ded72048bc 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -133,7 +133,7 @@ def get_testimage_configuration(d, test_type, machine): | |||
133 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), | 133 | 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"), |
134 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), | 134 | 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"), |
135 | 'STARTTIME': d.getVar("DATETIME"), | 135 | 'STARTTIME': d.getVar("DATETIME"), |
136 | 'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'), | 136 | 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), |
137 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} | 137 | 'LAYERS': get_layers(d.getVar("BBLAYERS"))} |
138 | return configuration | 138 | return configuration |
139 | get_testimage_configuration[vardepsexclude] = "DATETIME" | 139 | get_testimage_configuration[vardepsexclude] = "DATETIME" |
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 5b9bf7b262..458c3f40b0 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 4509e0f63d..dab7268829 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 |
@@ -218,7 +219,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
218 | configuration = {'TEST_TYPE': 'oeselftest', | 219 | configuration = {'TEST_TYPE': 'oeselftest', |
219 | 'STARTTIME': args.test_start_time, | 220 | 'STARTTIME': args.test_start_time, |
220 | 'MACHINE': self.tc.td["MACHINE"], | 221 | 'MACHINE': self.tc.td["MACHINE"], |
221 | 'HOST_DISTRO': ('-'.join(platform.linux_distribution())).replace(' ', '-'), | 222 | 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), |
222 | 'HOST_NAME': metadata['hostname'], | 223 | 'HOST_NAME': metadata['hostname'], |
223 | 'LAYERS': metadata['layers']} | 224 | 'LAYERS': metadata['layers']} |
224 | return configuration | 225 | return configuration |