Skip to content

Commit d5ad99f

Browse files
committed
Debug
1 parent ab4cf40 commit d5ad99f

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040
continue-on-error: true
4141

4242
- name: Run CLI integration tests in isolation
43-
run: bundle exec ruby -Ilib:test test/benchmark_runner_cli_test.rb --verbose --name "/integration test/"
43+
run: bundle exec ruby -Ilib:test test/benchmark_runner_cli_test.rb --verbose --name "/parses ARGV/"
44+
continue-on-error: true
4445

4546
- name: Run tests
4647
run: bundle exec rake test --trace

test/benchmark_runner_cli_test.rb

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,22 @@ def create_args(overrides = {})
5959

6060
describe '.run class method' do
6161
it 'parses ARGV and runs the CLI end-to-end' do
62-
Dir.mktmpdir do |tmpdir|
63-
BenchmarkRunner::CLI.run([
64-
'--name_filters=fib',
65-
'--out_path=' + tmpdir,
66-
'--once',
67-
'--no-pinning',
68-
'--turbo'
69-
])
62+
tmpdir = "/tmp/ruby-bench-test-#{Process.pid}"
63+
FileUtils.mkdir_p(tmpdir)
64+
BenchmarkRunner::CLI.run([
65+
'--name_filters=fib',
66+
'--out_path=' + tmpdir,
67+
'--once',
68+
'--no-pinning',
69+
'--turbo'
70+
])
71+
ensure
72+
# Print output files for debugging before cleanup
73+
Dir.glob(File.join(tmpdir, "*")).each do |f|
74+
puts "=== #{f} ==="
75+
puts File.read(f) rescue nil
7076
end
77+
FileUtils.rm_rf(tmpdir)
7178
end
7279
end
7380

0 commit comments

Comments
 (0)