[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if no
Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"
Tue, 19 Apr 2016 21:32:41 +0200
Notmuch/0.19+1~g6b3e223 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)
Max Reitz <address@hidden> writes:
> On 19.04.2016 14:22, Sascha Silbe wrote:
>> # We are using TEST_DIR and QEMU_DEFAULT_MACHINE as proxies to
>> # indicate that we're not being run via "check". There may be
>> # other things set up by "check" that individual test cases rely
>> # on.
>> if test_dir is None or qemu_default_machine is None:
>> sys.stderr.write('Please run this test via the "check" script\n')
> I'm OK with that. I can imagine Markus isn't, because it's implying that
> you should only run this test through "check", whereas Markus says that
> maybe you have your own script and that is fine, too.
> 2. If you do want your own script, I guess setting up the necessary
> environment for each test is complicated enough to require you to know
> what you're doing. And if you know what you're doing, you won't really
> care about the wording of this warning anyway.
> I think this is just a warning for unwary users who just try to execute
> a python test directly because they think that maybe they can. [...]
Seems we're on the same page. For those who want to write their own test
runners, the comment in the source indicates why we recommend running
via "check", implying that they'd need to set up the environment just
like "check" does. That's more or less the best we can do in the current
situation, so I'll spin up a v2 with the above code block. If Markus
would like it explicitly spelled out in the comment or the error
message, that'd be fine with me, too. Feel free to amend locally before
merging in that case.
> Regarding b): If you separate the build tree from the source tree, you
> have to run the check script from the build tree. During the build
> process, qemu will in fact automatically create a symlink in the build
> tree. Therefore, in that case, you don't want to execute "./check" in
> the same directory as the test is in.
Whereas there probably are no symlinks to the individual test
cases. Good point.
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check", Markus Armbruster, 2016/04/18
[Qemu-devel] [PATCH for-2.6? v2] qemu-iotests: iotests: fail hard if not run via "check", Sascha Silbe, 2016/04/19