File: test_all.rb

package info (click to toggle)
ruby-net-ssh 1%3A6.1.0-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,884 kB
  • sloc: ruby: 15,997; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
$: << '.'

Dir.chdir(File.dirname(__FILE__)) do
  test_files = Dir['**/test_*.rb'] - ['test_all.rb'] # prevent circular require
  test_files -= Dir['integration/test_*.rb'] unless ENV['NET_SSH_RUN_INTEGRATION_TESTS']
  test_files -= Dir['win_integration/test_*.rb'] unless ENV['NET_SSH_RUN_WIN_INTEGRATION_TESTS']
  test_files -= Dir['test/test_*.rb']
  test_files = test_files.reject { |f| f =~ /^manual/ }
  test_files = test_files.select { |f| f =~ Regexp.new(ENV['ONLY']) } if ENV['ONLY']
  test_files = test_files.reject { |f| f =~ Regexp.new(ENV['EXCEPT']) } if ENV['EXCEPT']
  test_files.each { |file| require(file) }
end