@@ -645,7 +645,7 @@ def batched(iterable, n):
645
645
yield batch
646
646
647
647
648
- def _native_junit (native_image , unittest_args , build_args = None , run_args = None , blacklist = None , whitelist = None , preserve_image = False , force_builder_on_cp = False , test_classes_per_run = None ):
648
+ def _native_junit (native_image , unittest_args , build_args = None , run_args = None , blacklist = None , whitelist = None , preserve_image = False , test_classes_per_run = None ):
649
649
build_args = build_args or []
650
650
javaProperties = {}
651
651
for dist in suite .dists :
@@ -675,13 +675,7 @@ def dummy_harness(test_deps, vm_launcher, vm_args):
675
675
mx .log ('Building junit image for matching: ' + ' ' .join (test_classes ))
676
676
extra_image_args = mx .get_runtime_jvm_args (unittest_deps , jdk = mx_compiler .jdk , exclude_names = mx_sdk_vm_impl .NativePropertiesBuildTask .implicit_excludes )
677
677
macro_junit = '--macro:junit'
678
- if force_builder_on_cp :
679
- macro_junit += 'cp'
680
- custom_env = os .environ .copy ()
681
- custom_env ['USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM' ] = 'false'
682
- else :
683
- custom_env = None
684
- unittest_image = native_image (['-ea' , '-esa' ] + build_args + extra_image_args + [macro_junit + '=' + unittest_file ] + svm_experimental_options (['-H:Path=' + junit_test_dir ]), env = custom_env )
678
+ unittest_image = native_image (['-ea' , '-esa' ] + build_args + extra_image_args + [macro_junit + '=' + unittest_file ] + svm_experimental_options (['-H:Path=' + junit_test_dir ]))
685
679
image_pattern_replacement = unittest_image + ".exe" if mx .is_windows () else unittest_image
686
680
run_args = [arg .replace ('${unittest.image}' , image_pattern_replacement ) for arg in run_args ]
687
681
mx .log ('Running: ' + ' ' .join (map (shlex .quote , [unittest_image ] + run_args )))
@@ -719,15 +713,14 @@ def unmask(args):
719
713
720
714
def _native_unittest (native_image , cmdline_args ):
721
715
parser = ArgumentParser (prog = 'mx native-unittest' , description = 'Run unittests as native image.' )
722
- all_args = ['--build-args' , '--run-args' , '--blacklist' , '--whitelist' , '-p' , '--preserve-image' , '--force-builder-on-cp' , '-- test-classes-per-run' ]
716
+ all_args = ['--build-args' , '--run-args' , '--blacklist' , '--whitelist' , '-p' , '--preserve-image' , '--test-classes-per-run' ]
723
717
cmdline_args = [_mask (arg , all_args ) for arg in cmdline_args ]
724
718
parser .add_argument (all_args [0 ], metavar = 'ARG' , nargs = '*' , default = [])
725
719
parser .add_argument (all_args [1 ], metavar = 'ARG' , nargs = '*' , default = [])
726
720
parser .add_argument ('--blacklist' , help = 'run all testcases not specified in <file>' , metavar = '<file>' )
727
721
parser .add_argument ('--whitelist' , help = 'run testcases specified in <file> only' , metavar = '<file>' )
728
722
parser .add_argument ('-p' , '--preserve-image' , help = 'do not delete the generated native image' , action = 'store_true' )
729
723
parser .add_argument ('--test-classes-per-run' , help = 'run N test classes per image run, instead of all tests at once' , nargs = 1 , type = int )
730
- parser .add_argument ('--force-builder-on-cp' , help = 'force image builder to run on classpath' , action = 'store_true' )
731
724
parser .add_argument ('unittest_args' , metavar = 'TEST_ARG' , nargs = '*' )
732
725
pargs = parser .parse_args (cmdline_args )
733
726
@@ -749,7 +742,7 @@ def _native_unittest(native_image, cmdline_args):
749
742
mx .log ('warning: could not read blacklist: ' + blacklist )
750
743
751
744
unittest_args = unmask (pargs .unittest_args ) if unmask (pargs .unittest_args ) else ['com.oracle.svm.test' , 'com.oracle.svm.configure.test' ]
752
- _native_junit (native_image , unittest_args , unmask (pargs .build_args ), unmask (pargs .run_args ), blacklist , whitelist , pargs .preserve_image , pargs . force_builder_on_cp , test_classes_per_run )
745
+ _native_junit (native_image , unittest_args , unmask (pargs .build_args ), unmask (pargs .run_args ), blacklist , whitelist , pargs .preserve_image , test_classes_per_run )
753
746
754
747
755
748
def jvm_unittest (args ):
@@ -1467,19 +1460,6 @@ def _native_image_launcher_extra_jvm_args():
1467
1460
jlink = False ,
1468
1461
))
1469
1462
1470
- mx_sdk_vm .register_graalvm_component (mx_sdk_vm .GraalVMSvmMacro (
1471
- suite = suite ,
1472
- name = 'Native Image JUnit with image-builder on classpath' ,
1473
- short_name = 'njucp' ,
1474
- dir_name = 'junitcp' ,
1475
- license_files = [],
1476
- third_party_license_files = [],
1477
- dependencies = ['SubstrateVM' ],
1478
- jar_distributions = ['substratevm:JUNIT_SUPPORT' , 'mx:JUNIT_TOOL' , 'mx:JUNIT' , 'mx:HAMCREST' ],
1479
- support_distributions = ['substratevm:NATIVE_IMAGE_JUNITCP_SUPPORT' ],
1480
- jlink = False ,
1481
- ))
1482
-
1483
1463
libgraal_jar_distributions = [
1484
1464
'sdk:NATIVEBRIDGE' ,
1485
1465
'sdk:JNIUTILS' ,
0 commit comments