File: ruby-tests.rb

package info (click to toggle)
ruby-gsl 2.1.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,892 kB
  • ctags: 5,459
  • sloc: ansic: 61,660; ruby: 15,656; sh: 19; makefile: 10
file content (17 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$LOAD_PATH << File.expand_path("lib/")
$LOAD_PATH << File.expand_path("test/")

EXPANDED_LOAD_PATH=$LOAD_PATH.map { |d| File.expand_path d }
EXCLUDED_TESTS = Dir["test/gsl/nmatrix_tests/*.rb"]

oldpath = Dir.getwd
(Dir["test/**/*.rb"] - EXCLUDED_TESTS).each do |f|
  puts "*** running #{f} ***"
  dir, filename = File.split f
  begin
    Dir.chdir File.expand_path(dir)
    system("#{ENV['RUBY_TEST_BIN']} -I#{EXPANDED_LOAD_PATH.join(":")} #{filename}") || exit($?.exitstatus)
  ensure
    Dir.chdir oldpath
  end
end