-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganize benchmark validators again
- Loading branch information
Showing
6 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe 'Tracing benchmarks' do | ||
before { skip('Spec requires Ruby VM supporting fork') unless PlatformHelpers.supports_fork? } | ||
|
||
around do |example| | ||
ClimateControl.modify('VALIDATE_BENCHMARK' => 'true') do | ||
example.run | ||
end | ||
end | ||
|
||
benchmarks_to_validate = %w( | ||
tracing_trace | ||
) | ||
|
||
benchmarks_to_validate.each do |benchmark| | ||
describe benchmark do | ||
it 'runs without raising errors' do | ||
expect_in_fork do | ||
load "./benchmarks/#{benchmark}.rb" | ||
end | ||
end | ||
end | ||
end | ||
|
||
# This test validates that we don't forget to add new benchmarks to benchmarks_to_validate | ||
it 'tests all expected benchmarks in the benchmarks folder' do | ||
all_benchmarks = Dir['./benchmarks/tracing_*'].map { |it| it.gsub('./benchmarks/', '').gsub('.rb', '') } | ||
|
||
expect(benchmarks_to_validate).to contain_exactly(*all_benchmarks) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters