]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest: For toolchain tests do not fail if a test failed
authorNathan Rossi <nathan@nathanrossi.com>
Wed, 4 Sep 2019 14:23:23 +0000 (14:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 7 Sep 2019 20:52:27 +0000 (21:52 +0100)
Do not fail the running selftest test case if the test suite has a
failed test case. Currently toolchain tests suites (binutils, gcc,
glibc) fail but this does not indicate failure to execute the tests.

Also remove the logging of each test that failed.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/binutils.py
meta/lib/oeqa/selftest/cases/gcc.py
meta/lib/oeqa/selftest/cases/glibc.py

index 4edee09390873dd6710faeff58d680d097361397..7f887959e41fc9cd7c07f4f07dacaee637bff16e 100644 (file)
@@ -52,13 +52,7 @@ class BinutilsCrossSelfTest(OESelftestTestCase):
         if not os.path.exists(sumspath):
             sumspath = os.path.join(builddir, suite, "testsuite", "{0}.sum".format(suite))
 
-        failed = 0
         with open(sumspath, "r") as f:
             for test, result in parse_values(f):
                 self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result}
-                if result == "FAIL":
-                    self.logger.info("failed: '{}'".format(test))
-                    failed += 1
-
-        self.assertEqual(failed, 0)
 
index 0b0157e568d6dee816be543486b1444af12f61c9..dba453f00afb00a792ae44a2508332fdc6f1a439 100644 (file)
@@ -71,7 +71,6 @@ class GccSelfTest(OESelftestTestCase):
         bb_vars = get_bb_vars(["B", "TARGET_SYS"], recipe)
         builddir, target_sys = bb_vars["B"], bb_vars["TARGET_SYS"]
 
-        failed = 0
         for suite in suites:
             sumspath = os.path.join(builddir, "gcc", "testsuite", suite, "{0}.sum".format(suite))
             if not os.path.exists(sumspath): # check in target dirs
@@ -84,11 +83,6 @@ class GccSelfTest(OESelftestTestCase):
             with open(sumspath, "r") as f:
                 for test, result in parse_values(f):
                     self.tc.extraresults["ptestresult.{}.{}".format(ptestsuite, test)] = {"status" : result}
-                    if result == "FAIL":
-                        self.logger.info("failed: '{}'".format(test))
-                        failed += 1
-
-        self.assertEqual(failed, 0)
 
 class GccSelfTestSystemEmulated(GccSelfTest):
     default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp"]
index 6a34da39d9747b437f3a15b74a0e4fb6fd3f3a6c..7992ea6bf2bcf3bc46b236b950118923de7e0c03 100644 (file)
@@ -43,15 +43,10 @@ class GlibcSelfTest(OESelftestTestCase):
 
         builddir = get_bb_var("B", "glibc-testsuite")
 
-        failed = 0
         self.tc.extraresults["ptestresult.sections"]["glibc"] = {}
         with open(os.path.join(builddir, "tests.sum"), "r") as f:
             for test, result in parse_values(f):
                 self.tc.extraresults["ptestresult.glibc.{}".format(test)] = {"status" : result}
-                if result == "FAIL":
-                    self.logger.info("failed: '{}'".format(test))
-                    failed += 1
-        self.assertEqual(failed, 0)
 
 class GlibcSelfTestSystemEmulated(GlibcSelfTest):
     default_installed_packages = [