Dear Max, Max Reitz <mre...@redhat.com> writes:
> On 14.04.2016 13:32, Sascha Silbe wrote: [tests/qemu-iotests/iotests.py] [...] >> def main(supported_fmts=[], supported_oses=['linux']): >> '''Run tests''' >> >> + if test_dir is None or qemu_default_machine is None: > > I think checking test_dir would have been sufficient; this makes it look > like it might want to be a complete list of variables that have to be > set, but then "cachemode" is missing. Markus Armbruster basically pointed out the same issue, so how about this version: # 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') sys.exit(os.EX_USAGE) >> + sys.stderr.write('Please run this test via ./check\n') > > Or not ./, for people who have separate build and source trees, you > don't want to invoke check in the source tree. ;-) Yeah, was thinking about that, but ultimately considered ./check to be the best indication of a) "check" being the name of a script and b) residing in the same directory as the test. But I don't care much about this, so see the above version. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641