Skip to content

Commit 2fbf391

Browse files
committed
[benchmark] Benchmark_Driver: Correctly set SWIFT_DETERMINISTIC_HASHING
1 parent 6cf798c commit 2fbf391

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

benchmark/scripts/Benchmark_Driver

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ class BenchmarkDriver(object):
5656
"""
5757
self.args = args
5858
self.run_env = os.environ.copy()
59+
60+
# Set a constant hash seed. Some tests are highly sensitive to
61+
# fluctuations in the number of hash collisions.
62+
self.run_env["SWIFT_DETERMINISTIC_HASHING"] = "1"
63+
5964
if hasattr(args, 'libdir') and args.libdir:
6065
# The benchmark binaries should pick up the built swift libraries
6166
# automatically, because their RPATH should point to ../lib/swift
@@ -65,15 +70,13 @@ class BenchmarkDriver(object):
6570
self.run_env["DYLD_LIBRARY_PATH"] = args.libdir
6671
elif platform.system() == "Linux":
6772
self.run_env["LD_LIBRARY_PATH"] = args.libdir
73+
6874
self._subprocess = _subprocess or subprocess
6975
self.all_tests = []
7076
self.test_number = {}
7177
self.tests = tests or self._get_tests()
7278
self.parser = parser or LogParser()
7379
self.results = {}
74-
# Set a constant hash seed. Some tests are currently sensitive to
75-
# fluctuations in the number of hash collisions.
76-
os.environ["SWIFT_DETERMINISTIC_HASHING"] = "1"
7780

7881
def _invoke(self, cmd):
7982
return self._subprocess.check_output(

0 commit comments

Comments
 (0)