Skip to content

Commit e420a71

Browse files
authored
Fix more default paths writing to data/ (#490)
1 parent bdd28b8 commit e420a71

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

harness/harness-common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def get_maxrss
136136
end
137137

138138
# Do expand_path at require-time, not when returning results, before the benchmark is likely to chdir
139-
default_path = "data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.json"
139+
default_path = File.expand_path("../data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.json", __dir__)
140140
yb_env_var = ENV.fetch("RESULT_JSON_PATH", default_path)
141141
YB_OUTPUT_FILE = File.expand_path yb_env_var
142142

harness/harness.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Minimum benchmarking time in seconds
1010
MIN_BENCH_TIME = Integer(ENV.fetch('MIN_BENCH_TIME', 10))
1111

12-
default_path = "data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.csv"
12+
default_path = File.expand_path("../data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.csv", __dir__)
1313
OUT_CSV_PATH = File.expand_path(ENV.fetch('OUT_CSV_PATH', default_path))
1414

1515
RSS_CSV_PATH = ENV['RSS_CSV_PATH'] ? File.expand_path(ENV['RSS_CSV_PATH']) : nil

0 commit comments

Comments
 (0)