summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/tinfoil.py
AgeCommit message (Collapse)Author
2023-11-23oeqa/selftest/tinfoil: Add tests that parse virtual recipesPeter Kjellerstedt
Running `devtool search gcc` would result in errors for virtual recipes. The reason was the newly introduced :layer-<layername> override. When tinfoil parsed the recipes using the parseRecipeFile() function, it failed to properly identify the layername for virtual recipes, which resulted in the errors. Add tests that exercise these code paths through parseRecipeFile(). (From OE-Core rev: cf7f34f93f9f90279412ea57d6d5930854d411ba) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-05oeqa/selftest/tinfoil: Add test for separate config_data with ↵Richard Purdie
recipe_parse_file() We've seen two different regressions in this API since it is used by layer-index but not be the core code. Add a test for it to try and ensure we don't break it again. (From OE-Core rev: b07de5de43ec9c9a2c5d496a64940ccdc5b47cf8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12lib: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01oeqa/selftest: remove unused importsRoss Burton
(From OE-Core rev: 7ef7b03eeefc0a9911fd62c73e346fa5aeeb09eb) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-26oeqa/selftest/tinfoil: Fix intermittent event loss issue in testRichard Purdie
We've been seeing occasional test failures on the autobuilder where we don't see the expected events. It turns out this is due to run_command being helpful and eating them if the server is fast and the client slow. Adding a sleep into the run_command code makes the failure consistent. Use a new "handle_events" argument to allow us to handle all the events which is what this test requires. [YOCTO #14585] (From OE-Core rev: 2292983c717b8cadcf0c443bb7b649a84ea5ad57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-18oeqa/selftest/tinfoil: Improve tinfoil event test debuggingRichard Purdie
We still see occasional test failures for unknown reasons. Add some debugging to show whether the matching files event was received even if the command complete wasn't. Also ensure any commandfailed/commandexit event is shown. This will hopefully aid debugging the next time the issue occurs. (From OE-Core rev: 2f7a788bb51ef09ee23c94176285437ea760fab7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-26oeqa/selftest/tinfoil: Update to use test commandRichard Purdie
We've had IO load issues on the autobuilder with this test. Avoid those by using a specilised test command instead. (From OE-Core rev: 106445b1eb74fc37e03c72a0c011541b50a16c19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-23oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_eventYi Fan Yu
The test would timeout on autobuilders. This patch increases the timeout to 60s The test will now also exit as soon as we receive the 2 expected events Expected runtime is around 1s if successful Bug 14158 (From OE-Core rev: be02aa9283f805de718badd5ea12c4968da8774f) Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-18selftest/tinfoil: Increase wait event timeoutRichard Purdie
We're seeing this on the autobuilder when IO load is high. Increase the timeout to give this a better chance of working out ok since there is no particular reason we only need to wait 5s and searching for files is IO sensitive. [YOCTO #14001] (From OE-Core rev: c847ed207795bc03f791ee5a3348fa5860c53e70) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-24oeqa/selftest/tinfoil: Drop test for functionality removed upstreamRichard Purdie
bitbake dropped support for this piece of functionality (the test was the only user), drop the test too. (From OE-Core rev: 9ba0708e34eb038dc3ea5a877a5837c534cf165f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09oeqa: Drop OETestIDRichard Purdie
These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31oe-selftest: tinfoil: add a test for variable historyPaul Eggleton
I recently found that variable history wasn't working properly for recipes when we enable history tracking, resulting in minor functionality loss in devtool upgrade, so add a test to ensure this doesn't regress now that it's fixed. (From OE-Core rev: f49042e707d641b59a71c687374b76df97c64c34) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16selftest/tinfoil: Filter LogRecords in test_event_waitRichard Purdie
As the code stands today, an event mask does not mask LogRecord events since the log levels are controlled separately. We therefore need to accept (and ignore) LogRecord events in this test to avoid errors. (From OE-Core rev: efe1f2c8ad09af3c5ee9c778601c7463c532b012) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08oeqa/tinfoil: Improve test_wait_event for race issuesRichard Purdie
The test could break in a variety of ways: a) If BB_HEARTBEAT_EVENT was less than ~0.25 it would hang indefinitely b) The mask is set after draining the event queue meaning a heartbeat event could have happened c) The test exits once it sees the events it wants, it doesn't check for spurious events such as heartbeats which shouldn't have occured. d) The hardcoded delay of 0.25 is nasty and shouldn't be needed. I found a bitbake bug and fixed that meaning we don't need the delay any more which fixes d). That means a) is no longer an issue either. We now set the mask, then drain the queue meaning no spurious events should be able to sneak in. The test is also tweaked to wait for 5s in total to ensure spurious events don't occur such as heartbeat events we shouldn't see. [YOCTO #11045] (From OE-Core rev: 7dd5dfc4d56f1201110d947ce1ca3c6d64fbc7da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23selftest: Add Testopia ID to test casesJose Perez Carranza
Add decorator @OETestID() with proper Tesopia TC ID to the test cases that did not have it set. (From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-06oeqa/selftest/cases: Migrate test cases into the new oe-qa frameworkLeonardo Sandoval
New framework has different classes/decorators so adapt current test cases to support these. Changes include changes on base classes and decorators. Also include paths in selftest/__init__.py isn't needed because the loader is the standard unittest one. (From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>