@@ -521,10 +521,12 @@ def graalpytest(args):
521
521
cmd_args += testfiles
522
522
if args .filter :
523
523
cmd_args += ["-k" , args .filter ]
524
+ env = os .environ .copy ()
525
+ env ['PYTHONHASHSEED' ] = '0'
524
526
if args .python :
525
- return mx .run ([args .python ] + cmd_args , nonZeroIsFatal = True )
527
+ return mx .run ([args .python ] + cmd_args , nonZeroIsFatal = True , env = env )
526
528
else :
527
- return do_run_python (cmd_args )
529
+ return do_run_python (cmd_args , env = env )
528
530
529
531
530
532
def _list_graalpython_unittests (paths = None , exclude = None ):
@@ -563,6 +565,7 @@ def run_python_unittests(python_binary, args=None, paths=None, aot_compatible=Tr
563
565
exclude = exclude or []
564
566
if env is None :
565
567
env = os .environ .copy ()
568
+ env ['PYTHONHASHSEED' ] = '0'
566
569
567
570
# list of excluded tests
568
571
if aot_compatible :
@@ -644,8 +647,10 @@ def graalpython_gate_runner(args, tasks):
644
647
exe = os .path .join (exe , "python" )
645
648
else :
646
649
exe = "python3"
650
+ env = os .environ .copy ()
651
+ env ['PYTHONHASHSEED' ] = '0'
647
652
test_args = [exe , _graalpytest_driver (), "-v" , _graalpytest_root ()]
648
- mx .run (test_args , nonZeroIsFatal = True )
653
+ mx .run (test_args , nonZeroIsFatal = True , env = env )
649
654
mx .run (["env" ])
650
655
run_python_unittests (python_gvm ())
651
656
0 commit comments