File: ruby-tests.rb

package info (click to toggle)
ruby-oj 2.17.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 968 kB
  • ctags: 1,672
  • sloc: ansic: 10,658; ruby: 6,524; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 756 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ENV['TZ']="Europe/Paris"
SKIPPED_TESTS = [
  './test/./test_serializer.rb',
  './test/isolated/test_mimic_rails_before.rb',
  './test/isolated/test_mimic_rails_after.rb',
  './test/./test_bigd.rb',
  './test/isolated/test_mimic_rails_datetime.rb',
]

success=true
Dir.glob("./test/{isolated,.}/test*.rb").each do |f|
  # we'd like to not have rails in Build-Depends, but this means we can't test the rails integration.
  next if SKIPPED_TESTS.include?(f)
  puts "-------- running #{f} test ------- "
  #system("TZ='Europe/Paris' #{ENV['RUBY_TEST_BIN']} -I#{ENV['RUBYLIB']} #{f}") or success=false
  system("#{ENV['RUBY_TEST_BIN']} -I#{ENV['RUBYLIB']} #{f}") or begin
    puts "E: Test #{f} has failed."
    success=false
  end
end

exit(1) unless(success)