[OE-core] [meta][lib/oeqa][PATCH v2] Meta runtime cases: add testcases for kernel sample

Richard Purdie richard.purdie at linuxfoundation.org
Sun Jun 3 16:06:10 UTC 2018


On Fri, 2018-06-01 at 12:01 -0400, Hongzhi.Song wrote:
> We are going to let runtime test support kernel tests. Now we just
> add
> kernel self-contained sample tests. And we plan to add overall kernel
> tests in the future.
> 
> This patch is just add kernel samples test which contains about 13
> tests
> enabled by kernel-sample.scc. So it needs statement,
> KERNEL_FEATURES_append += " kernel-sample/kernel-sample.scc" in
> local.conf.
> 
> Signed-off-by: Hongzhi.Song <hongzhi.song at windriver.com>
> ---
>  meta/lib/oeqa/runtime/cases/ksample.py     | 272
> +++++++++++++++++++++++++++++
>  meta/lib/oeqa/runtime/cases/ksample_abs.py | 272
> +++++++++++++++++++++++++++++
>  2 files changed, 544 insertions(+)
>  create mode 100644 meta/lib/oeqa/runtime/cases/ksample.py
>  create mode 100644 meta/lib/oeqa/runtime/cases/ksample_abs.py
> 
> diff --git a/meta/lib/oeqa/runtime/cases/ksample.py
> b/meta/lib/oeqa/runtime/cases/ksample.py
> new file mode 100644
> index 0000000..719f1a0
> --- /dev/null
> +++ b/meta/lib/oeqa/runtime/cases/ksample.py
> @@ -0,0 +1,272 @@
> +import os
> +import time
> +
> +from oeqa.runtime.case import OERuntimeTestCase
> +from oeqa.core.decorator.depends import OETestDepends
> +from oeqa.core.decorator.oeid import OETestID
> +from oeqa.core.decorator.data import skipIfNotFeature
> +
> +class KSample(OERuntimeTestCase):
> +    def send_cmd(self, cmd='', content=''):
> +        comd = cmd + " " + content
> +        status, ret = self.target.run(comd)
> +        msg = '%s failed, %s' % (comd, ret)
> +        self.assertEqual(status, 0, msg=msg)

Looks much better but KSample appears to be duplicated in the two
files. Can you avoid that duplication please!

Cheers,

Richard



More information about the Openembedded-core mailing list