Image tests: Difference between revisions
From Yocto Project
Jump to navigationJump to search
(Created page with " The build system has the ability to run a series of automated tests for qemu images. All the tests are actually commands run on the target image over ssh. (and the tests themsel...") |
No edit summary |
||
Line 1: | Line 1: | ||
The build system has the ability to run a series of automated tests for qemu images. All the tests are actually commands run on the target image over ssh. (and the tests themselves are written in Python, using unittest as a test runner) | The build system has the ability to run a series of automated tests for qemu images. All the tests are actually commands run on the target image over ssh. (and the tests themselves are written in Python, using unittest as a test runner) | ||
The class that enables this is testimage.bbclass. | The class that enables this is testimage.bbclass. | ||
To use it add "testimage" to global inherit and call your target image with -c testimage, like this: | To use it add "testimage" to global inherit and call your target image with -c testimage, like this: | ||
- for example build a qemu core-image-sato: bitbake core-image-sato | - for example build a qemu core-image-sato: bitbake core-image-sato | ||
- add INHERIT += "testimage" in local.conf | - add INHERIT += "testimage" in local.conf | ||
- then call "bitbake core-image-sato -c testimage". That will run a standard suite of tests. | - then call "bitbake core-image-sato -c testimage". That will run a standard suite of tests. | ||
You can change the tests run by appending or overrding the TEST_SUITES variable in local.conf | You can change the tests run by appending or overrding the TEST_SUITES variable in local.conf | ||
The test names are the module names in meta/lib/oeqa/runtime. | The test names are the module names in meta/lib/oeqa/runtime. | ||
Each name in TEST_SUITES represents a required test for the image. (no skipping allowed) | Each name in TEST_SUITES represents a required test for the image. (no skipping allowed) | ||
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). | 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). | ||
Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies. | Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies. |
Revision as of 12:52, 12 August 2013
The build system has the ability to run a series of automated tests for qemu images. All the tests are actually commands run on the target image over ssh. (and the tests themselves are written in Python, using unittest as a test runner)
The class that enables this is testimage.bbclass. To use it add "testimage" to global inherit and call your target image with -c testimage, like this:
- for example build a qemu core-image-sato: bitbake core-image-sato - add INHERIT += "testimage" in local.conf - then call "bitbake core-image-sato -c testimage". That will run a standard suite of tests.
You can change the tests run by appending or overrding the TEST_SUITES variable in local.conf The test names are the module names in meta/lib/oeqa/runtime. Each name in TEST_SUITES represents a required test for the image. (no skipping allowed) 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). Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies.