@@ -563,6 +563,11 @@ def python_managed_gvm(_=None):
563
563
mx .log (launcher )
564
564
return launcher
565
565
566
+ def python_enterprise_gvm (_ = None ):
567
+ home = _graalvm_home (envfile = "graalpython-managed-bash-launcher" )
568
+ launcher = _join_bin (home , "graalpython" )
569
+ mx .log (launcher )
570
+ return launcher
566
571
567
572
def python_gvm_with_assertions ():
568
573
launcher = python_gvm ()
@@ -668,7 +673,7 @@ def is_included(path):
668
673
return testfiles
669
674
670
675
671
- def run_python_unittests (python_binary , args = None , paths = None , aot_compatible = False , exclude = None , env = None , use_pytest = False ):
676
+ def run_python_unittests (python_binary , args = None , paths = None , aot_compatible = False , exclude = None , env = None , use_pytest = False , cwd = None ):
672
677
# ensure that the test distribution is up-to-date
673
678
mx .command_function ("build" )(["--dep" , "com.oracle.graal.python.test" ])
674
679
@@ -714,7 +719,7 @@ def run_python_unittests(python_binary, args=None, paths=None, aot_compatible=Fa
714
719
# jacoco only dumps the data on exit, and when we run all our unittests
715
720
# at once it generates so much data we run out of heap space
716
721
for testfile in testfiles :
717
- mx .run ([launcher_path ] + args + [testfile ], nonZeroIsFatal = False , env = env )
722
+ mx .run ([launcher_path ] + args + [testfile ], nonZeroIsFatal = False , env = env , cwd = cwd )
718
723
finally :
719
724
shutil .move (launcher_path_bak , launcher_path )
720
725
else :
@@ -727,11 +732,11 @@ def graalvm_vm_arg(java_arg):
727
732
# jacoco only dumps the data on exit, and when we run all our unittests
728
733
# at once it generates so much data we run out of heap space
729
734
for testfile in testfiles :
730
- mx .run ([python_binary , "--jvm" , agent_args ] + args + [testfile ], nonZeroIsFatal = False , env = env )
735
+ mx .run ([python_binary , "--jvm" , agent_args ] + args + [testfile ], nonZeroIsFatal = False , env = env , cwd = cwd )
731
736
else :
732
737
args += testfiles
733
738
mx .logv (" " .join ([python_binary ] + args ))
734
- return mx .run ([python_binary ] + args , nonZeroIsFatal = True , env = env )
739
+ return mx .run ([python_binary ] + args , nonZeroIsFatal = True , env = env , cwd = cwd )
735
740
736
741
737
742
def is_bash_launcher (launcher_path ):
@@ -764,7 +769,7 @@ def run_hpy_unittests(python_binary, args=None):
764
769
return run_python_unittests (python_binary , args = args , paths = [_hpy_test_root ()], env = env , use_pytest = True )
765
770
766
771
767
- def run_tagged_unittests (python_binary , env = None ):
772
+ def run_tagged_unittests (python_binary , env = None , cwd = None ):
768
773
if env is None :
769
774
env = os .environ
770
775
sub_env = dict (
@@ -778,6 +783,7 @@ def run_tagged_unittests(python_binary, env=None):
778
783
args = ["-v" ],
779
784
paths = ["test_tagged_unittests.py" ],
780
785
env = sub_env ,
786
+ cwd = cwd
781
787
)
782
788
783
789
0 commit comments