-
Notifications
You must be signed in to change notification settings - Fork 157
Add Test Suite
This step is to prepare the test environment such as building the test suite, installing necessary dependencies and etc. It generates ${test_suite}.cgz by below scripts
pack/${test_suite}
distro/depends/${test_suite}-dev
distro/depends/${test_suite}
A test suite specific script is required to generate the cgz, which is added at pack/${test_suite}. This typically does steps like download the source, build the source and install necessary files to cgz, e.g. pack/hwsim.
Meanwhile, a dependency description file is needed if there's any dependencies required when building the source, which is added at distro/depends/${test_suite}, e.g. distro/depends/hwsim-dev. The packing system will install necessary dependencies according to it before running the pack code.
Another dependency description file is used for runtime, which is added at distro/depends/${test_suite}, e.g. distro/depends/hwsim.
A job file is in the yaml format to describe the properties of a job. Usually we have one default yaml for each of the test suite, e.g jobs/hwsim.yaml.
$ cat > jobs/${test_suite}.yaml
testcase: ${test_suite}
${test_suite}:
[CTRL+D]
We then can use lkp install to verify the pack step.
$ lkp install jobs/${test_suite}.yaml
The script executes the test, and can take parameters defined in job.yaml, which is added at tests/${test_suite}, e.g. tests/hwsim.
It extracts the meaningful part of the test output and converts it to "key: value" style, which is added at stats/${test_suite}, e.g. stats/hwsim.
$ lkp split-job jobs/${test_suite}.yaml
$ lkp run ${one_of_the_splitted_job}.yaml
Currently, below changes are needed to add a test suite
pack/${test_suite}
distro/depends/${test_suite}-dev
distro/depends/${test_suite}
jobs/${test_suite}
tests/${test_suite}
stats/${test_suite}