- add test dependencies
- Tim, AGL, Seimens
- very high
This feature allows the test creator to specify a set of dependencies that are checked before a test is invoked. It is intended that this be used for high-level sanity-checks - that is, to specify resources or configurations that, if missing, invalidate the entire test. If these are missing it makes it impossible to run the test.
Some tests check for features themselves, and abort the test or skip sub-tests if the features cannot be found. Individual tests use their own mechanisms for testing for these types of conditions.
These are checks intended to be used by the base script to validate whether a particular test even applies to a certain target (or target configuration).
The dependency checks are processed during the pre_test phase, and if the dependencies are not met, the test is aborted with a failure.
- check_capability - check for the presence of a CAP_FEATURE environment variable
- this is used to check free-form variables (defined in the board or distro files)
- assert_define - check for the presence of an environment variable
- this is used to check for test_spec variables
- is_on_target - check for the presence of a file on the target system
- dependency on a specific hardware feature (such as touchpad, video, audio)
- dependency on a system capability (such as networking, file system, user accounts, etc.)
- dependency on a particular kernel configuration
- these are often used as proxies for system capabilities or hardware
- dependency on a file or executable on the target
- what does 0-day do for test dependencies?
- uses 'need_xxx' directives (which are declarative)
- the following are supported:
- need_kconfig: CONFIG_
- example: need_kernel_headers: true
- example: need_memory 2G
- number of cpus, not used
- what does fuego do? (imperative)
- what does kernelci
- what does LTP do? *
- declare dependencies as environment variables:
- need_kconfig=CONFIG_MD_RAID ...
Both NEED_xxx variables and test_pre_check functions are supported by Fuego. See Dependencies.