1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
$LOAD_PATH << File.expand_path("lib/")
EXPANDED_LOAD_PATH=$LOAD_PATH.map { |d| File.expand_path d }
EXCLUDED_TESTS=["tests/sf/make_test.rb",
"tests/speed/bench.rb",
"tests/tensor.rb"
]
oldpath = Dir.getwd
(Dir["tests/**/*.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
|