File: ruby-tests.rb

package info (click to toggle)
ruby-byebug 12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,304 kB
  • sloc: ruby: 9,013; ansic: 1,678; sh: 5; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 615 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
30
31
32
require 'tmpdir'
ENV['BUNDLE_GEMFILE'] = '/dev/null'
require 'bundler'
require './test/minitest_runner.rb'

ARGV.push '--verbose'

$EXCLUDES = []
[
  'any',
  ENV['AUTOPKGTEST_TMP'] && 'autopkgtest' || nil,
  `dpkg-architecture -qDEB_HOST_ARCH`.strip,
].compact.each do |f|
  excludes = "debian/tests/exclude/#{f}"
  if File.exist?(excludes)
    $EXCLUDES += File.read(excludes).split
  end
end

class Byebug::MinitestRunner
  def all_test_suites
    Dir.glob("test/**/*_test.rb") - $EXCLUDES
  end
end

rc = 0
Dir.mktmpdir do |home|
  ENV['HOME'] = home
  rc = 1 unless Byebug::MinitestRunner.new.run
end

exit rc