aboutsummaryrefslogtreecommitdiff
path: root/kernelci/configs.py
AgeCommit message (Collapse)Author
2019-09-04kernelci.configs: convert to kernelci.config.{build,test}Guillaume Tucker
* convert kernelci.configs into a new kernelci.config package with kernelci.config.build and kernelci.config.test * update kci_build and lava-v2-jobs-from-api.py accordingly * update unit tests accordingly Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-08-30kernelci.configs: add params to DeviceTypeKhouloud Touil
Use params to generalize the arguments which could be needed for a specific DeviceType. Suggested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Khouloud Touil <ktouil@baylibre.com> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-08-29kernelci.configs.DeviceType: rename .type_name as .base_nameGuillaume Tucker
Rename DeviceType.type_name as .base_name and update the YAML and all places where this is used accordingly. Using .base_name removes some ambiguity that the "type:" attribute in YAML and DeviceType.type_name had introduced as it wasn't clear what the purpose if it was. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-08-29Use yaml safe_load insteald of loadCorentin LABBE
On my gentoo, using yaml.load now give: Traceback (most recent call last): raise RuntimeError("Unsafe load() call disabled by Gentoo. See bug #659348") RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348 Note that on recent ubuntu, a warning appears also. YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. This is due to a security risk of using yaml.load() Since kernelci-core does not rely on any behavour provided by load(), let's convert the call to safe_load().
2019-08-27kernelci.configs.DeviceType: add .type_name instead of .nameGuillaume Tucker
Add DeviceType.type_name with the value of the type attribute in the YAML config. This is to help differentiate between the device type configuration name (e.g. qemu_arm64) and the device type name used in jobs (e.g. qemu). Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-07-11kernelci.configs: add Regex filter typeGuillaume Tucker
Add Regex filter type which acts as a whitelist but with a regular expression that needs to match instead of a list of keywords. This is in particular useful for filtering defconfigs, to be able to whitelist "defconfig" but not any "*defconfig" as the Whitelist would do. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-07-04Add first ARC device: hsdkCorentin LABBE
This patchs adds support for the ARC architecture. It adds the first boards using this arch, the HSDK
2019-05-03kernelci.configs.BuildEnvironment: add cross_compile()Guillaume Tucker
Add a BuildEnvironment.cross_compile() method to get the cross-compiler string associated with a build environment for a given CPU architecture. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-04-25test-configs: add support for ar9331Michael Grzeschik
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
2019-04-23Add basic configs tests using pytestDan Rue
- Test parsing ./build-configs.yaml - Add some additional test yaml files to verify edge cases - Fix issues in configs.py related to empty fragments, build_config_defaults, and when architecture is None Makefile provided for convenience, with recommended invocation of pytest. Due to the way this project is structured (specifically, that it lacks a setup.py), pytest must be run using python -m. Example usage: drue@xps:~/src/kernelci/kernelci-core$ make python -m pytest ========================================== test session starts ========================================== platform linux2 -- Python 2.7.15, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 rootdir: /home/drue/src/kernelci/kernelci-core, inifile: collected 3 items tests/test_configs.py ... [100%] ======================================= 3 passed in 0.13 seconds ======================================== Signed-off-by: Dan Rue <dan.rue@linaro.org>
2019-03-21kernelci.configs: add docstrings for build configurationsGuillaume Tucker
Add docstrings for all the build config related classes. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-03-15kernelci.configs: add Architecture and use it in BuildVariantGuillaume Tucker
Add a new Architecture class to define which configs to build for each architecture in YAML, and use it in BuildVariant in place of arch_list. This should provide enough flexibility to cope with every existing special case in the KernelCI monitored branches. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-03-15kernelci.configs: add Fragment.defconfigGuillaume Tucker
Add Fragment.defconfig attribute to use as a defconfig value to build rather than the fragment file name. This is needed in particular for tinyconfig, which is a valid make target but only if the tiny.config fragment is present. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-03-15kernelci.configs: convert BuildEnvironment.cc_version as strGuillaume Tucker
The compiler version is typically a number, which gets parsed as an integer from the YAML configuration. Convert it to a string object explicitly to avoid this ambiguity and to be able to perform string operations on it. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-03-15kernelci.configs: fix default values with new object instancesGuillaume Tucker
Using a default sequence object in a function's arguments can lead to complications when the same default object instance is modified as it will be used each time the function is called. It's safer to use None as the default value and create a new empty object instance every time. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-03-15kernelci.configs: fix case where a YAML dict is emptyGuillaume Tucker
In some cases it may be valid to list a YAML dictionary entry with no key-value pairs. Deal with that situation in kernelci.configs by defaulting to an empty Python dictionary. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-25kernelci.configs: add BuildVariant and update related implementationGuillaume Tucker
Add BuildVariant class to define multiple ways of build a single tree/branch build configuration. This is required in order to be able to build all the variants together as builds from multiple compilers will typically be stored and reported together, following the kernel revision. Keeping separate build configurations for different build environments makes it hard to then group these things again. * add kernelci.configs.BuildVariant class and create a list of them in BuildConfig * kci_build: add list_variants command and a --variant option and use it to update the implementation accordingly * build-configs.yaml: update defaults to have gcc-7 as the only variant unless otherwise specified in each build configuration Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-25kernelci.configs: add build environment YAML configurationGuillaume Tucker
Add the BuildEnvironment class to describe a build environment with a compiler name and version, as well as a dictionary to map architecture names between the kernel convention and the compiler. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-25kernelci.configs: add defaults dictionary in YAML configurationGuillaume Tucker
Replace the 'build_configs_default_arch_list' with a more generic 'build_configs_defaults' dictionary to hold all the defaults for the build configs (still only the arch list for now). Update build-configs.yaml accordingly. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-13kernelci.configs: add Fragment class for config fragmentsGuillaume Tucker
Add Fragment class to hold a list of kernel configs options which can be associated with a build configuration. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-13kernelci.configs: add build config classesGuillaume Tucker
Add initial classes to describe basic build configurations, with a git tree, a branch and arch list. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
2019-02-13lib.test_configs: move to kernelci.configsGuillaume Tucker
Create a new "kernelci" Python package with kernelci.configs module. This is to start a series of modules that can be reused by command line applications, and to extend the YAML-based configuration. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>