dev-R/brio: add tests

Signed-off-by: Robert Greener <me@r0bert.dev>
This commit is contained in:
Robert Greener
2022-07-01 13:53:18 +01:00
parent d46d2f0bf0
commit d8ebfcbd76
2 changed files with 15 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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>