@@ -360,6 +360,10 @@ def graalpython_gate_runner(args, tasks):
360
360
if task :
361
361
python_checkcopyrights ([])
362
362
363
+ with Task ('GraalPython GraalVM shared-library build' , tasks , tags = [GraalPythonTags .downstream , GraalPythonTags .graalvm ]) as task :
364
+ if task :
365
+ run_shared_lib_test ()
366
+
363
367
with Task ('GraalPython GraalVM build' , tasks , tags = [GraalPythonTags .downstream , GraalPythonTags .graalvm ]) as task :
364
368
if task :
365
369
mx .run_mx (
@@ -384,10 +388,6 @@ def graalpython_gate_runner(args, tasks):
384
388
if success not in out .data :
385
389
mx .abort ('Output from generated SVM image "' + svm_image + '" did not match success pattern:\n ' + success )
386
390
387
- with Task ('GraalPython GraalVM shared-library build' , tasks , tags = [GraalPythonTags .downstream , GraalPythonTags .graalvm ]) as task :
388
- if task :
389
- run_shared_lib_test ()
390
-
391
391
for name , iterations in sorted (python_test_benchmarks .iteritems ()):
392
392
with Task ('PythonBenchmarksTest:' + name , tasks , tags = [GraalPythonTags .benchmarks ]) as task :
393
393
if task :
@@ -449,6 +449,10 @@ def run_shared_lib_test(args=None):
449
449
if (status != poly_ok) {
450
450
return status;
451
451
}
452
+ status = poly_context_builder_option(isolate_thread, builder, "python.VerboseFlag", "true");
453
+ if (status != poly_ok) {
454
+ return status;
455
+ }
452
456
status = poly_context_builder_build(isolate_thread, builder, &context);
453
457
if (status != poly_ok) {
454
458
return status;
@@ -516,16 +520,16 @@ def run_shared_lib_test(args=None):
516
520
if (poly_create_isolate(&isolate_params, &global_isolate)) {
517
521
return 1;
518
522
}
519
- if (test_basic_python_function()) {
520
- return 0;
521
- } else {
522
- return 1;
523
- }
523
+ return test_basic_python_function();
524
524
}
525
525
""" )
526
526
os .close (fd )
527
- progname = tempfile .mktemp ()
528
- mx .run (["cc" , "-I%s" % svm_lib_path , "-L%s" % svm_lib_path , name , "-o%s" % progname , "-lpolyglot" ], nonZeroIsFatal = True )
527
+ progname = os .path .join (_suite .dir , "graalpython-embedded-tool" )
528
+ mx .log ("" .join (["Running " , "'clang" , "-I%s" % svm_lib_path , "-L%s" % svm_lib_path , name , "-o" , progname , "-lpolyglot" ]))
529
+ mx .run (["clang" , "-I%s" % svm_lib_path , "-L%s" % svm_lib_path , name , "-o%s" % progname , "-lpolyglot" ], nonZeroIsFatal = True )
530
+ mx .log ("Running " + progname + " with LD_LIBRARY_PATH " + svm_lib_path )
531
+ mx .run (["ls" , "-l" , progname ])
532
+ mx .run (["ls" , "-l" , svm_lib_path ])
529
533
mx .run ([progname ], env = {"LD_LIBRARY_PATH" : svm_lib_path })
530
534
finally :
531
535
try :
0 commit comments