diff --git a/community/R/APKBUILD b/community/R/APKBUILD index 4408085f64b..1539d0a2a34 100644 --- a/community/R/APKBUILD +++ b/community/R/APKBUILD @@ -85,10 +85,29 @@ build() { make -C src/nmath/standalone } -# TODO: Run provided test suite. check() { - ./bin/R --version - ./bin/R --slave --vanilla -e 'print("Hello, world!")' + # Try running R (and also aid debugging). + ./bin/R --vanilla -s -e 'sessionInfo(); R_compiled_by(); str(.Machine)' + + case "$CARCH" in + # A (non-portable) numerical regression test currently (R 4.4.0) + # fails on the aarch64 and s390x runners. + # Run at least two basic test suites: + aarch64 | s390x) + make -C tests test-Examples && make -C tests test-Specific || { + tail -v -n 42 tests/*.fail; exit 1 + } + ;; + *) + make check || { + tail -v -n 42 tests/*.fail; exit 1 + } + ;; + esac + + # NOTE: EST5EDT-related differences reported for datetime.Rout are known + # (see + # or also ) } package() {