commit: d8ebfcbd7668f653eebadc98aedb3bf2fc96087d Author: Robert Greener <me <AT> r0bert <DOT> dev> AuthorDate: Fri Jul 1 12:53:18 2022 +0000 Commit: Robert Greener <me <AT> r0bert <DOT> dev> CommitDate: Fri Jul 1 12:53:18 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d8ebfcbd
dev-R/brio: add tests Signed-off-by: Robert Greener <me <AT> r0bert.dev> dev-R/brio/brio-1.1.3.ebuild | 12 ++++++++++++ dev-R/brio/metadata.xml | 3 +++ 2 files changed, 15 insertions(+) diff --git a/dev-R/brio/brio-1.1.3.ebuild b/dev-R/brio/brio-1.1.3.ebuild index 4ad10eff8..5d5faea7a 100644 --- a/dev-R/brio/brio-1.1.3.ebuild +++ b/dev-R/brio/brio-1.1.3.ebuild @@ -8,8 +8,20 @@ inherit R-packages DESCRIPTION='Basic R Input Output' KEYWORDS="~amd64" LICENSE='MIT' +RESTRICT="!test? ( test )" +IUSE="test" +DEPEND=" + test? ( >=dev-R/testthat-2.1.0 ) +" SUGGESTED_PACKAGES=" dev-R/covr >=dev-R/testthat-2.1.0 " + +src_test() { + if use test; then + cd "${WORKDIR}/${P}/tests" + NOT_CRAN=true R_LIBS="${T}/R" edo Rscript --vanilla testthat.R + fi +} diff --git a/dev-R/brio/metadata.xml b/dev-R/brio/metadata.xml index d61fa72ea..fcca8c26c 100644 --- a/dev-R/brio/metadata.xml +++ b/dev-R/brio/metadata.xml @@ -17,4 +17,7 @@ files and provide more explicit control over line endings.</longdescription> <bugs-to>https://github.com/r-lib/brio/issues</bugs-to> <remote-id type="github">r-lib/brio</remote-id> </upstream> + <use> + <flag name="test">Run the tests</flag> + </use> </pkgmetadata>