Skip to content

Commit

Permalink
Only require simplecov if RUBY_ENGINE=="ruby" (#1423)
Browse files Browse the repository at this point in the history
* Only require simplecov if RUBY_ENGINE=="ruby"

* Should have let chatgpt do this

* OK

* simplecov and mazel tov
  • Loading branch information
plantfansam authored Jan 12, 2023
1 parent 6623a3e commit 2bcb464
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 23 deletions.
8 changes: 5 additions & 3 deletions api/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
end

require 'opentelemetry-test-helpers'
require 'opentelemetry'
Expand Down
6 changes: 4 additions & 2 deletions common/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry-test-helpers'
require 'opentelemetry/common'
Expand Down
6 changes: 4 additions & 2 deletions exporter/jaeger/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry-test-helpers'
require 'opentelemetry/exporter/jaeger'
Expand Down
6 changes: 4 additions & 2 deletions exporter/otlp-common/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry/sdk'
require 'opentelemetry-test-helpers'
Expand Down
6 changes: 4 additions & 2 deletions exporter/otlp-grpc/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'pry'

Expand Down
6 changes: 4 additions & 2 deletions exporter/otlp-http/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry-test-helpers'
require 'opentelemetry-exporter-otlp-http'
Expand Down
6 changes: 4 additions & 2 deletions exporter/otlp/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry-test-helpers'
require 'opentelemetry/exporter/otlp'
Expand Down
6 changes: 4 additions & 2 deletions exporter/zipkin/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
end

require 'opentelemetry-test-helpers'
require 'opentelemetry/exporter/zipkin'
Expand Down
8 changes: 5 additions & 3 deletions sdk/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
end

require 'opentelemetry-test-helpers'
require 'opentelemetry-sdk'
Expand Down
8 changes: 5 additions & 3 deletions test_helpers/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
require 'minitest/autorun'
require 'pry'

require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
if RUBY_ENGINE == 'ruby'
require 'simplecov'
SimpleCov.start
SimpleCov.minimum_coverage 85
end

0 comments on commit 2bcb464

Please sign in to comment.