oasis.eclass: Add RESTRICT="!test? ( test )"
authorMichał Górny <mgorny@gentoo.org>
Thu, 12 Dec 2019 15:00:26 +0000 (16:00 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 12 Dec 2019 16:33:42 +0000 (17:33 +0100)
This fixes 30 cases of MissingTestRestrict.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/oasis.eclass

index 53db4b77727149a3ac28efce03a6b11f29e70cfe..7727253575d4a726b16b0e2548f3b0971be22b02 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: oasis.eclass
@@ -60,7 +60,10 @@ esac
 IUSE="+ocamlopt"
 [ -n "${OASIS_NO_DEBUG}" ]   || IUSE="${IUSE} debug"
 [ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc"
-[ -n "${OASIS_BUILD_TESTS}" ] && IUSE="${IUSE} test"
+if [[ -n ${OASIS_BUILD_TESTS} ]]; then
+       IUSE+=" test"
+       RESTRICT+=" !test? ( test )"
+fi
 
 DEPEND="${RDEPEND}
        dev-ml/ocamlbuild"