eclass/tests: Fix inheriting multiple eclasses
authorMichał Górny <mgorny@gentoo.org>
Sat, 1 Jul 2017 16:10:06 +0000 (18:10 +0200)
committerMichał Górny <mgorny@gentoo.org>
Tue, 8 Aug 2017 19:42:16 +0000 (21:42 +0200)
Fix the inherit function to correctly handle 'inherit' call with
multiple eclasses, instead of returning after the first eclass is
successfully sourced.

eclass/tests/tests-common.sh

index 8141425a0dcb01ecedff147c86581e0bcce47106..d52cf3a2687b9e17e2132376a502eb1131684a5b 100644 (file)
@@ -17,11 +17,11 @@ inherit() {
                        local eclass=${path}/${e}.eclass
                        if [[ -e "${eclass}" ]] ; then
                                source "${eclass}"
-                               return 0
+                               continue 2
                        fi
                done
+               die "could not find ${e}.eclass"
        done
-       die "could not find ${eclass}"
 }
 EXPORT_FUNCTIONS() { :; }