Skip to content

Commit af71924

Browse files
committed
[benchmark] run_smoke_bench deterministic hashing
Tests that used hashing were being unnecessarily tested multiple times, because this environment variable was missing.
1 parent f2c4250 commit af71924

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

benchmark/scripts/run_smoke_bench

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ def get_results(bench_dir, opt_level, num_samples, to_test):
221221
if to_test:
222222
args += to_test
223223
env = {'DYLD_LIBRARY_PATH': os.path.join(bench_dir, 'lib', 'swift',
224-
'macos')}
224+
'macos'),
225+
'SWIFT_DETERMINISTIC_HASHING': '1'}
225226
output = subprocess.check_output(args, env=env)
226227
except subprocess.CalledProcessError as e:
227228
sys.stderr.write(e.output)

benchmark/scripts/run_smoke_bench.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def get_results(bench_dir, opt_level, num_samples, to_test):
180180
if to_test:
181181
args += to_test
182182
env = {'DYLD_LIBRARY_PATH': os.path.join(bench_dir, 'lib', 'swift',
183-
'macos')}
183+
'macos'),
184+
'SWIFT_DETERMINISTIC_HASHING': '1'}
184185
output = subprocess.check_output(args, env=env)
185186
except subprocess.CalledProcessError as e:
186187
sys.stderr.write(e.output)

0 commit comments

Comments
 (0)