[cairo-commit] rcairo/test run-test.rb,1.3,1.4
Kouhei Sutou
commit at pdx.freedesktop.org
Wed Aug 13 01:22:16 PDT 2008
Committed by: kou
Update of /cvs/cairo/rcairo/test
In directory kemper:/tmp/cvs-serv13243/test
Modified Files:
run-test.rb
Log Message:
* test/run-test.rb: use Test::Unit 2.x.
Index: run-test.rb
===================================================================
RCS file: /cvs/cairo/rcairo/test/run-test.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- run-test.rb 11 Aug 2008 12:53:32 -0000 1.3
+++ run-test.rb 13 Aug 2008 08:22:14 -0000 1.4
@@ -1,14 +1,25 @@
#!/usr/bin/env ruby
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
+test_unit_dir = File.join(base_dir, "test-unit", "lib")
src_dir = File.join(base_dir, "src")
lib_dir = File.join(src_dir, "lib")
+test_dir = File.join(base_dir, "test")
+
+if system("which make > /dev/null")
+ system("cd #{base_dir.dump} && make > /dev/null") or exit(1)
+end
+
+$LOAD_PATH.unshift(test_unit_dir)
+
+require 'test/unit'
$LOAD_PATH.unshift(base_dir)
$LOAD_PATH.unshift(src_dir)
$LOAD_PATH.unshift(lib_dir)
-require 'test/unit'
+$LOAD_PATH.unshift(test_dir)
+require 'cairo-test-utils'
Dir.glob("test/**/test_*.rb") do |file|
require file.sub(/\.rb$/, '')
More information about the cairo-commit
mailing list