summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-24 00:00:40 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-24 00:00:40 +0000
commit037edc147d1b33e226fa135cabe865c40b3276cf (patch)
tree42f21300446d2499b1fc179dfbf2b95bd454cc01 /eclass/ruby-fakegem.eclass
parentFix the converted package (build and install the C extension); run tests (man... (diff)
downloadgentoo-2-037edc147d1b33e226fa135cabe865c40b3276cf.tar.gz
gentoo-2-037edc147d1b33e226fa135cabe865c40b3276cf.tar.bz2
gentoo-2-037edc147d1b33e226fa135cabe865c40b3276cf.zip
Define each_ruby_test in ruby-fakegem only if a test task is defined.
With this change you won't get further output during test phase if there is no fakegem test going to be executed. Packages will still be able to inject their each_ruby_test function to run custom test commands.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r--eclass/ruby-fakegem.eclass23
1 files changed, 10 insertions, 13 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index ded5bc5d6d07..bddefbfd2805 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.12 2010/01/21 10:18:59 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.13 2010/01/24 00:00:40 flameeyes Exp $
#
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
@@ -240,20 +240,17 @@ all_ruby_compile() {
# Run tests for the package for each ruby target if the test task is defined.
each_fakegem_test() {
local rubyflags=
-
- if [[ ${RUBY_FAKEGEM_TASK_TEST} != "" ]]; then
- ${RUBY} ${rubyflags} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed"
- else
- echo "No test task defined, skipping tests."
- fi
+ ${RUBY} ${rubyflags} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed"
}
-# @FUNCTION: each_ruby_test
-# @DESCRIPTION:
-# Run the tests for this package.
-each_ruby_test() {
- each_fakegem_test
-}
+if [[ ${RUBY_FAKEGEM_TASK_TEST} != "" ]]; then
+ # @FUNCTION: each_ruby_test
+ # @DESCRIPTION:
+ # Run the tests for this package.
+ each_ruby_test() {
+ each_fakegem_test
+ }
+fi
# @FUNCTION: each_fakegem_install
# @DESCRIPTION: