commit: 96ce954fee8e464edadc473a5ba2da8b8352b6cb
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 08:51:57 2017 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 19:00:01 2017 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=96ce954f
ebuild-writing/.../src_test: Update the default implementation
ebuild-writing/functions/src_test/text.xml | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/ebuild-writing/functions/src_test/text.xml
b/ebuild-writing/functions/src_test/text.xml
index f058006..5d1ba3f 100644
--- a/ebuild-writing/functions/src_test/text.xml
+++ b/ebuild-writing/functions/src_test/text.xml
@@ -31,23 +31,13 @@
<section>
<title>Default <c>src_test</c></title>
<body>
-<p> From sys-apps/portage-2.1.2.9 </p>
+<p>The default test phase in EAPI 6 is equivalent to the following:</p>
<codesample lang="ebuild">
src_test() {
- if emake -j1 check -n &> /dev/null; then
- vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
- if ! emake -j1 check; then
- hasq test $FEATURES && die "Make check failed.
See above for details."
- hasq test $FEATURES || eerror "Make check failed. See
above for details."
- fi
- elif emake -j1 test -n &> /dev/null; then
- vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
- if ! emake -j1 test; then
- hasq test $FEATURES && die "Make test failed.
See above for details."
- hasq test $FEATURES || eerror "Make test failed. See
above for details."
- fi
- else
- vecho ">>> Test phase [none]: ${CATEGORY}/${PF}"
+ if emake check -n &> /dev/null; then
+ emake check
+ elif emake test -n &> /dev/null; then
+ emake test
fi
}
</codesample>