File: ruby-tests.rb

package info (click to toggle)
ruby-oj 3.16.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,852 kB
  • sloc: ansic: 19,402; ruby: 11,451; makefile: 17
file content (29 lines) | stat: -rw-r--r-- 961 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
if (arch = RbConfig::CONFIG["arch"]) == "powerpc64le-linux-gnu"
  puts "I: skipping tests on #{arch}"
  exit(0)
end


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|
["tests", "tests_mimic", "tests_mimic_addition"].map {|s| "test/#{s}.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)