Skip to content

Commit 1ddae77

Browse files
committed
be verbose in shared object test
1 parent 469cbb8 commit 1ddae77

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ def graalpython_gate_runner(args, tasks):
360360
if task:
361361
python_checkcopyrights([])
362362

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+
363367
with Task('GraalPython GraalVM build', tasks, tags=[GraalPythonTags.downstream, GraalPythonTags.graalvm]) as task:
364368
if task:
365369
mx.run_mx(
@@ -384,10 +388,6 @@ def graalpython_gate_runner(args, tasks):
384388
if success not in out.data:
385389
mx.abort('Output from generated SVM image "' + svm_image + '" did not match success pattern:\n' + success)
386390

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-
391391
for name, iterations in sorted(python_test_benchmarks.iteritems()):
392392
with Task('PythonBenchmarksTest:' + name, tasks, tags=[GraalPythonTags.benchmarks]) as task:
393393
if task:
@@ -449,6 +449,10 @@ def run_shared_lib_test(args=None):
449449
if (status != poly_ok) {
450450
return status;
451451
}
452+
status = poly_context_builder_option(isolate_thread, builder, "python.VerboseFlag", "true");
453+
if (status != poly_ok) {
454+
return status;
455+
}
452456
status = poly_context_builder_build(isolate_thread, builder, &context);
453457
if (status != poly_ok) {
454458
return status;
@@ -516,16 +520,16 @@ def run_shared_lib_test(args=None):
516520
if (poly_create_isolate(&isolate_params, &global_isolate)) {
517521
return 1;
518522
}
519-
if (test_basic_python_function()) {
520-
return 0;
521-
} else {
522-
return 1;
523-
}
523+
return test_basic_python_function();
524524
}
525525
""")
526526
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])
529533
mx.run([progname], env={"LD_LIBRARY_PATH": svm_lib_path})
530534
finally:
531535
try:

mx.graalpython/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
},
2626
{
2727
"name": "sulong",
28-
"version": "a73f459ddedc4229cdbbc7868171957f295b10b5",
28+
"version": "a8ec4a7e8cb4488c7f8b774bbc7b1342efd92c71",
2929
"urls": [
3030
{"url": "https://github.com/graalvm/sulong", "kind": "git"},
3131
]
3232
},
3333
{
3434
"name": "regex",
35-
"version": "3535ccebc4c19ebe9be7da93aaab1bca37afea5a",
35+
"version": "f83dbbac461c16f2a03d60ac945bee2d04d3686e",
3636
"subdir": True,
3737
"urls": [
3838
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)