diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/gcc.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/gcc.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py b/meta/lib/oeqa/selftest/cases/gcc.py index 3efe15228f..89360178fe 100644 --- a/meta/lib/oeqa/selftest/cases/gcc.py +++ b/meta/lib/oeqa/selftest/cases/gcc.py @@ -1,9 +1,14 @@ +# +# Copyright OpenEmbedded Contributors +# # SPDX-License-Identifier: MIT +# import os +import time from oeqa.core.decorator import OETestTag from oeqa.core.case import OEPTestResultTestCase from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command +from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu def parse_values(content): for i in content: @@ -39,8 +44,13 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): self.write_config("\n".join(features)) recipe = "gcc-runtime" + + start_time = time.time() + bitbake("{} -c check".format(recipe)) + end_time = time.time() + bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] @@ -54,7 +64,7 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite - self.ptest_section(ptestsuite, logfile = logpath) + self.ptest_section(ptestsuite, duration = int(end_time - start_time), logfile = logpath) with open(sumspath, "r") as f: for test, result in parse_values(f): self.ptest_result(ptestsuite, test, result) @@ -114,37 +124,44 @@ class GccLibItmSelfTest(GccSelfTestBase): self.run_check("libitm") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccCrossSelfTestSystemEmulated(GccSelfTestBase): def test_cross_gcc(self): self.run_check_emulated("gcc") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GxxCrossSelfTestSystemEmulated(GccSelfTestBase): def test_cross_gxx(self): self.run_check_emulated("g++") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase): def test_libatomic(self): self.run_check_emulated("libatomic") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccLibGompSelfTestSystemEmulated(GccSelfTestBase): def test_libgomp(self): self.run_check_emulated("libgomp") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase): def test_libstdcxx(self): self.run_check_emulated("libstdc++-v3") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccLibSspSelfTestSystemEmulated(GccSelfTestBase): def test_libssp(self): self.check_skip("libssp") self.run_check_emulated("libssp") @OETestTag("toolchain-system") +@OETestTag("runqemu") class GccLibItmSelfTestSystemEmulated(GccSelfTestBase): def test_libitm(self): self.check_skip("libitm") |