From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A84941384B4 for ; Fri, 1 Jan 2016 16:47:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D04321C0D2; Fri, 1 Jan 2016 16:41:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1995F21C0BC for ; Fri, 1 Jan 2016 16:41:49 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id BA5EA340A38; Fri, 1 Jan 2016 16:41:45 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 09/15] scons-utils.eclass: tests, be more verbose on tests being performed Date: Fri, 1 Jan 2016 17:41:15 +0100 Message-Id: <1451666481-22145-10-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1451666481-22145-1-git-send-email-mgorny@gentoo.org> References: <1451666481-22145-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: da4606eb-4c34-4a4e-b0c7-a3bc564f62a6 X-Archives-Hash: faa306050d1cd4a29edb4baa357258e5 --- eclass/tests/scons-utils.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/eclass/tests/scons-utils.sh b/eclass/tests/scons-utils.sh index 5a65fbe..7387135 100755 --- a/eclass/tests/scons-utils.sh +++ b/eclass/tests/scons-utils.sh @@ -8,7 +8,9 @@ source tests-common.sh inherit scons-utils test-scons_clean_makeopts() { - local sconsopts=$(scons_clean_makeopts ${1}) + tbegin "scons_clean_makeopts() for ${1}" + + local sconsopts=$(scons_clean_makeopts ${1}) ret=0 if [[ ${sconsopts} != ${2-${1}} ]]; then eerror "Self-test failed:" @@ -17,11 +19,11 @@ test-scons_clean_makeopts() { eerror "Expected: ${2-${1}}" eerror "Actual: ${sconsopts}" eoutdent - (( ++failed )) - return 1 + ret=1 fi - return 0 + tend ${ret} + return ${ret} } # jobcount expected for non-specified state @@ -29,8 +31,6 @@ jc=5 # failed test counter failed=0 -tbegin "scons_clean_makeopts()" - # sane MAKEOPTS test-scons_clean_makeopts '--jobs=14 -k' test-scons_clean_makeopts '--jobs=14 -k' @@ -59,6 +59,4 @@ test-scons_clean_makeopts '--jobs funnystuff -k' "--jobs=${jc} -k" test-scons_clean_makeopts '--jobs -l3' "--jobs=${jc}" test-scons_clean_makeopts '-j -l3' "-j ${jc}" -tend ${failed} - texit -- 2.6.4