Sha256: d6f915891f4e9431135f1b3544f9938020423ced8d00e87a7e63ea22720785e8

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require_relative 'helpers/matches'
include Matches

begin
  require 'rake/testtask'
rescue LoadError
end

if defined? Rake::TestTask
  namespace :test do
    tasks = Rake.application.top_level_tasks
    ENV['TESTOPTS'] ||= ''
    if tasks.any? { |t| t.include?('verbose') }
      ENV['TESTOPTS'] += ' -v'
    end
    if seed = look_for_seed(tasks)
      ENV['TESTOPTS'] += ' --' + seed
    end

    agent_home = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))

    Rake::TestTask.new(:newrelic) do |t|
      file_pattern = ENV['file']
      file_pattern = file_pattern.split(',').map { |f| "#{agent_home}/#{f}".gsub('//', '/') } if file_pattern
      file_pattern ||= "#{agent_home}/test/new_relic/**/*_test.rb"

      t.libs << "#{agent_home}/test"
      t.libs << "#{agent_home}/lib"
      t.pattern = Array(file_pattern)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
newrelic_rpm-9.5.0 lib/tasks/tests.rake
newrelic_rpm-9.4.2 lib/tasks/tests.rake
newrelic_rpm-9.4.1 lib/tasks/tests.rake
newrelic_rpm-9.4.0 lib/tasks/tests.rake
newrelic_rpm-9.3.1 lib/tasks/tests.rake
newrelic_rpm-9.3.0 lib/tasks/tests.rake
newrelic_rpm-9.2.2 lib/tasks/tests.rake
newrelic_rpm-9.2.1 lib/tasks/tests.rake
newrelic_rpm-9.2.0 lib/tasks/tests.rake
newrelic_rpm-9.1.0 lib/tasks/tests.rake