How to rerun failed tests?

erik.joelsson at oracle.com erik.joelsson at oracle.com
Mon Feb 22 14:12:21 UTC 2021


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) \



More information about the build-dev mailing list