From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2 v4] utils/test-pkg: add gitlab-ci support
Date: Sun, 27 Jun 2021 18:09:21 +0200 [thread overview]
Message-ID: <20210627180921.0451f43b@windsurf> (raw)
In-Reply-To: <ee94227bb16df76d7b866f09d243339fd2a619b0.1624802988.git.yann.morin.1998@free.fr>
Hello,
On Sun, 27 Jun 2021 16:09:59 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> - the script that generates the pipline, uses that list to create one
> job for each test.
>
> This is triggered when the last commit log of the series (HEAD),
> contains the 'test-pkg config:' directive all alone on its own line,
> followed by a configuration fragment snippet to be used as input to
> test-pkg.
Hm, this is not really trivial to use. It definitely needs some
documentation somewhere.
> + # Retrieve defconfig for test-pkg from the git commit message (if any)
> + echo "$CI_COMMIT_DESCRIPTION" \
> + | sed -n '/^test-pkg config:$/,/^$/p' \
> + > defconfig.frag
So what happens with this defconfig.frag file? It is left there after
the script has executed?
> +
> + if [ -s defconfig.frag ]; then
> + sed -i 1d defconfig.frag
> + if [ ! -s defconfig.frag ]; then
> + printf "Empty configuration fragment.\n" >&2; exit 1
> + fi
> + # Use --all since we expect the user having already pre-tested the new package
> + # with the default subset of toolchains.
> + do_testpkg=( $( ./utils/test-pkg \
> + --all --list-only \
> + --config-snippet defconfig.frag \
> + --build-dir br-test-pkg \
Same question about the br-test-pkg directory, it stays there after the
script has executed?
Shouldn't both of these be using a temporary directory?
Note: I am not sure I have understood how the .config files generated
by test-pkg make their way to the Gitlab builds, so perhaps I'm missing
something.
> + (-l|--list-only)
> + list_only=1; shift 1
> + trace() { printf "${@}" >&2; }
I find "list-only" to be misleading, because it is not much more than
listing: it is generating the .config for each test configuration. So
what about --no-build, or --gen-config-only, or something like that?
To me --list-only, would really only list, i.e it wouldn't generate
anything.
> + if [ -n "${list_file}" ]; then
> + # Running in list-only implies keeping the build directories.
> + keep=1
> + fi
I'm not sure I like this semantic. Perhaps we should simply rely on the
user passing -k ? Especially since this feature is most likely only
going to be used by the generate-gitlab-ci-yml machinery ?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2021-06-27 16:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 14:09 [Buildroot] [PATCH 0/2 v4] gitlab-ci: allow running test-pkg (branch yem/test-pkg-in-gitlab-ci) Yann E. MORIN
2021-06-27 14:09 ` [Buildroot] [PATCH 1/2 v4] support/misc/gitlab-ci.yml.in Yann E. MORIN
2021-06-27 14:42 ` Romain Naour
2021-06-27 15:56 ` Thomas Petazzoni
2021-06-27 14:09 ` [Buildroot] [PATCH 2/2 v4] utils/test-pkg: add gitlab-ci support Yann E. MORIN
2021-06-27 14:47 ` Romain Naour
2021-06-27 16:09 ` Thomas Petazzoni [this message]
2021-06-27 17:34 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210627180921.0451f43b@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox