[OE-core] [PATCH 3/3] runtime/cases/ptest.py: fail when ptests fail on target

Burton, Ross ross.burton at intel.com
Wed Dec 20 17:23:33 UTC 2017


So the context was that so many ptests were failing that the test couldn't
be done automatically and expected to succeed. Bugs were filed and the
problem chipped away at, but last I looked it wasn't in a state to be
enabled.

If a core-image-sato passes with ptests enabled then that's great, but I'll
be surprised if it does!

Ross

On 20 December 2017 at 15:45, Alexander Kanavin <
alexander.kanavin at linux.intel.com> wrote:

> That's the whole point isn't it? Previously this testcase succeeded
> even if some of the underlying on-target tests failed; the only way
> to find out if anything was wrong was to manually inspect the logs.
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>  meta/lib/oeqa/runtime/cases/ptest.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/lib/oeqa/runtime/cases/ptest.py
> b/meta/lib/oeqa/runtime/cases/ptest.py
> index 6669e24f141..c5b8c9cb8fb 100644
> --- a/meta/lib/oeqa/runtime/cases/ptest.py
> +++ b/meta/lib/oeqa/runtime/cases/ptest.py
> @@ -83,3 +83,11 @@ class PtestRunnerTest(OERuntimeTestCase):
>              # Remove the old link to create a new one
>              os.remove(ptest_log_dir_link)
>          os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
> +
> +        failed_tests = {}
> +        for section in parse_result.result_dict:
> +            failed_testcases = [ test for test, result in
> parse_result.result_dict[section] if result == 'fail' ]
> +            if failed_testcases:
> +                failed_tests[section] = failed_testcases
> +
> +        self.assertFalse(failed_tests, msg = "Failed ptests: %s"
> %(str(failed_tests)))
> --
> 2.15.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171220/260e92ea/attachment-0002.html>


More information about the Openembedded-core mailing list