[RFC PATCH for 8.0] configure: repeat ourselves for the benefit of CI

Alex Bennée posted 1 patch 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221202174746.1218017-1-alex.bennee@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>
configure | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[RFC PATCH for 8.0] configure: repeat ourselves for the benefit of CI
Posted by Alex Bennée 1 year, 4 months ago
Our CI system echos the lines it executes but not the expansions. For
the sake of a line of extra verbosity during the configure phase lets
echo the invocation of script to stdout as well as the log.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 26c7bc5154..849ac7aed9 100755
--- a/configure
+++ b/configure
@@ -83,9 +83,10 @@ rm -f config.log
 # Print a helpful header at the top of config.log
 echo "# QEMU configure log $(date)" >> config.log
 printf "# Configured with:" >> config.log
-printf " '%s'" "$0" "$@" >> config.log
-echo >> config.log
-echo "#" >> config.log
+# repeat the invocation to log and stdout for CI
+invoke=$(printf " '%s'" "$0" "$@")
+echo "configuring with: $invoke"
+{ echo "$invoke"; echo; echo "#"; } >> config.log
 
 quote_sh() {
     printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&',"
-- 
2.34.1


Re: [RFC PATCH for 8.0] configure: repeat ourselves for the benefit of CI
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
On 2/12/22 18:47, Alex Bennée wrote:
> Our CI system echos the lines it executes but not the expansions. For
> the sake of a line of extra verbosity during the configure phase lets
> echo the invocation of script to stdout as well as the log.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   configure | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 26c7bc5154..849ac7aed9 100755
> --- a/configure
> +++ b/configure
> @@ -83,9 +83,10 @@ rm -f config.log
>   # Print a helpful header at the top of config.log
>   echo "# QEMU configure log $(date)" >> config.log
>   printf "# Configured with:" >> config.log
> -printf " '%s'" "$0" "$@" >> config.log
> -echo >> config.log
> -echo "#" >> config.log
> +# repeat the invocation to log and stdout for CI
> +invoke=$(printf " '%s'" "$0" "$@")
> +echo "configuring with: $invoke"

    test -n $GITLAB_CI && ... ?

> +{ echo "$invoke"; echo; echo "#"; } >> config.log
>   
>   quote_sh() {
>       printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&',"