[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 9/9] CI: Add timing to junit



On Tue, 3 Jun 2025, Anthony PERARD wrote:
> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  automation/scripts/run-tools-tests | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/automation/scripts/run-tools-tests 
> b/automation/scripts/run-tools-tests
> index 852c1cfbcf..e38cc4068c 100755
> --- a/automation/scripts/run-tools-tests
> +++ b/automation/scripts/run-tools-tests
> @@ -18,9 +18,12 @@ for f in "$1"/*; do
>          continue
>      fi
>      echo "Running $f"
> -    printf '  <testcase name="%s">\n' "$f" >> "$xml_out"
> +    time_start=$EPOCHREALTIME
>      "$f" 2>&1 | tee /tmp/out
>      ret=${PIPESTATUS[0]}
> +    time_end=$EPOCHREALTIME
> +    time_test="$(bc <<<"$time_end - $time_start")"

As it looks like no other scripts need bc at the moment but we already
rely on awk (automation/scripts/xilinx-smoke-dom0less-arm64.sh) I'd
prefer this version:

time_test="$(awk "BEGIN {print $time_end - $time_start}")"


> +    printf '  <testcase name="%s" time="%f">\n' "$f" "$time_test" >> 
> "$xml_out"
>      if [ "$ret" -ne 0 ]; then
>          echo "FAILED: $f"
>          failed+=" $f"
> -- 
> Anthony PERARD
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.