@@ -651,7 +651,6 @@ public void registerTestBinary(Project project,
651
651
652
652
// Following ensures that required feature jar is on classpath for every project
653
653
injectTestPluginDependencies (project , graalExtension .getTestSupport ());
654
-
655
654
TaskProvider <BuildNativeImageTask > testImageBuilder = tasks .named (deriveTaskName (name , "native" , "Compile" ), BuildNativeImageTask .class , task -> {
656
655
task .setOnlyIf (t -> graalExtension .getTestSupport ().get () && testListDirectory .getAsFile ().get ().exists ());
657
656
task .getTestListDirectory ().set (testListDirectory );
@@ -663,6 +662,7 @@ public void registerTestBinary(Project project,
663
662
// Later this will be replaced by a dedicated task not requiring execution of tests
664
663
testList .from (testListDirectory ).builtBy (testTask );
665
664
testOptions .getClasspath ().from (testList );
665
+ testOptions .getRuntimeArgs ().add ("-D" + JUNIT_PLATFORM_LISTENERS_UID_TRACKING_OUTPUT_DIR + "=" + testResultsDir .dir (testTask .getName () + "/testlist" ).get ().getAsFile ().getAbsolutePath ());
666
666
});
667
667
if (isPrimaryTest ) {
668
668
tasks .register (DEPRECATED_NATIVE_TEST_BUILD_TASK , t -> {
@@ -770,16 +770,6 @@ private static NativeImageOptions createTestOptions(GraalVMExtension graalExtens
770
770
runtimeArgs .add ("--xml-output-dir" );
771
771
runtimeArgs .add (project .getLayout ().getBuildDirectory ().dir ("test-results/" + binaryName + "-native" ).map (d -> d .getAsFile ().getAbsolutePath ()));
772
772
773
- String testIds ;
774
- String propertyBasedLocation = System .getProperty (UniqueIdTrackingListener .OUTPUT_DIR_PROPERTY_NAME );
775
- if (propertyBasedLocation != null ) {
776
- testIds = Path .of (propertyBasedLocation ).toAbsolutePath ().toString ();
777
- } else {
778
- testIds = project .getLayout ().getBuildDirectory ().dir ("test-results/" + binaryName + "/testlist" ).map (d -> d .getAsFile ().getAbsolutePath ()).get ();
779
- }
780
-
781
- runtimeArgs .add ("-Djunit.platform.listeners.uid.tracking.output.dir=" + testIds );
782
-
783
773
testExtension .buildArgs ("--features=org.graalvm.junit.platform.JUnitPlatformFeature" );
784
774
ConfigurableFileCollection classpath = testExtension .getClasspath ();
785
775
classpath .from (configs .getImageClasspathConfiguration ());
0 commit comments