]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/selftest/sstate: Split classes to allow more parallelism
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 Mar 2023 11:35:24 +0000 (11:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 Mar 2023 17:35:19 +0000 (17:35 +0000)
By splitting the single class into multiple classes, it allows more parallelism
in the execution. These tests don't have interdependencies that benefit
from sstate reuse or anything like that so this makes sense to improve overall
test execution time if/where possible.

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

index aedc35c26263dfd73f80c26344089c9786b9bbc5..e978313c61f6dd8950af903d722fd32245a233f1 100644 (file)
@@ -217,6 +217,7 @@ class SStateTests(SStateBase):
         result = runCmd('git add bar.txt; git commit -asm "add bar"', cwd=srcdir)
         bitbake("dbus-wait-test -c unpack")
 
+class SStateCreation(SStateBase):
     def test_sstate_creation_distro_specific_pass(self):
         self.run_test_sstate_creation(['binutils-cross-'+ self.tune_arch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
@@ -229,6 +230,7 @@ class SStateTests(SStateBase):
     def test_sstate_creation_distro_nonspecific_fail(self):
         self.run_test_sstate_creation(['linux-libc-headers'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
 
+class SStateCleanup(SStateBase):
     def test_cleansstate_task_distro_specific_nonspecific(self):
         targets = ['binutils-cross-'+ self.tune_arch, 'binutils-native']
         targets.append('linux-libc-headers')
@@ -242,7 +244,7 @@ class SStateTests(SStateBase):
         targets.append('linux-libc-headers')
         self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
 
-
+class SStateDistroTests(SStateBase):
     def test_rebuild_distro_specific_sstate_cross_native_targets(self):
         self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + self.tune_arch, 'binutils-native'], temp_sstate_location=True)
 
@@ -252,7 +254,7 @@ class SStateTests(SStateBase):
     def test_rebuild_distro_specific_sstate_native_target(self):
         self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
 
-
+class SStateCacheManagement(SStateBase):
     # Test the sstate-cache-management script. Each element in the global_config list is used with the corresponding element in the target_config list
     # global_config elements are expected to not generate any sstate files that would be removed by sstate-cache-management.sh (such as changing the value of MACHINE)
     def run_test_sstate_cache_management_script(self, target, global_config=[''], target_config=[''], ignore_patterns=[]):
@@ -331,6 +333,7 @@ class SStateTests(SStateBase):
         target_config.append('')
         self.run_test_sstate_cache_management_script('m4', global_config,  target_config, ignore_patterns=['populate_lic'])
 
+class SStateHashSameSigs(SStateBase):
     def test_sstate_32_64_same_hash(self):
         """
         The sstate checksums for both native and target should not vary whether
@@ -416,6 +419,7 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertCountEqual(files1, files2)
 
+class SStateHashSameSigs2(SStateBase):
     def test_sstate_allarch_samesigs(self):
         """
         The sstate checksums of allarch packages should be independent of whichever
@@ -464,7 +468,7 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
         self.sstate_common_samesigs(configA, configB)
 
-
+class SStateHashSameSigs3(SStateBase):
     def test_sstate_sametune_samesigs(self):
         """
         The sstate checksums of two identical machines (using the same tune) should be the
@@ -552,7 +556,7 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertCountEqual(files1, files2)
 
-
+class SStateHashSameSigs4(SStateBase):
     def test_sstate_noop_samesigs(self):
         """
         The sstate checksums of two builds with these variables changed or