[DRE-commits] [ruby-gsl] 04/10: add ruby-tests.rb to run tests at build time
Cédric Boutillier
boutil at alioth.debian.org
Wed Oct 16 16:10:50 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-gsl.
commit 8f9af12f42642f607f35f458173d64ad4ec76dde
Author: Cédric Boutillier <boutil at debian.org>
Date: Wed Oct 16 17:42:08 2013 +0200
add ruby-tests.rb to run tests at build time
---
debian/ruby-tests.rb | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
new file mode 100644
index 0000000..8be8fda
--- /dev/null
+++ b/debian/ruby-tests.rb
@@ -0,0 +1,19 @@
+$LOAD_PATH << File.expand_path("lib/")
+
+EXPANDED_LOAD_PATH=$LOAD_PATH.map { |d| File.expand_path d }
+EXCLUDED_TESTS=["tests/sf/make_test.rb",
+ "tests/speed/bench.rb",
+ "tests/tensor.rb"
+ ]
+
+oldpath = Dir.getwd
+(Dir["tests/**/*.rb"]-EXCLUDED_TESTS).each do |f|
+ puts "*** running #{f} ***"
+ dir, filename = File.split f
+ begin
+ Dir.chdir File.expand_path(dir)
+ system("#{ENV['RUBY_TEST_BIN']} -I#{EXPANDED_LOAD_PATH.join(":")} #{filename}") || exit($?.exitstatus)
+ ensure
+ Dir.chdir oldpath
+ end
+end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gsl.git
More information about the Pkg-ruby-extras-commits
mailing list