]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oeqa/runtime/rpm: fail tests if test rpm file cannot be found
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 26 Jan 2024 13:34:54 +0000 (14:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Jan 2024 08:12:24 +0000 (08:12 +0000)
commit5d7a6ede105ea1efc9c324c7029f9d08dadf7255
tree6cd8dc91a4905b39621d4d21243a2c0949324767
parentac8ea64bb39a5e56599e078c7e6cd056a2aa4144
oeqa/runtime/rpm: fail tests if test rpm file cannot be found

Discovery of the test file was happening in a class initializer.
That block of code cannot fail (it's not a test), and so it
falls through to completion even if the needed file could not be found.

Then the tests themselves fail later due to class variables not
being set, but all information as to why is already lost at that point.

This converts the discovery to a helper function called from
the tests, so that the function can fail the tests precisely when the
problems occur.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/rpm.py