qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] scripts: display how long each test takes to execute


From: Paolo Bonzini
Subject: Re: [PATCH] scripts: display how long each test takes to execute
Date: Mon, 14 Sep 2020 13:19:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 14/09/20 13:09, Daniel P. Berrangé wrote:
> I'm unclear if meson's native test runner can print timings. If not,
> we might want to submit an RFE there too.

I agree that any holes should be filled in there.  In this case it does,
so I think we should start using it in CI so that RFEs can be sent there.

mtest2make-style output has been in use (and good enough) for years so
I'd rather avoid piling up more hacks on top.  "meson test" is not
perfect but I'd rather improve it instead.

Paolo

>  scripts/mtest2make.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
> index 9cbb2e374d..9103ae65b9 100644
> --- a/scripts/mtest2make.py
> +++ b/scripts/mtest2make.py
> @@ -20,7 +20,7 @@ print('''
>  SPEED = quick
>  
>  # $1 = environment, $2 = test command, $3 = test name, $4 = dir
> -.test-human-tap = $1 $(if $4,(cd $4 && $2),$2) < /dev/null | 
> ./scripts/tap-driver.pl --test-name="$3" $(if $(V),,--show-failures-only)
> +.test-human-tap = export then=`date +%s` ; $1 $(if $4,(cd $4 && $2),$2) < 
> /dev/null | ./scripts/tap-driver.pl --test-name="$3" $(if 
> $(V),,--show-failures-only) ; export now=`date +%s` ; delta=`expr $$now - 
> $$then` ; $(if $(V),echo "TIME $$delta seconds",true)
>  .test-human-exitcode = $1 $(PYTHON) scripts/test-driver.py $(if $4,-C$4) 
> $(if $(V),--verbose) -- $2 < /dev/null
>  .test-tap-tap = $1 $(if $4,(cd $4 && $2),$2) < /dev/null | sed 
> "s/^[a-z][a-z]* [0-9]*/& $3/" || true
>  .test-tap-exitcode = printf "%s\\n" 1..1 "`$1 $(if $4,(cd $4 && $2),$2) < 
> /dev/null > /dev/null || echo "not "`ok 1 $3"
> -- 2.26.2


Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]