From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Implement pytest-based test infrastructure
Date: Mon, 23 Nov 2015 16:55:49 -0700 [thread overview]
Message-ID: <5653A785.4010709@wwwdotorg.org> (raw)
In-Reply-To: <20151123234415.GE9551@bill-the-cat>
On 11/23/2015 04:44 PM, Tom Rini wrote:
> On Thu, Nov 19, 2015 at 10:00:32AM -0700, Stephen Warren wrote:
...
>> See the following in test/py/README.md:
>>
>>> ## Requirements
>>>
>>> The test suite is implemented using pytest. Interaction with the U-Boot
>>> console uses pexpect. Interaction with real hardware uses the tools of your
>>> choice; you get to implement various "hook" scripts that are called by the
>>> test suite at the appropriate time.
>>>
>>> On Debian or Debian-like distributions, the following packages are required.
>>> Similar package names should exist in other distributions.
>>>
>>> | Package | Version tested (Ubuntu 14.04) |
>>> | -------------- | ----------------------------- |
>>> | python | 2.7.5-5ubuntu3 |
>>> | python-pytest | 2.5.1-1 |
>>> | python-pexpect | 3.1-1ubuntu0.1 |
>>
>> In the main Python code, I trapped at least one exception location
>> and made it print a message about checking the docs for missing
>> requirements. I can probably patch the top-level test.py to do the
>> same.
>
> Isn't there some way to inject the local to U-Boot copy of the libraries
> in? I swear I've done something like that before in python..
It would certainly be possible to either check in the required Python
libraries in the U-Boot source tree, or include instructions for people
to manually create a "virtualenv" (or perhaps even automatically do this
from test.py). However, I was hoping to avoid the need to for that since
those options are a bit more complex than "just install these 3 packages
and run the script". (And in fact I've already mentioned
virtualenv-based setup instructions in the README for people which
archaic distros).
Still, if we find that varying versions of pytest/pexpect don't work
well, we could certainly choose one of those options.
BTW, I've created a ton of patches on top of all these that I haven't
posted yet. See:
git://github.com/swarren/u-boot.git tegra_dev
I'm not sure if I should squash all that into a V2 of this patch, or
just post them all as incremental fixes/enhancements?
prev parent reply other threads:[~2015-11-23 23:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-15 6:53 [U-Boot] [PATCH] Implement pytest-based test infrastructure Stephen Warren
2015-11-19 14:45 ` Simon Glass
2015-11-19 17:00 ` Stephen Warren
2015-11-19 19:09 ` Stephen Warren
2015-11-21 16:49 ` Simon Glass
2015-11-22 17:30 ` Stephen Warren
2015-11-24 1:45 ` Simon Glass
2015-11-24 2:18 ` Simon Glass
2015-11-24 4:24 ` Stephen Warren
2015-11-24 4:44 ` Stephen Warren
2015-11-24 19:04 ` Simon Glass
2015-11-24 21:28 ` Stephen Warren
2015-11-27 2:52 ` Simon Glass
2015-11-30 17:13 ` Stephen Warren
2015-12-01 16:40 ` Simon Glass
2015-12-01 23:24 ` Stephen Warren
2015-12-02 13:37 ` Simon Glass
2015-11-23 23:44 ` Tom Rini
2015-11-23 23:55 ` Stephen Warren [this message]
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=5653A785.4010709@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox