[DRE-commits] [ruby-rjb] 04/09: Use the system bridge class when running under autopkgtest
Jérémy Bobbio
lunar at moszumanska.debian.org
Wed Sep 9 19:56:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository ruby-rjb.
commit 1cd8419767aec988fa6b65a00a976390c3ac00de
Author: Jérémy Bobbio <lunar at debian.org>
Date: Wed Sep 9 21:15:40 2015 +0200
Use the system bridge class when running under autopkgtest
---
debian/ruby-tests.rb | 6 ++++--
debian/tests/control | 2 ++
debian/tests/upstream-tests | 8 ++++++++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index bb5f3be..4df7120 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -1,7 +1,9 @@
# The test needs to know where to find the class files
ENV['CLASSPATH'] = File.expand_path('../../test', __FILE__)
-# 'data' directory is not yet installed, so use the local version
-ENV['RJB_BRIDGE_FILE'] = File.expand_path('../../data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class', __FILE__)
+if ENV['ADTTMP'].nil? # not running through autopkgtest
+ # 'data' directory is not yet installed, so use the local version
+ ENV['RJB_BRIDGE_FILE'] = File.expand_path('../../data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class', __FILE__)
+end
require 'test/test.rb'
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..008e384
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: upstream-tests
+Depends: @, @builddeps@, gem2deb-test-runner
diff --git a/debian/tests/upstream-tests b/debian/tests/upstream-tests
new file mode 100755
index 0000000..3e79c5d
--- /dev/null
+++ b/debian/tests/upstream-tests
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+# We need to compile the test classes before running the tests
+debian/rules build
+
+gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rjb.git
More information about the Pkg-ruby-extras-commits
mailing list