From 037edc147d1b33e226fa135cabe865c40b3276cf Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Sun, 24 Jan 2010 00:00:40 +0000 Subject: 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. --- eclass/ruby-fakegem.eclass | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'eclass/ruby-fakegem.eclass') 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: -- cgit v1.2.3-65-gdbad