commit:     d1bdf4a406fc113cf66e6cd044343fe1361ac4d7
Author:     James Browning <JamesB.fe80 <AT> gmail <DOT> com>
AuthorDate: Thu Jun  6 11:56:04 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:02:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1bdf4a4

net-misc/ntpsec: Run tests conditionally

I am requiring FEATURES+=" test" and USE+=" test" for this.

Bug: https://bugs.gentoo.org/831352
Signed-off-by: James Browning <JamesB.fe80 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36963
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild | 9 +++++++--
 net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild  | 9 +++++++--
 net-misc/ntpsec/ntpsec-9999.ebuild      | 9 +++++++--
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
index 44d6ac637a26..58c5b907d54f 100644
--- a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
@@ -36,8 +36,9 @@ NTPSEC_REFCLOCK=(
        shm pps hpgps zyfer arbiter nmea modem local
 )
 
-IUSE="${NTPSEC_REFCLOCK[@]} debug doc early gdb heat libbsd nist ntpviz samba 
seccomp smear" #ionice
+IUSE="${NTPSEC_REFCLOCK[@]} debug doc early gdb heat libbsd nist ntpviz samba 
seccomp smear test" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
 
 # net-misc/pps-tools oncore,pps
 DEPEND="
@@ -128,7 +129,11 @@ src_compile() {
 }
 
 src_test() {
-       waf-utils_src_compile check
+       python_test
+}
+
+python_test() {
+       "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs)
 }
 
 src_install() {

diff --git a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
index 367b9c6b8fe3..b32037a2e83d 100644
--- a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
@@ -35,8 +35,9 @@ NTPSEC_REFCLOCK=(
        shm pps hpgps zyfer arbiter nmea modem local
 )
 
-IUSE="${NTPSEC_REFCLOCK[@]} debug doc early heat libbsd nist ntpviz samba 
seccomp smear" #ionice
+IUSE="${NTPSEC_REFCLOCK[@]} debug doc early heat libbsd nist ntpviz samba 
seccomp smear test" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
 
 # net-misc/pps-tools oncore,pps
 DEPEND="
@@ -124,7 +125,11 @@ src_compile() {
 }
 
 src_test() {
-       waf-utils_src_compile check
+       python_test
+}
+
+python_test() {
+       "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs)
 }
 
 src_install() {

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild 
b/net-misc/ntpsec/ntpsec-9999.ebuild
index 2bc971ead230..683fced0c1d1 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -35,8 +35,9 @@ NTPSEC_REFCLOCK=(
        shm pps hpgps zyfer arbiter nmea modem local
 )
 
-IUSE="${NTPSEC_REFCLOCK[@]} debug doc early heat libbsd nist ntpviz samba 
seccomp smear" #ionice
+IUSE="${NTPSEC_REFCLOCK[@]} debug doc early heat libbsd nist ntpviz samba 
seccomp smear test" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
 
 # net-misc/pps-tools oncore,pps
 DEPEND="
@@ -124,7 +125,11 @@ src_compile() {
 }
 
 src_test() {
-       waf-utils_src_compile check
+       python_test
+}
+
+python_test() {
+       "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs)
 }
 
 src_install() {

Reply via email to