From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] testing/tests/package/test_python: refactor to support better code reuse
Date: Thu, 6 Jul 2017 09:08:21 +0200 [thread overview]
Message-ID: <20170706090821.64b4948b@windsurf> (raw)
In-Reply-To: <ba95e326-7229-d4a1-3e1c-b4aae54a4f5d@mind.be>
Hello,
On Thu, 6 Jul 2017 00:09:10 +0200, Arnout Vandecappelle wrote:
> >>> + def login(self, timeout=5):
> >>> cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
> >>> self.emulator.boot(arch="armv5",
> >>> kernel="builtin",
> >>> - options=["-initrd", cpio_file])
> >>> + options=["-initrd", cpio_file],
> >>> + timeout)
> >>> self.emulator.login()
> >>> - cmd = "python --version 2>&1 | grep '^Python 2'"
> >>> - _, exit_code = self.emulator.run(cmd)
> >>> - self.assertEqual(exit_code, 0)
> >>
> >> I'm not a big fan of having a method called .login() also start the
> >> interpreter, it feels a bit weird.
> >>
> >
> > I'll split it in the code into custom "boot()" and "login()" in v2,
> > unless you have something else in mind.
>
> I *think* this is a mistake on Thomas's part, that he thought the login()
> function would boot, login and start Python. I.e., he missed the - in front of
> the line. For me at least it's very natural that the login() function does the
> boot + login.
Ah, indeed. My bad. It's perfectly fine for me if a .login() or .boot()
method does both the boot+login.
Sorry for having misread the patch :/
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-07-06 7:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 18:58 [Buildroot] [PATCH 1/3] testing/infra/emulator: allow to specify pexpect timeout Andrey Smirnov
2017-07-04 18:58 ` [Buildroot] [PATCH 2/3] testing/tests/package/test_python: refactor to support better code reuse Andrey Smirnov
2017-07-05 10:59 ` Thomas Petazzoni
2017-07-05 21:30 ` Andrey Smirnov
2017-07-05 22:09 ` Arnout Vandecappelle
2017-07-06 7:08 ` Thomas Petazzoni [this message]
2017-07-04 18:58 ` [Buildroot] [PATCH 3/3] testing/tests/package: add basic unit test for IPython Andrey Smirnov
2017-07-06 1:29 ` Ricardo Martincoski
2017-07-05 10:57 ` [Buildroot] [PATCH 1/3] testing/infra/emulator: allow to specify pexpect timeout Thomas Petazzoni
2017-07-05 21:27 ` Andrey Smirnov
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=20170706090821.64b4948b@windsurf \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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