summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/gcc.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/gcc.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/gcc.py21
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 @@
1#
2# Copyright OpenEmbedded Contributors
3#
1# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
5#
2import os 6import os
7import time
3from oeqa.core.decorator import OETestTag 8from oeqa.core.decorator import OETestTag
4from oeqa.core.case import OEPTestResultTestCase 9from oeqa.core.case import OEPTestResultTestCase
5from oeqa.selftest.case import OESelftestTestCase 10from oeqa.selftest.case import OESelftestTestCase
6from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu, Command 11from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runqemu
7 12
8def parse_values(content): 13def parse_values(content):
9 for i in content: 14 for i in content:
@@ -39,8 +44,13 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
39 self.write_config("\n".join(features)) 44 self.write_config("\n".join(features))
40 45
41 recipe = "gcc-runtime" 46 recipe = "gcc-runtime"
47
48 start_time = time.time()
49
42 bitbake("{} -c check".format(recipe)) 50 bitbake("{} -c check".format(recipe))
43 51
52 end_time = time.time()
53
44 bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe) 54 bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe)
45 builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"] 55 builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"]
46 56
@@ -54,7 +64,7 @@ class GccSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
54 64
55 ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite 65 ptestsuite = "gcc-{}".format(suite) if suite != "gcc" else suite
56 ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite 66 ptestsuite = ptestsuite + "-user" if ssh is None else ptestsuite
57 self.ptest_section(ptestsuite, logfile = logpath) 67 self.ptest_section(ptestsuite, duration = int(end_time - start_time), logfile = logpath)
58 with open(sumspath, "r") as f: 68 with open(sumspath, "r") as f:
59 for test, result in parse_values(f): 69 for test, result in parse_values(f):
60 self.ptest_result(ptestsuite, test, result) 70 self.ptest_result(ptestsuite, test, result)
@@ -114,37 +124,44 @@ class GccLibItmSelfTest(GccSelfTestBase):
114 self.run_check("libitm") 124 self.run_check("libitm")
115 125
116@OETestTag("toolchain-system") 126@OETestTag("toolchain-system")
127@OETestTag("runqemu")
117class GccCrossSelfTestSystemEmulated(GccSelfTestBase): 128class GccCrossSelfTestSystemEmulated(GccSelfTestBase):
118 def test_cross_gcc(self): 129 def test_cross_gcc(self):
119 self.run_check_emulated("gcc") 130 self.run_check_emulated("gcc")
120 131
121@OETestTag("toolchain-system") 132@OETestTag("toolchain-system")
133@OETestTag("runqemu")
122class GxxCrossSelfTestSystemEmulated(GccSelfTestBase): 134class GxxCrossSelfTestSystemEmulated(GccSelfTestBase):
123 def test_cross_gxx(self): 135 def test_cross_gxx(self):
124 self.run_check_emulated("g++") 136 self.run_check_emulated("g++")
125 137
126@OETestTag("toolchain-system") 138@OETestTag("toolchain-system")
139@OETestTag("runqemu")
127class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase): 140class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase):
128 def test_libatomic(self): 141 def test_libatomic(self):
129 self.run_check_emulated("libatomic") 142 self.run_check_emulated("libatomic")
130 143
131@OETestTag("toolchain-system") 144@OETestTag("toolchain-system")
145@OETestTag("runqemu")
132class GccLibGompSelfTestSystemEmulated(GccSelfTestBase): 146class GccLibGompSelfTestSystemEmulated(GccSelfTestBase):
133 def test_libgomp(self): 147 def test_libgomp(self):
134 self.run_check_emulated("libgomp") 148 self.run_check_emulated("libgomp")
135 149
136@OETestTag("toolchain-system") 150@OETestTag("toolchain-system")
151@OETestTag("runqemu")
137class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase): 152class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase):
138 def test_libstdcxx(self): 153 def test_libstdcxx(self):
139 self.run_check_emulated("libstdc++-v3") 154 self.run_check_emulated("libstdc++-v3")
140 155
141@OETestTag("toolchain-system") 156@OETestTag("toolchain-system")
157@OETestTag("runqemu")
142class GccLibSspSelfTestSystemEmulated(GccSelfTestBase): 158class GccLibSspSelfTestSystemEmulated(GccSelfTestBase):
143 def test_libssp(self): 159 def test_libssp(self):
144 self.check_skip("libssp") 160 self.check_skip("libssp")
145 self.run_check_emulated("libssp") 161 self.run_check_emulated("libssp")
146 162
147@OETestTag("toolchain-system") 163@OETestTag("toolchain-system")
164@OETestTag("runqemu")
148class GccLibItmSelfTestSystemEmulated(GccSelfTestBase): 165class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
149 def test_libitm(self): 166 def test_libitm(self):
150 self.check_skip("libitm") 167 self.check_skip("libitm")