diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-10-16 17:36:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-10-16 17:36:43 +0000 |
commit | 6f189d412d0ec716c182e24e7297106a89842191 (patch) | |
tree | c1c31195270cb3d0caab7fb2d3d6968c892049d2 /eclass/tests | |
parent | Changing to using upstream supplied systemd files, fixing bug #525436 (diff) | |
download | gentoo-2-6f189d412d0ec716c182e24e7297106a89842191.tar.gz gentoo-2-6f189d412d0ec716c182e24e7297106a89842191.tar.bz2 gentoo-2-6f189d412d0ec716c182e24e7297106a89842191.zip |
tests: let overlays add their own eclasses and testsuites and reuse this infrastructure
Diffstat (limited to 'eclass/tests')
-rw-r--r-- | eclass/tests/tests-common.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh index 99712f68b864..131b78720834 100644 --- a/eclass/tests/tests-common.sh +++ b/eclass/tests/tests-common.sh @@ -5,11 +5,21 @@ if ! source /etc/init.d/functions.sh ; then 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() { :; } |