Skip imagefeature and sstatetest tests depending on distro
v4 cover Skip imagefeature and sstatetest tests depending on distro
From: Leonardo Sandoval <[email protected]>
Originally, the selftests were defined for the 'poky' distro. However, there are more supported distros, including nodistro, poky-lsb and poky-tiny. This series just focus on two test cases: imagefeatures and sstatetests.
[YOCTO #8525]
The following changes since commit 4aa6644f92975ded908ef99cf313466e0845e071:
kernel-fitimage: Use compressed ramdisks in FIT images if available (2017-01-23 12:05:23 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lsandov1/selftest-imagefeatures-sstatetest-distro-agnostic
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lsandov1/selftest-imagefeatures-sstatetest-distro-agnostic
Leonardo Sandoval (2):
selftest/imagefeatures: skip weston test if required features are not
present
selftest: sstatetests: skip glibc-initial tests in case of non-glibc
distro
meta/lib/oeqa/selftest/imagefeatures.py | 6 +++--- meta/lib/oeqa/selftest/sstate.py | 1 + meta/lib/oeqa/selftest/sstatetests.py | 25 +++++++++++++++++++------ 3 files changed, 23 insertions(+), 9 deletions(-)
Signature · 1 line
2.1.4
PATCH v4 1/2 selftest/imagefeatures: skip weston test if required features are not present
From: Leonardo Sandoval <[email protected]>
Also, remove hard-coded features because the image already contains them.
--- meta/lib/oeqa/selftest/imagefeatures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/lib/oeqa/selftest/imagefeatures.py +3 -3
@@ -91,9 +91,9 @@ class ImageFeatures(oeSelfTest): AutomatedBy: Daniel Istrate <[email protected]> """ - features = 'DISTRO_FEATURES_append = " wayland"\n' - features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"' - self.write_config(features) + distro_features = get_bb_var('DISTRO_FEATURES') + if not ('opengl' in distro_features and 'wayland' in distro_features): + self.skipTest('neither opengl nor wayland present on DISTRO_FEATURES so core-image-weston cannot be built') # Build a core-image-weston bitbake('core-image-weston')
Signature · 1 line
2.1.4
PATCH v4 2/2 selftest: sstatetests: skip glibc-initial tests in case of non-glibc distro
In reply to [email protected]From: Leonardo Sandoval <[email protected]>
Some distros uses non-glibc so skip those tests requiring glibc-initial as target
--- meta/lib/oeqa/selftest/sstate.py | 1 + meta/lib/oeqa/selftest/sstatetests.py | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
meta/lib/oeqa/selftest/sstate.py +1 -0
@@ -16,6 +16,7 @@ class SStateBase(oeSelfTest): self.sstate_path = get_bb_var('SSTATE_DIR') self.hostdistro = get_bb_var('NATIVELSBSTRING') self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro) + self.tclibc = get_bb_var('TCLIBC') # Creates a special sstate configuration with the option to add sstate mirrors def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
meta/lib/oeqa/selftest/sstatetests.py +19 -6
@@ -51,12 +51,15 @@ class SStateTests(SStateBase): @testcase(976) def test_sstate_creation_distro_nonspecific_pass(self): - self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) + # glibc-initial is intended only for the glibc C library + if self.tclibc == 'glibc': + self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) @testcase(1375) def test_sstate_creation_distro_nonspecific_fail(self): - self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) - + # glibc-initial is intended only for the glibc C library + if self.tclibc == 'glibc': + self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) # Test the sstate files deletion part of the do_cleansstate task def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True):
@@ -78,16 +81,26 @@ class SStateTests(SStateBase): @testcase(977) def test_cleansstate_task_distro_specific_nonspecific(self): targetarch = get_bb_var('TUNE_ARCH') - self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) + targets = ['binutils-cross-'+ targetarch, 'binutils-native'] + # glibc-initial is intended only for the glibc C library + if self.tclibc == 'glibc': + targets.append('glibc-initial') + self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) @testcase(1376) def test_cleansstate_task_distro_nonspecific(self): - self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) + # glibc-initial is intended only for the glibc C library + if self.tclibc == 'glibc': + self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) @testcase(1377) def test_cleansstate_task_distro_specific(self): targetarch = get_bb_var('TUNE_ARCH') - self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) + targets = ['binutils-cross-'+ targetarch, 'binutils-native'] + # glibc-initial is intended only for the glibc C library + if self.tclibc == 'glibc': + targets.append('glibc-initial') + self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) # Test rebuilding of distro-specific sstate files
Signature · 1 line
2.1.4