Issues (116)

1
#!/usr/bin/env ruby
2
# frozen_string_literal: true
3
4
# Optionally enable debug logging
5
ENV['NOSE_LOG'] = 'debug' if ARGV.include?('--debug') || ARGV.include?('-d')
6
7
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
0 ignored issues
show
Prefer string interpolation to string concatenation.
Loading history...
8
9
require 'nose'
10
require 'nose_cli'
11
12
# Start profiling if asked
13
unless ENV['NOSE_PROFILE'].nil?
14
  require 'ruby-prof'
15
  Parallel.instance_variable_set(:@processor_count, 0)
16
  RubyProf.start
17
end
18
19
NoSE::CLI::NoSECLI.start ARGV
20
21
# Stop profiling and output results
22
unless ENV['NOSE_PROFILE'].to_i == 0
0 ignored issues
show
Use ENV['NOSE_PROFILE'].to_i.zero? instead of ENV['NOSE_PROFILE'].to_i == 0.
Loading history...
23
  result = RubyProf.stop
24
  printer = RubyProf::CallTreePrinter.new(result)
25
  printer.print
26
end
27