summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-04-09 02:24:24 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-10 18:10:25 +0100
commitf626c58c325bfbf5fce1b5b2defafee9c6b74ea3 (patch)
tree9ef4e822c512b9b3c08a3fdba42605f7e7d3cf47 /meta/classes/testimage.bbclass
parent206d532180eca9c32e86d1ee36d4b8c61b15436b (diff)
downloadpoky-f626c58c325bfbf5fce1b5b2defafee9c6b74ea3.tar.gz
testimage: sort modules based on dependencies
TEST_SUITES="auto" is useful to run all suitable tests without having to hard-code the list. However, it did not take test dependencies into account, which can be an issue for tests which really depend on some other test to run first. To fix this, modules get loaded in the order determined by TESTS_SUITES, but then get re-ordered based on dependencies derived from @skipUnlessPassed before running them. The original order is used to break ties when there are no dependencies, so reordering only occurs when really necessary. @skipUnlessPassed gets extended such that it makes the test name a method depends on available for inspection by the test loader in oetest.py. Unfortunately Python's unittest offers no API to inspect tests in a TestSuite, so the code has to rely on implementation details to find all tests. The worst that can happen when the implementation changes is that tests are not found and reordering does not happen. (From OE-Core rev: 6e4543a35836c572b23b9f8162b19d1e038d3ed2) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 683173854d..dc163c7313 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -16,7 +16,11 @@
16# The test names are the module names in meta/lib/oeqa/runtime. 16# The test names are the module names in meta/lib/oeqa/runtime.
17# Each name in TEST_SUITES represents a required test for the image. (no skipping allowed) 17# Each name in TEST_SUITES represents a required test for the image. (no skipping allowed)
18# Appending "auto" means that it will try to run all tests that are suitable for the image (each test decides that on it's own). 18# Appending "auto" means that it will try to run all tests that are suitable for the image (each test decides that on it's own).
19# Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies. 19# Note that order in TEST_SUITES is relevant: tests are run in an order such that
20# tests mentioned in @skipUnlessPassed run before the tests that depend on them,
21# but without such dependencies, tests run in the order in which they are listed
22# in TEST_SUITES.
23#
20# A layer can add its own tests in lib/oeqa/runtime, provided it extends BBPATH as normal in its layer.conf. 24# A layer can add its own tests in lib/oeqa/runtime, provided it extends BBPATH as normal in its layer.conf.
21 25
22# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login. 26# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login.