Skip to content

Commit 64e4572

Browse files
committed
more targeted use of fini in examples and tests
1 parent fd0ae90 commit 64e4572

File tree

6 files changed

+18
-22
lines changed

6 files changed

+18
-22
lines changed

R/nanonext-package.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,3 @@
9898
#' @useDynLib nanonext, .registration = TRUE
9999
#'
100100
"_PACKAGE"
101-
102-
# nocov start
103-
# tested implicitly
104-
105-
.onUnload <- function(libpath) library.dynam.unload("nanonext", libpath)
106-
107-
# nocov end

R/utils.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,12 @@ next_config <- function(refhook = list(), class = "", vec = FALSE, mark = FALSE)
328328
#' to run the examples.
329329
#'
330330
#' @examples
331-
#' rm(list = ls())
332-
#' gc()
333-
#' Sys.sleep(1L)
334-
#' .Call(nanonext:::rnng_fini)
331+
#' if (Sys.info()[["sysname"]] == "Linux") {
332+
#' rm(list = ls())
333+
#' gc()
334+
#' Sys.sleep(1L)
335+
#' .Call(nanonext:::rnng_fini)
336+
#' }
335337
#'
336338
#' @keywords internal
337339
#'

README.Rmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ knitr::opts_chunk$set(
1717

1818
<!-- badges: start -->
1919
[![CRAN status](https://www.r-pkg.org/badges/version/nanonext?color=112d4e)](https://CRAN.R-project.org/package=nanonext)
20-
[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fr-multiverse.r-universe.dev%2Fapi%2Fpackages%2Fnanonext&query=%24.Version&label=R-multiverse&color=112d4e)](https://r-multiverse.r-universe.dev/nanonext)
2120
[![R-universe status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext)
2221
[![R-CMD-check](https://github.com/shikokuchuo/nanonext/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/nanonext/actions)
2322
[![codecov](https://codecov.io/gh/shikokuchuo/nanonext/graph/badge.svg)](https://app.codecov.io/gh/shikokuchuo/nanonext)

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
[![CRAN
99
status](https://www.r-pkg.org/badges/version/nanonext?color=112d4e)](https://CRAN.R-project.org/package=nanonext)
10-
[![R-multiverse
11-
status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fr-multiverse.r-universe.dev%2Fapi%2Fpackages%2Fnanonext&query=%24.Version&label=R-multiverse&color=112d4e)](https://r-multiverse.r-universe.dev/nanonext)
1210
[![R-universe
1311
status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext)
1412
[![R-CMD-check](https://github.com/shikokuchuo/nanonext/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/nanonext/actions)

man/zzz.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/tests.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ nanotestw(dial(s, url = "tls+tcp://.", tls = tls, error = FALSE) > 0)
555555
nanotestw(listen(s, url = "tls+tcp://.", tls = tls, error = FALSE) > 0)
556556
nanotestz(close(s1))
557557
nanotestz(close(s))
558-
rm(list = ls())
559-
gc()
560-
Sys.sleep(1L)
561-
.Call(nanonext:::rnng_fini)
558+
if (Sys.info()[["sysname"]] == "Linux") {
559+
rm(list = ls())
560+
gc()
561+
Sys.sleep(1L)
562+
.Call(nanonext:::rnng_fini)
563+
}

0 commit comments

Comments
 (0)