diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py')
-rw-r--r-- | external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py index f234bac0..e91f0bd1 100644 --- a/external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/external/poky/meta/lib/oeqa/selftest/cases/buildoptions.py @@ -1,3 +1,7 @@ +# +# SPDX-License-Identifier: MIT +# + import os import re import glob as g @@ -7,11 +11,9 @@ from oeqa.selftest.case import OESelftestTestCase from oeqa.selftest.cases.buildhistory import BuildhistoryBase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars import oeqa.utils.ftools as ftools -from oeqa.core.decorator.oeid import OETestID class ImageOptionsTests(OESelftestTestCase): - @OETestID(761) def test_incremental_image_generation(self): image_pkgtype = get_bb_var("IMAGE_PKGTYPE") if image_pkgtype != 'rpm': @@ -30,22 +32,20 @@ class ImageOptionsTests(OESelftestTestCase): incremental_removed = re.search(r"Erasing\s*:\s*packagegroup-core-ssh-openssh", log_data_removed) self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed) - @OETestID(286) def test_ccache_tool(self): bitbake("ccache-native") bb_vars = get_bb_vars(['SYSROOT_DESTDIR', 'bindir'], 'ccache-native') p = bb_vars['SYSROOT_DESTDIR'] + bb_vars['bindir'] + "/" + "ccache" self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p) self.write_config('INHERIT += "ccache"') - self.add_command_to_tearDown('bitbake -c clean m4') - bitbake("m4 -c clean") - bitbake("m4 -f -c compile") - log_compile = os.path.join(get_bb_var("WORKDIR","m4"), "temp/log.do_compile") + self.add_command_to_tearDown('bitbake -c clean m4-native') + bitbake("m4-native -c clean") + bitbake("m4-native -f -c compile") + log_compile = os.path.join(get_bb_var("WORKDIR","m4-native"), "temp/log.do_compile") with open(log_compile, "r") as f: loglines = "".join(f.readlines()) - self.assertIn("ccache", loglines, msg="No match for ccache in m4 log.do_compile. For further details: %s" % log_compile) + self.assertIn("ccache", loglines, msg="No match for ccache in m4-native log.do_compile. For further details: %s" % log_compile) - @OETestID(1435) def test_read_only_image(self): distro_features = get_bb_var('DISTRO_FEATURES') if not ('x11' in distro_features and 'opengl' in distro_features): @@ -56,7 +56,6 @@ class ImageOptionsTests(OESelftestTestCase): class DiskMonTest(OESelftestTestCase): - @OETestID(277) def test_stoptask_behavior(self): self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"') res = bitbake("delay -c delay", ignore_status = True) @@ -76,7 +75,6 @@ class SanityOptionsTest(OESelftestTestCase): if line in l: return l - @OETestID(927) def test_options_warnqa_errorqa_switch(self): self.write_config("INHERIT_remove = \"report-error\"") @@ -98,7 +96,6 @@ class SanityOptionsTest(OESelftestTestCase): line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.") self.assertTrue(line and line.startswith("WARNING:"), msg=res.output) - @OETestID(1421) def test_layer_without_git_dir(self): """ Summary: Test that layer git revisions are displayed and do not fail without git repository @@ -140,20 +137,17 @@ class SanityOptionsTest(OESelftestTestCase): class BuildhistoryTests(BuildhistoryBase): - @OETestID(293) def test_buildhistory_basic(self): self.run_buildhistory_operation('xcursor-transparent-theme') self.assertTrue(os.path.isdir(get_bb_var('BUILDHISTORY_DIR')), "buildhistory dir was not created.") - @OETestID(294) def test_buildhistory_buildtime_pr_backwards(self): target = 'xcursor-transparent-theme' - error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1.* to .*-r0.*)" % target + error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds \(from .*-r1.* to .*-r0.*\)" % target self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True) self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error) class ArchiverTest(OESelftestTestCase): - @OETestID(926) def test_arch_work_dir_and_export_source(self): """ Test for archiving the work directory and exporting the source files. @@ -168,17 +162,14 @@ class ArchiverTest(OESelftestTestCase): self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src) class ToolchainOptions(OESelftestTestCase): - def test_toolchain_fortran(self): """ - Test whether we can enable and build fortran and its supporting libraries + Test that Fortran works by building a Hello, World binary. """ features = 'FORTRAN_forcevariable = ",fortran"\n' - features += 'RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"\n' self.write_config(features) - - bitbake('gcc-runtime libgfortran') + bitbake('fortran-helloworld') class SourceMirroring(OESelftestTestCase): # Can we download everything from the Yocto Sources Mirror over http only @@ -187,6 +178,8 @@ class SourceMirroring(OESelftestTestCase): BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org" MIRRORS = "" DL_DIR = "${TMPDIR}/test_downloads" +STAMPS_DIR = "${TMPDIR}/test_stamps" +SSTATE_DIR = "${TMPDIR}/test_sstate-cache" PREMIRRORS = "\\ bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\ cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\ |