[OE-core] [PATCH 3/3] oeqa/selftest/runtime_test: simplify postinst testing
Burton, Ross
ross.burton at intel.com
Thu Nov 23 10:21:28 UTC 2017
On 23 November 2017 at 01:34, Joshua Lock <joshua.g.lock at linux.intel.com>
wrote:
> @OETestID(1540)
>>
>
> We're effectively stating that test ID 1540 and test ID 1545 are both
> covered by the same test method, right?
>
> Perhaps we don't need to maintain both test cases in Testopia, as we'll
> only ever see both tests pass or fail?
Yes, reviewing and sanitising testopia was my next job.
- features = 'MACHINE = "qemux86"\n'
>> - features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s
>> "\n'% (rootfs_pkg, boot_pkg)
>> + features = 'CORE_IMAGE_EXTRA_INSTALL =
>> "postinst-delayed-b"\n'
>> features += 'IMAGE_FEATURES += "package-management
>> empty-root-password"\n'
>>
>
> The indentation doesn't look right here?
That would be Atom "helpfully" doing smart intentation. I'll fix it up in
something else, thanks.
> + status, output = qemu.run_serial("test -f %s
>> && echo found" % os.path.join(targettestdir, filename))
>> + self.assertEqual(output, "found", "%s was
>> not present on boot" % filename)
>>
>>
> Why not just test the status (return code of test -f) instead of echoing a
> known value? i.e.
>
> self.assertEqual(status, 0, "%s was not present on boot" % filename)
Because run_serial() is a bit lame and I don't trust it to correctly report
the exit status. Rewriting it is on my hitlist, yes.
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171123/654de269/attachment-0002.html>
More information about the Openembedded-core
mailing list