]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/selftest/buildhistory: Fix test if USER_CLASSES is unset
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 3 Oct 2025 14:36:45 +0000 (15:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Oct 2025 10:14:10 +0000 (11:14 +0100)
If USER_CLASSES is unset, the test was failing. Fix that.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/buildhistory.py

index 511c666554f6870e29328fc586fbac8acdd6defc..1edc60c72d0e0c6fe418ca7e7436801b61b1a34a 100644 (file)
@@ -16,7 +16,7 @@ class BuildhistoryTests(OESelftestTestCase):
 
     def config_buildhistory(self, tmp_bh_location=False):
         bb_vars = get_bb_vars(['USER_CLASSES', 'INHERIT'])
-        if (not 'buildhistory' in bb_vars['USER_CLASSES']) and (not 'buildhistory' in bb_vars['INHERIT']):
+        if (not bb_vars['USER_CLASSES'] or not 'buildhistory' in bb_vars['USER_CLASSES']) and (not 'buildhistory' in bb_vars['INHERIT']):
             add_buildhistory_config = 'INHERIT += "buildhistory"\nBUILDHISTORY_COMMIT = "1"'
             self.append_config(add_buildhistory_config)