Skip to content

Commit e282c2d

Browse files
authored
Merge pull request #206 from ropensci-review-tools/tests
add conditional 'on_r_univ' explicit clean-up of test dirs to fix #205
2 parents b862024 + 44f7055 commit e282c2d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

‎DESCRIPTION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: repometrics
22
Title: Metrics for Your Code Repository
3-
Version: 0.2.1.057
3+
Version: 0.2.1.058
44
Authors@R:
55
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

‎codemeta.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/repometrics",
99
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.2.1.057",
11+
"version": "0.2.1.058",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

‎tests/testthat/helper-temp-pkg.R‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
generate_test_pkg <- function () {
22

3+
on_r_univ <- nzchar (Sys.getenv ("MY_UNIVERSE"))
4+
35
pkg <- system.file ("extdata", "testpkg.zip", package = "repometrics")
46
pkg_dest <- fs::path (fs::path_temp (), "testpkg")
57
if (fs::dir_exists (pkg_dest)) {
6-
stop ("test package already exists", call. = FALSE)
8+
if (on_r_univ) {
9+
# For some reason, directories are not properly cleaned up on
10+
# r-univ machines, so this fn always fails.
11+
fs::dir_delete (pkg_dest)
12+
} else {
13+
stop ("test package already exists", call. = FALSE)
14+
}
715
}
816
flist <- unzip (pkg, exdir = fs::path_temp ())
917

0 commit comments

Comments
 (0)