From: "Benjamin Esquivel" <benjamin.esquivel@linux.intel.com>
To: <mariano.lopez@linux.intel.com>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] selftest/seltest.py: Add test to check imports from other layers
Date: Wed, 13 Jul 2016 09:09:51 -0500 [thread overview]
Message-ID: <008101d1dd10$397e5190$ac7af4b0$@linux.intel.com> (raw)
In-Reply-To: <54304422afaa3f1b3c8504f9bf2e8e74b9f15837.1468328858.git.mariano.lopez@linux.intel.com>
Comments below
The test looks good.
> -----Original Message-----
> From: mariano.lopez@linux.intel.com
> [mailto:mariano.lopez@linux.intel.com]
> Sent: Tuesday, July 12, 2016 8:10 AM
> To: openembedded-core@lists.openembedded.org
> Cc: benjamin.esquivel@linux.intel.com; Mariano Lopez
> <mariano.lopez@linux.intel.com>
> Subject: [PATCH 1/1] selftest/seltest.py: Add test to check imports from
> other layers
>
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
> This tests adds a check of selftest itself to verify if can add test from
other
> layers.
>
> [YOCTO #9770]
>
> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
> ---
> meta-selftest/lib/oeqa/selftest/imported.py | 14 ++++++++++++++
> meta/lib/oeqa/selftest/seltest.py | 19 +++++++++++++++++++
> 2 files changed, 33 insertions(+)
> create mode 100644 meta-selftest/lib/oeqa/selftest/imported.py
> create mode 100644 meta/lib/oeqa/selftest/seltest.py
>
> diff --git a/meta-selftest/lib/oeqa/selftest/imported.py b/meta-
> selftest/lib/oeqa/selftest/imported.py
> new file mode 100644
> index 0000000..b80150b
> --- /dev/null
> +++ b/meta-selftest/lib/oeqa/selftest/imported.py
> @@ -0,0 +1,14 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.decorators
> +import testcase
> +
> +class ImportedTests(oeSelfTest):
> +
> + def test_import_dummy(self):
There is a bug where I am proposing some changes to the naming of the tests.
I'll take this test name as an example:
imported.ImportedTests.test_import_dummy. With my proposal I'd name this
test something more along these lines:
external_layer.ImportedTests.test_inconditional_pass.
> + """
> + Summary: Doesn't check anything, used to check import test from
other
> layers.
> + Expected: 1. Pass unconditionally
> + Product: oe-core
> + Author: Mariano Lopez <mariano.lopez@intel.comr
typo at the end of the line
> + """
> +
> + self.assertEqual(True, True, msg = "Impossible to fail this
> + test")
> diff --git a/meta/lib/oeqa/selftest/seltest.py
> b/meta/lib/oeqa/selftest/seltest.py
> new file mode 100644
> index 0000000..ea185ec
> --- /dev/null
> +++ b/meta/lib/oeqa/selftest/seltest.py
> @@ -0,0 +1,19 @@
> +from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands
> +import runCmd from oeqa.utils.decorators import testcase
> +
> +class Selftest(oeSelfTest):
> +
> + def test_import_test_from_layer(self):
Based on the naming guidelines comment above, proposing something like:
selftest.externalLayer.test_list_imported
> + """
> + Summary: Checks functionality to import tests from other layers.
> + Expected: 1. Must show "test_import_dummy" in the test list.
> + Product: oe-core
> + Author: Mariano Lopez <mariano.lopez@intel.com>
> + """
> +
> + test_name = "imported.ImportedTests.test_import_dummy"
> + error_msg = "Couldn't find test: %s; Not importing tests from
other
> layers" % test_name
> + result = runCmd("oe-selftest --list-tests")
> + success = True if test_name in result.output else False
> + self.assertEqual(success, True, msg = error_msg)
> --
> 2.6.6
next prev parent reply other threads:[~2016-07-13 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1468328858.git.mariano.lopez@linux.intel.com>
2016-07-12 13:09 ` [PATCH 1/1] selftest/seltest.py: Add test to check imports from other layers mariano.lopez
2016-07-13 14:09 ` Benjamin Esquivel [this message]
2016-07-13 20:05 ` Mariano Lopez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='008101d1dd10$397e5190$ac7af4b0$@linux.intel.com' \
--to=benjamin.esquivel@linux.intel.com \
--cc=benjamin.esquivel@intel.com \
--cc=mariano.lopez@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.