1
1
context(" install" )
2
- # Current tests need CmdStan 2.35 for stock rtools, but is not yet released
3
- skip_if(Sys.getenv(" CMDSTANR_USE_RTOOLS" ) != " " )
4
2
5
3
cmdstan_test_tarball_url <- Sys.getenv(" CMDSTAN_TEST_TARBALL_URL" )
6
4
if (! nzchar(cmdstan_test_tarball_url )) {
@@ -28,13 +26,13 @@ test_that("install_cmdstan() successfully installs cmdstan", {
28
26
29
27
test_that(" install_cmdstan() errors if installation already exists" , {
30
28
install_dir <- cmdstan_default_install_path()
31
- dir <- file.path(install_dir , " cmdstan-2.23 .0" )
29
+ dir <- file.path(install_dir , " cmdstan-2.35 .0" )
32
30
if (! dir.exists(dir )) {
33
31
dir.create(dir , recursive = TRUE )
34
32
}
35
33
expect_warning(
36
34
install_cmdstan(dir = install_dir , overwrite = FALSE ,
37
- version = " 2.23 .0" , wsl = FALSE ),
35
+ version = " 2.35 .0" , wsl = FALSE ),
38
36
" An installation already exists" ,
39
37
fixed = TRUE
40
38
)
@@ -76,13 +74,13 @@ test_that("install_cmdstan() errors if it times out", {
76
74
77
75
test_that(" install_cmdstan() errors if invalid version or URL" , {
78
76
expect_error(
79
- install_cmdstan(version = " 2.23.2 " , wsl = os_is_wsl()),
80
- " Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.23.2 /cmdstan-2.23.2 .tar.gz'\n Please check if the supplied version number is valid."
77
+ install_cmdstan(version = " 2.35.5 " , wsl = os_is_wsl()),
78
+ " Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.35.5 /cmdstan-2.35.5 .tar.gz'\n Please check if the supplied version number is valid."
81
79
)
82
80
expect_error(
83
- install_cmdstan(release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.23.2 /cmdstan-2.23.2 .tar.gz" ,
81
+ install_cmdstan(release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.35.5 /cmdstan-2.35.5 .tar.gz" ,
84
82
wsl = os_is_wsl()),
85
- " Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.23.2 /cmdstan-2.23.2 .tar.gz'\n Please check if the supplied release URL is valid."
83
+ " Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.35.5 /cmdstan-2.35.5 .tar.gz'\n Please check if the supplied release URL is valid."
86
84
)
87
85
expect_error(
88
86
install_cmdstan(release_url = " https://github.com/stan-dev/cmdstan/releases/tag/v2.24.0" , wsl = os_is_wsl()),
@@ -100,9 +98,9 @@ test_that("install_cmdstan() works with version and release_url", {
100
98
expect_message(
101
99
expect_output(
102
100
install_cmdstan(dir = dir , overwrite = TRUE , cores = 4 ,
103
- release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.33 .0/cmdstan-2.33 .0.tar.gz" ,
101
+ release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.35 .0/cmdstan-2.35 .0.tar.gz" ,
104
102
wsl = os_is_wsl()),
105
- " Compiling, linking C++ code" ,
103
+ " Compiling C++ code" ,
106
104
fixed = TRUE
107
105
),
108
106
" Finished installing CmdStan" ,
@@ -112,11 +110,11 @@ test_that("install_cmdstan() works with version and release_url", {
112
110
expect_message(
113
111
expect_output(
114
112
install_cmdstan(dir = dir , overwrite = TRUE , cores = 4 ,
115
- version = " 2.33 .0" ,
113
+ version = " 2.35 .0" ,
116
114
# the URL is intentionally invalid to test that the version has higher priority
117
115
release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.27.3/cmdstan-2.27.3.tar.gz" ,
118
116
wsl = os_is_wsl()),
119
- " Compiling, linking C++ code" ,
117
+ " Compiling C++ code" ,
120
118
fixed = TRUE
121
119
),
122
120
" Finished installing CmdStan" ,
@@ -125,7 +123,7 @@ test_that("install_cmdstan() works with version and release_url", {
125
123
" version and release_url shouldn't both be specified" ,
126
124
fixed = TRUE
127
125
)
128
- expect_true(dir.exists(file.path(dir , " cmdstan-2.33 .0" )))
126
+ expect_true(dir.exists(file.path(dir , " cmdstan-2.35 .0" )))
129
127
set_cmdstan_path(cmdstan_default_path())
130
128
})
131
129
@@ -256,18 +254,18 @@ test_that("Install from release file works", {
256
254
dir <- tempdir(check = TRUE )
257
255
}
258
256
259
- destfile = file.path(dir , " cmdstan-2.33.1 .tar.gz" )
257
+ destfile = file.path(dir , " cmdstan-2.35.0 .tar.gz" )
260
258
261
259
download_with_retries(
262
- " https://github.com/stan-dev/cmdstan/releases/download/v2.33.1 /cmdstan-2.33.1 .tar.gz" ,
260
+ " https://github.com/stan-dev/cmdstan/releases/download/v2.35.0 /cmdstan-2.35.0 .tar.gz" ,
263
261
destfile )
264
262
265
263
expect_message(
266
264
expect_output(
267
265
install_cmdstan(dir = dir , cores = 2 , quiet = FALSE , overwrite = TRUE ,
268
266
release_file = destfile ,
269
267
wsl = os_is_wsl()),
270
- " Compiling, linking C++ code" ,
268
+ " Compiling C++ code" ,
271
269
fixed = TRUE
272
270
),
273
271
" CmdStan path set" ,
0 commit comments