@@ -982,9 +982,9 @@ def _collector(x):
982
982
raise Exception ('Unexpected output: ' + str (actual_output ) + " != " + str (expected_output ))
983
983
984
984
def _debuginfotest (native_image , path , build_only , with_isolates_only , args ):
985
- sourcepath = mx .project ('com.oracle.svm.test' ).source_dirs ()[0 ]
985
+ sourcepath = mx .project ('com.oracle.svm.test.debug ' ).source_dirs ()[0 ]
986
986
# the header file for foreign types resides at the root of the
987
- # com.oracle.svm.test source tree
987
+ # com.oracle.svm.test.debug source tree
988
988
cincludepath = sourcepath
989
989
for key , value in get_java_properties ().items ():
990
990
args .append ("-D" + key + "=" + value )
@@ -1012,7 +1012,7 @@ def build_debug_test(variant_name, image_name, extra_args):
1012
1012
# this is a non-layered build
1013
1013
env ['debuginfotest_layered' ] = 'no'
1014
1014
1015
- testhello_py = join (suite . dir , 'mx.substratevm ' , 'testhello.py' )
1015
+ testhello_py = join (sourcepath , 'gdb-tests ' , 'testhello.py' )
1016
1016
testhello_args = [
1017
1017
# We do not want to step into class initializer, so initialize everything at build time.
1018
1018
'--initialize-at-build-time=hello' ,
@@ -1034,7 +1034,7 @@ def build_debug_test(variant_name, image_name, extra_args):
1034
1034
1035
1035
1036
1036
def _layereddebuginfotest (native_image , output_path , skip_base_layer , with_isolates_only , args ):
1037
- sourcepath = mx .project ('com.oracle.svm.test' ).source_dirs ()[0 ]
1037
+ sourcepath = mx .project ('com.oracle.svm.test.debug ' ).source_dirs ()[0 ]
1038
1038
cincludepath = sourcepath
1039
1039
1040
1040
for key , value in get_java_properties ().items ():
@@ -1058,7 +1058,7 @@ def build_layer(layer_path, layer_args):
1058
1058
build_layer (base_layer_path , [
1059
1059
'-o' , join (base_layer_path , base_layer_name ),
1060
1060
] + svm_experimental_options ([
1061
- f'-H:LayerCreate={ base_layer_name } .nil,module=java.base,package=com.oracle.svm.test '
1061
+ f'-H:LayerCreate={ base_layer_name } .nil,module=java.base'
1062
1062
]))
1063
1063
1064
1064
app_layer_path = join (output_path , 'app-layer' )
@@ -1080,7 +1080,7 @@ def build_layer(layer_path, layer_args):
1080
1080
env ['LD_LIBRARY_PATH' ] = base_layer_path
1081
1081
1082
1082
# fetch python test file
1083
- testhello_py = join (suite . dir , 'mx.substratevm ' , 'testhello.py' )
1083
+ testhello_py = join (sourcepath , 'gdb-tests ' , 'testhello.py' )
1084
1084
1085
1085
# run gdb
1086
1086
mx .run (gdb_base_command () + ['-x' , testhello_py , app_layer ], cwd = app_layer_path , env = env )
@@ -1110,13 +1110,13 @@ def testhello_ni_args(cincludepath, sourcepath):
1110
1110
'--native-compiler-options=-I' + cincludepath ,
1111
1111
'-H:CLibraryPath=' + sourcepath ,
1112
1112
'--native-image-info' ,
1113
- '-cp' , classpath ('com.oracle.svm.test' ),
1113
+ '-cp' , classpath ('com.oracle.svm.test.debug ' ),
1114
1114
'-Djdk.graal.LogFile=graal.log' ,
1115
- '-DbuildDebugInfoTestExample=true' , # set property controlling inclusion of foreign struct header
1116
- ] + svm_experimental_options ([
1117
- '-H:+SourceLevelDebug' ,
1118
- '-H:DebugInfoSourceSearchPath=' + sourcepath ,
1119
- ])
1115
+ '-DbuildDebugInfoTestExample=true' , # set property controlling inclusion of foreign struct header
1116
+ ] + svm_experimental_options ([
1117
+ '-H:+SourceLevelDebug' ,
1118
+ '-H:DebugInfoSourceSearchPath=' + sourcepath ,
1119
+ ])
1120
1120
1121
1121
def _gdbdebughelperstest (native_image , path , with_isolates_only , args ):
1122
1122
@@ -1134,21 +1134,21 @@ def _gdbdebughelperstest(native_image, path, with_isolates_only, args):
1134
1134
('GDB Python API is not available.' if gdb_version == 0 else f'found GDB version { gdb_version } .' ))
1135
1135
# ===============================
1136
1136
1137
- test_proj = mx .dependency ('com.oracle.svm.test' )
1137
+ test_proj = mx .dependency ('com.oracle.svm.test.debug ' )
1138
1138
test_source_path = test_proj .source_dirs ()[0 ]
1139
1139
tutorial_proj = mx .dependency ('com.oracle.svm.tutorial' )
1140
1140
tutorial_c_source_dir = join (tutorial_proj .dir , 'native' )
1141
1141
tutorial_source_path = tutorial_proj .source_dirs ()[0 ]
1142
1142
1143
- test_python_source_dir = join (test_source_path , 'com' , 'oracle' , 'svm' , 'test' , 'debug' , 'helper ' )
1143
+ test_python_source_dir = join (test_source_path , 'gdb-tests ' )
1144
1144
test_pretty_printer_py = join (test_python_source_dir , 'test_pretty_printer.py' )
1145
1145
test_cinterface_py = join (test_python_source_dir , 'test_cinterface.py' )
1146
1146
test_class_loader_py = join (test_python_source_dir , 'test_class_loader.py' )
1147
1147
test_settings_py = join (test_python_source_dir , 'test_settings.py' )
1148
1148
test_svm_util_py = join (test_python_source_dir , 'test_svm_util.py' )
1149
1149
1150
1150
test_pretty_printer_args = [
1151
- '-cp' , classpath ('com.oracle.svm.test' ),
1151
+ '-cp' , classpath ('com.oracle.svm.test.debug ' ),
1152
1152
# We do not want to step into class initializer, so initialize everything at build time.
1153
1153
'--initialize-at-build-time=com.oracle.svm.test.debug.helper' ,
1154
1154
'com.oracle.svm.test.debug.helper.PrettyPrinterTest'
@@ -1159,11 +1159,11 @@ def _gdbdebughelperstest(native_image, path, with_isolates_only, args):
1159
1159
'-cp' , tutorial_proj .output_dir ()
1160
1160
]
1161
1161
test_class_loader_args = [
1162
- '-cp' , classpath ('com.oracle.svm.test' ),
1163
- '-Dsvm. test.missing.classes=' + classpath ('com.oracle.svm.test.missing.classes' ),
1162
+ '-cp' , classpath ('com.oracle.svm.test.debug ' ),
1163
+ '-Dcom.oracle.svm. test.debug. missing.classes=' + classpath ('com.oracle.svm.test.debug .missing.classes' ),
1164
1164
'--initialize-at-build-time=com.oracle.svm.test.debug.helper' ,
1165
1165
# We need the static initializer of the ClassLoaderTest to run at image build time
1166
- '--initialize-at-build-time=com.oracle.svm.test.missing.classes' ,
1166
+ '--initialize-at-build-time=com.oracle.svm.test.debug. missing.classes' ,
1167
1167
'com.oracle.svm.test.debug.helper.ClassLoaderTest'
1168
1168
]
1169
1169
@@ -1253,13 +1253,13 @@ def _runtimedebuginfotest(native_image, output_path, with_isolates_only, args=No
1253
1253
1254
1254
args = [] if args is None else args
1255
1255
1256
- test_proj = mx .dependency ('com.oracle.svm.test' )
1256
+ test_proj = mx .dependency ('com.oracle.svm.test.debug ' )
1257
1257
test_source_path = test_proj .source_dirs ()[0 ]
1258
1258
1259
- test_python_source_dir = join (test_source_path , 'com' , 'oracle' , 'svm' , 'test' , 'debug' , 'helper ' )
1259
+ test_python_source_dir = join (test_source_path , 'gdb-tests ' )
1260
1260
test_runtime_compilation_py = join (test_python_source_dir , 'test_runtime_compilation.py' )
1261
1261
test_runtime_deopt_py = join (test_python_source_dir , 'test_runtime_deopt.py' )
1262
- testdeopt_js = join (suite . dir , 'mx.substratevm' , 'testdeopt.js' )
1262
+ testdeopt_js = join (test_python_source_dir , 'testdeopt.js' )
1263
1263
1264
1264
# clean / create output directory
1265
1265
if exists (output_path ):
@@ -1273,9 +1273,11 @@ def _runtimedebuginfotest(native_image, output_path, with_isolates_only, args=No
1273
1273
'-DbuildDebugInfoTestExample=true' ,
1274
1274
'--native-compiler-options=-I' + test_source_path ,
1275
1275
'-o' , join (output_path , 'runtimedebuginfotest' ),
1276
- '-cp' , classpath ('com.oracle.svm.test' ),
1276
+ '-cp' , classpath ('com.oracle.svm.test.debug ' ),
1277
1277
# We do not want to step into class initializer, so initialize everything at build time.
1278
1278
'--initialize-at-build-time=com.oracle.svm.test.debug.helper' ,
1279
+ # We need access to ModuleSupport
1280
+ '--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED' ,
1279
1281
'--features=com.oracle.svm.test.debug.helper.RuntimeCompileDebugInfoTest$RegisterMethodsFeature' ,
1280
1282
'com.oracle.svm.test.debug.helper.RuntimeCompileDebugInfoTest' ,
1281
1283
] + svm_experimental_options ([
@@ -1876,7 +1878,7 @@ def debuginfotest(args, config=None):
1876
1878
def layereddebuginfotest (args , config = None ):
1877
1879
"""
1878
1880
Builds a layered native image and tests it with gdb.
1879
- Base layer: java.base, com.oracle.svm.test
1881
+ Base layer: java.base
1880
1882
App Layer: hello.Hello
1881
1883
"""
1882
1884
parser = ArgumentParser (prog = 'mx layereddebuginfotest' )
0 commit comments