]> code.ossystems Code Review - openembedded-core.git/commitdiff
testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation warnings
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Nov 2018 14:38:19 +0000 (14:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Nov 2018 09:32:17 +0000 (09:32 +0000)
Use our own lsb function instead as used elsewhere by the codebase.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testimage.bbclass
meta/classes/testsdk.bbclass
meta/lib/oeqa/selftest/context.py

index 914c9b36c8e236b71cbfc245953fa8c150f8369c..ded72048bcc854efd734d42b5a899fc6935b82ff 100644 (file)
@@ -133,7 +133,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"
index 5b9bf7b262426818893841362e175586669b34d2..458c3f40b04281d8152956200982c33db4f2151f 100644 (file)
@@ -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"
index 4509e0f63d40b07d21cbe67ee444b2fce3aa03a6..dab72688299f3c95f162ec89188852aaee40efce 100644 (file)
@@ -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
@@ -218,7 +219,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