| Summary: | oe-selftest: --run-tests ignores test order | ||
|---|---|---|---|
| Product: | [QA/Testing] Build Testing | Reporter: | Patrick Ohly <patrick.ohly> |
| Component: | general | Assignee: | Sangeeta Jain <sangeeta.jain> |
| Status: | RESOLVED OBSOLETE | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | jair.de.jesus.gonzalez.plascencia, juan.m.cruz.alcaraz, sangeeta.jain |
| Version: | 2.4 | ||
| Target Milestone: | 4.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Patrick Ohly
2017-07-05 06:45:32 UTC
Probably related and might be fixed at the same time, so let me just add it here: invoking "oe-selftest -r foobar" success instead of failing with an error about "foobar" not being found. $ oe-selftest -r foobar 2017-07-10 14:56:47,643 - oe-selftest - INFO - Adding layer libraries: 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/meta-intel-iot-security/meta-security-smack/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/meta-intel-iot-security/meta-integrity/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/meta-security-tools/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/intel-iot-refkit//meta-refkit/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/intel-iot-refkit/openembedded-core/meta/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/intel-iot-refkit/openembedded-core/meta-selftest/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/intel-iot-refkit//meta-refkit-core/lib 2017-07-10 14:56:47,643 - oe-selftest - INFO - /fast/work/intel-iot-refkit//meta-iotqa/lib 2017-07-10 14:56:47,644 - oe-selftest - INFO - /fast/work/intel-iot-refkit/meta-security-isafw/lib 2017-07-10 14:56:47,644 - oe-selftest - INFO - /fast/work/meta-swupd/lib 2017-07-10 14:56:47,644 - oe-selftest - INFO - /fast/work/meta-intel-iot-security/meta-security-framework/lib 2017-07-10 14:56:47,648 - oe-selftest - INFO - Running: bitbake -p 2017-07-10 14:56:49,818 - oe-selftest - INFO - Loading cache...done. 2017-07-10 14:56:51,009 - oe-selftest - INFO - Loaded 3538 entries from dependency cache. 2017-07-10 14:56:52,109 - oe-selftest - INFO - Parsing recipes...done. 2017-07-10 14:56:52,518 - oe-selftest - INFO - Parsing of 2626 .bb files complete (2622 cached, 4 parsed). 3542 targets, 419 skipped, 0 masked, 0 errors. 2017-07-10 14:56:52,623 - oe-selftest - INFO - 2017-07-10 14:56:52,623 - oe-selftest - INFO - ---------------------------------------------------------------------- 2017-07-10 14:56:52,623 - oe-selftest - INFO - Ran 0 tests in 0.001s 2017-07-10 14:56:52,623 - oe-selftest - INFO - 2017-07-10 14:56:52,624 - oe-selftest - INFO - OK 2017-07-10 14:56:52,624 - oe-selftest - INFO - RESULTS: 2017-07-10 14:56:52,624 - oe-selftest - INFO - SUMMARY: 2017-07-10 14:56:52,624 - oe-selftest - INFO - oe-selftest () - Ran 0 tests in 0.002s 2017-07-10 14:56:52,624 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (In reply to comment #1) > Probably related and might be fixed at the same time, so let me just add it > here: invoking "oe-selftest -r foobar" success instead of failing with an > error about "foobar" not being found. > > $ oe-selftest -r foobar > 2017-07-10 14:56:47,643 - oe-selftest - INFO - Adding layer libraries: > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/meta-intel-iot-security/meta-security-smack/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/meta-intel-iot-security/meta-integrity/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/meta-security-tools/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/intel-iot-refkit//meta-refkit/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/intel-iot-refkit/openembedded-core/meta/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/intel-iot-refkit/openembedded-core/meta-selftest/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/intel-iot-refkit//meta-refkit-core/lib > 2017-07-10 14:56:47,643 - oe-selftest - INFO - > /fast/work/intel-iot-refkit//meta-iotqa/lib > 2017-07-10 14:56:47,644 - oe-selftest - INFO - > /fast/work/intel-iot-refkit/meta-security-isafw/lib > 2017-07-10 14:56:47,644 - oe-selftest - INFO - /fast/work/meta-swupd/lib > 2017-07-10 14:56:47,644 - oe-selftest - INFO - > /fast/work/meta-intel-iot-security/meta-security-framework/lib > 2017-07-10 14:56:47,648 - oe-selftest - INFO - Running: bitbake -p > 2017-07-10 14:56:49,818 - oe-selftest - INFO - Loading cache...done. > 2017-07-10 14:56:51,009 - oe-selftest - INFO - Loaded 3538 entries from > dependency cache. > 2017-07-10 14:56:52,109 - oe-selftest - INFO - Parsing recipes...done. > 2017-07-10 14:56:52,518 - oe-selftest - INFO - Parsing of 2626 .bb files > complete (2622 cached, 4 parsed). 3542 targets, 419 skipped, 0 masked, 0 > errors. > 2017-07-10 14:56:52,623 - oe-selftest - INFO - > 2017-07-10 14:56:52,623 - oe-selftest - INFO - > ---------------------------------------------------------------------- > 2017-07-10 14:56:52,623 - oe-selftest - INFO - Ran 0 tests in 0.001s > 2017-07-10 14:56:52,623 - oe-selftest - INFO - > 2017-07-10 14:56:52,624 - oe-selftest - INFO - OK > 2017-07-10 14:56:52,624 - oe-selftest - INFO - RESULTS: > 2017-07-10 14:56:52,624 - oe-selftest - INFO - SUMMARY: > 2017-07-10 14:56:52,624 - oe-selftest - INFO - oe-selftest () - Ran 0 tests > in 0.002s > 2017-07-10 14:56:52,624 - oe-selftest - INFO - oe-selftest - OK - All > required tests passed Hi Patrick, We have a separate bug for this, see, https://bugzilla.yoctoproject.org/show_bug.cgi?id=11645 Anibal The change is not trivial, as the current OEQA framework extends the upstream unittest library which uses recursion to discover the test cases, and sorts them on alphabetical order by default. It is possible to change the default unittest behavior and re-order the test cases afterwards on the way specified on the command line, but some other aspects need to be considered. For example, the framework and the oe-selftest tool allow to specify modules, classes or test cases, or any combination of them. Also, with the inclusion of dependency decorators, the order of test cases is re-arranged according to their dependencies. Finally, the framework also allows the possibility to specify a module manifest file to list the tests to execute, so it may be necessary to re-order the tests in a similar way as specified in the file if that option is used, to have a consistent behavior. Considering we will be changing the default unittest behavior, it also may be convenient to have a new option in the tool to allow to specify the required order. According to this, and this item's priority, I'll modify its target milestone to 2.5 M1. With current testcases in oeqa/runtime, the order in which test cases are run doesn't really matter. |