How to rerun failed tests?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to rerun failed tests?

Reingruber, Richard
Hi,

I'd like to rerun failed tests from a previous test run like this:

make test TEST=jtreg:test/hotspot/jtreg:tier1 JTREG_STATUS=fail,error

This is not working because the workdir from the previous run is deleted.

Is there a way to rerun failed tests that I might have missed?

If there isn't, it could be achieved with the small change below. Not sure if
that's the desired way to do it though.

Thanks, Richard.

diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index 4eeef218b08..04aba33eca0 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -946,7 +946,9 @@ define SetupRunJtregTestBody
   endif
 
   clean-workdir-$1:
+  ifeq ($$(JTREG_STATUS),)
  $$(RM) -r $$($1_TEST_SUPPORT_DIR)
+  endif
 
   $1_COMMAND_LINE := \
       $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
Reply | Threaded
Open this post in threaded view
|

Re: How to rerun failed tests?

Erik Joelsson
Hello Richard,

No, there isn't a way to do that AFAIK, but it does seem like a good
idea. The JTREG_STATUS variable isn't currently meant to be a public API
from RunTests.gmk, but your patch does demonstrate how this could be
achieved. I've filed https://bugs.openjdk.java.net/browse/JDK-8262132

/Erik

On 2021-02-22 02:01, Reingruber, Richard wrote:

> Hi,
>
> I'd like to rerun failed tests from a previous test run like this:
>
> make test TEST=jtreg:test/hotspot/jtreg:tier1 JTREG_STATUS=fail,error
>
> This is not working because the workdir from the previous run is deleted.
>
> Is there a way to rerun failed tests that I might have missed?
>
> If there isn't, it could be achieved with the small change below. Not sure if
> that's the desired way to do it though.
>
> Thanks, Richard.
>
> diff --git a/make/RunTests.gmk b/make/RunTests.gmk
> index 4eeef218b08..04aba33eca0 100644
> --- a/make/RunTests.gmk
> +++ b/make/RunTests.gmk
> @@ -946,7 +946,9 @@ define SetupRunJtregTestBody
>     endif
>  
>     clean-workdir-$1:
> +  ifeq ($$(JTREG_STATUS),)
>   $$(RM) -r $$($1_TEST_SUPPORT_DIR)
> +  endif
>  
>     $1_COMMAND_LINE := \
>         $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
Reply | Threaded
Open this post in threaded view
|

RE: How to rerun failed tests?

Reingruber, Richard
Hi Erik,

> No, there isn't a way to do that AFAIK, but it does seem like a good
> idea. The JTREG_STATUS variable isn't currently meant to be a public API
> from RunTests.gmk, but your patch does demonstrate how this could be
> achieved. I've filed https://bugs.openjdk.java.net/browse/JDK-8262132

Thanks for your comments and for opening the item.

Richard.

-----Original Message-----
From: [hidden email] <[hidden email]>
Sent: Montag, 22. Februar 2021 15:12
To: Reingruber, Richard <[hidden email]>; '[hidden email]' <[hidden email]>
Subject: Re: How to rerun failed tests?

Hello Richard,

No, there isn't a way to do that AFAIK, but it does seem like a good
idea. The JTREG_STATUS variable isn't currently meant to be a public API
from RunTests.gmk, but your patch does demonstrate how this could be
achieved. I've filed https://bugs.openjdk.java.net/browse/JDK-8262132

/Erik

On 2021-02-22 02:01, Reingruber, Richard wrote:

> Hi,
>
> I'd like to rerun failed tests from a previous test run like this:
>
> make test TEST=jtreg:test/hotspot/jtreg:tier1 JTREG_STATUS=fail,error
>
> This is not working because the workdir from the previous run is deleted.
>
> Is there a way to rerun failed tests that I might have missed?
>
> If there isn't, it could be achieved with the small change below. Not sure if
> that's the desired way to do it though.
>
> Thanks, Richard.
>
> diff --git a/make/RunTests.gmk b/make/RunTests.gmk
> index 4eeef218b08..04aba33eca0 100644
> --- a/make/RunTests.gmk
> +++ b/make/RunTests.gmk
> @@ -946,7 +946,9 @@ define SetupRunJtregTestBody
>     endif
>  
>     clean-workdir-$1:
> +  ifeq ($$(JTREG_STATUS),)
>   $$(RM) -r $$($1_TEST_SUPPORT_DIR)
> +  endif
>  
>     $1_COMMAND_LINE := \
>         $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \