File: run-test.rb

package info (click to toggle)
ruby-cairo 1.17.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,532 kB
  • sloc: ruby: 11,997; ansic: 10,183; sh: 48; makefile: 4
file content (24 lines) | stat: -rwxr-xr-x 553 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env ruby

source_dir = File.expand_path(File.join(__dir__, ".."))
build_dir = File.expand_path(".")
ext_dir = File.join(build_dir, "ext", "cairo")
lib_dir = File.join(source_dir, "lib")
test_dir = File.join(source_dir, "test")

if system("which make >/dev/null 2>&1")
  Dir.chdir(build_dir) do
    if File.exist?("Makefile")
      system("make > /dev/null") or exit(1)
    end
  end
end

require "test-unit"

$LOAD_PATH.unshift(ext_dir)
$LOAD_PATH.unshift(lib_dir)

require_relative "helper"

exit(Test::Unit::AutoRunner.run(true, test_dir))