[Buildroot] [PATCH] support/scripts/generate-gitlab-ci-yml: make it possible to test multiple defconfigs
Romain Naour
romain.naour at gmail.com
Thu Dec 30 16:44:32 UTC 2021
Hello Thomas,
Le 29/12/2021 à 15:38, Thomas Petazzoni a écrit :
> Already supported:
>
> - Pushing a branch called "<foo>-defconfigs" tests all defconfigs.
>
> - Pushing a branch called "<foo>-defconfig-<defconfig-name>" will
> test one particular defconfig
>
> This commit adds support for:
>
> - Pushing a branch called "<foo>-defconfigs-<pattern>" which will
> test all defconfigs whose name start with the pattern. For example
> "<foo>-defconfigs-qemu_" will test all Qemu defconfigs
I'm doing a shameless local hack in generate-gitlab-ci-yml to keep only qemu*
defconfig for testing in gitlab:
defconfigs=( $(cd configs; LC_ALL=C ls -1 qemu*_defconfig) )
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> ---
> Ideally, this should be documented in the Buildroot manual, but I'm
> not sure where it should be documented.
Probably a new chapter after "22.7. Using the run-tests framework".
"22.8. Testing using Buildroot's gitlab-ci"
> ---
> support/scripts/generate-gitlab-ci-yml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
> index 8aaa456b03..3e0c68091b 100755
> --- a/support/scripts/generate-gitlab-ci-yml
> +++ b/support/scripts/generate-gitlab-ci-yml
> @@ -66,6 +66,11 @@ gen_tests() {
> (*-defconfigs)
> do_defconfigs=base
> ;;
> + (*-defconfigs-*)
> + pattern=$(echo ${CI_COMMIT_REF_NAME} | sed 's%[^\-]*-defconfigs-\(.*\)%\1%')
> + defconfigs=( $(cd configs; LC_ALL=C ls -1 | grep ^${pattern}) )
> + do_defconfigs=base
> + ;;
I'll use this patch next time I'll test qemu defconfig.
Best regards,
Romain
> (*-*_defconfig)
> defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
> do_defconfigs=base
>
More information about the buildroot
mailing list