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 3E2921387CA for ; Thu, 16 Oct 2014 17:36:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 448F8E07FD; Thu, 16 Oct 2014 17:36:47 +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 DFC4BE07FD for ; Thu, 16 Oct 2014 17:36:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F202134036D for ; Thu, 16 Oct 2014 17:36:44 +0000 (UTC) Received: by oystercatcher.gentoo.org (Postfix, from userid 559) id B741A809B; Thu, 16 Oct 2014 17:36:43 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass/tests: tests-common.sh X-VCS-Repository: gentoo-x86 X-VCS-Files: tests-common.sh X-VCS-Directories: eclass/tests X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20141016173643.B741A809B@oystercatcher.gentoo.org> Date: Thu, 16 Oct 2014 17:36:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 37cc04fc-b489-4302-9cb4-f886fadcf5c2 X-Archives-Hash: 2db975fbc9bb2e18dbb75109d0509f91 vapier 14/10/16 17:36:43 Modified: tests-common.sh Log: tests: let overlays add their own eclasses and testsuites and reuse this infrastructure Revision Changes Path 1.13 eclass/tests/tests-common.sh file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/tests-common.sh?rev=1.13&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/tests-common.sh?rev=1.13&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/tests-common.sh?r1=1.12&r2=1.13 Index: tests-common.sh =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/tests/tests-common.sh,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- tests-common.sh 25 Sep 2013 11:20:12 -0000 1.12 +++ tests-common.sh 16 Oct 2014 17:36:43 -0000 1.13 @@ -5,11 +5,21 @@ exit 1 fi +# Let overlays override this so they can add their own testsuites. +TESTS_ECLASS_SEARCH_PATHS=( .. ) + inherit() { - local e + local e path for e in "$@" ; do - source ../${e}.eclass + for path in "${TESTS_ECLASS_SEARCH_PATHS[@]}" ; do + local eclass=${path}/${e}.eclass + if [[ -e "${eclass}" ]] ; then + source "${eclass}" + return 0 + fi + done done + die "could not find ${eclass}" } EXPORT_FUNCTIONS() { :; }