summaryrefslogtreecommitdiff
path: root/eclass
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
commit02d2c69ff530abb5db0d85f24f4e4feb3b2cb2db (patch)
treee158302f3e8fe7986d4d0cb594fb960860c571c1 /eclass
parentFix the converted package (build and install the C extension); run tests (man... (diff)
downloadhistorical-02d2c69ff530abb5db0d85f24f4e4feb3b2cb2db.tar.gz
historical-02d2c69ff530abb5db0d85f24f4e4feb3b2cb2db.tar.bz2
historical-02d2c69ff530abb5db0d85f24f4e4feb3b2cb2db.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')
-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: