summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/glibc.py
diff options
context:
space:
mode:
authorYash Shinde <Yash.Shinde@windriver.com>2023-08-01 05:47:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-04 11:44:25 +0100
commit0c35f931c1ddae8d07bad7e2c70ccbc14beaf44d (patch)
tree5bf3c250e388c43dedac75e57c65f96f2cfdfa0d /meta/lib/oeqa/selftest/cases/glibc.py
parent3c8f1e6d7d8a4a60b4153f4458a657d23f190e71 (diff)
downloadopenembedded-core-contrib-0c35f931c1ddae8d07bad7e2c70ccbc14beaf44d.tar.gz
oeqa/selftest/glibc: Add elapsed time for glibc test report.
Capture the time taken for glibc test execution and pass it for inclusion in the test report. [YOCTO #15165] Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/glibc.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/glibc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py
index 924df6c5a6..bd56b2f6e7 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: MIT
#
import os
+import time
import contextlib
from oeqa.core.decorator import OETestTag
from oeqa.core.case import OEPTestResultTestCase
@@ -31,12 +32,16 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
features.append('EGLIBCPARALLELISM:task-check:pn-glibc-testsuite = "PARALLELMFLAGS="-j1""')
self.write_config("\n".join(features))
+ start_time = time.time()
+
bitbake("glibc-testsuite -c check")
+ end_time = time.time()
+
builddir = get_bb_var("B", "glibc-testsuite")
ptestsuite = "glibc-user" if ssh is None else "glibc"
- self.ptest_section(ptestsuite)
+ self.ptest_section(ptestsuite, duration = int(end_time - start_time))
with open(os.path.join(builddir, "tests.sum"), "r", errors='replace') as f:
for test, result in parse_values(f):
self.ptest_result(ptestsuite, test, result)