11context(" install" )
2- # Current tests need CmdStan 2.35 for stock rtools, but is not yet released
3- skip_if(Sys.getenv(" CMDSTANR_USE_RTOOLS" ) != " " )
42
53cmdstan_test_tarball_url <- Sys.getenv(" CMDSTAN_TEST_TARBALL_URL" )
64if (! nzchar(cmdstan_test_tarball_url )) {
@@ -28,13 +26,13 @@ test_that("install_cmdstan() successfully installs cmdstan", {
2826
2927test_that(" install_cmdstan() errors if installation already exists" , {
3028 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" )
3230 if (! dir.exists(dir )) {
3331 dir.create(dir , recursive = TRUE )
3432 }
3533 expect_warning(
3634 install_cmdstan(dir = install_dir , overwrite = FALSE ,
37- version = " 2.23 .0" , wsl = FALSE ),
35+ version = " 2.35 .0" , wsl = FALSE ),
3836 " An installation already exists" ,
3937 fixed = TRUE
4038 )
@@ -76,13 +74,13 @@ test_that("install_cmdstan() errors if it times out", {
7674
7775test_that(" install_cmdstan() errors if invalid version or URL" , {
7876 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."
8179 )
8280 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" ,
8482 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."
8684 )
8785 expect_error(
8886 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", {
10098 expect_message(
10199 expect_output(
102100 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" ,
104102 wsl = os_is_wsl()),
105- " Compiling, linking C++ code" ,
103+ " Compiling C++ code" ,
106104 fixed = TRUE
107105 ),
108106 " Finished installing CmdStan" ,
@@ -112,11 +110,11 @@ test_that("install_cmdstan() works with version and release_url", {
112110 expect_message(
113111 expect_output(
114112 install_cmdstan(dir = dir , overwrite = TRUE , cores = 4 ,
115- version = " 2.33 .0" ,
113+ version = " 2.35 .0" ,
116114 # the URL is intentionally invalid to test that the version has higher priority
117115 release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.27.3/cmdstan-2.27.3.tar.gz" ,
118116 wsl = os_is_wsl()),
119- " Compiling, linking C++ code" ,
117+ " Compiling C++ code" ,
120118 fixed = TRUE
121119 ),
122120 " Finished installing CmdStan" ,
@@ -125,7 +123,7 @@ test_that("install_cmdstan() works with version and release_url", {
125123 " version and release_url shouldn't both be specified" ,
126124 fixed = TRUE
127125 )
128- expect_true(dir.exists(file.path(dir , " cmdstan-2.33 .0" )))
126+ expect_true(dir.exists(file.path(dir , " cmdstan-2.35 .0" )))
129127 set_cmdstan_path(cmdstan_default_path())
130128})
131129
@@ -256,18 +254,18 @@ test_that("Install from release file works", {
256254 dir <- tempdir(check = TRUE )
257255 }
258256
259- destfile = file.path(dir , " cmdstan-2.33.1 .tar.gz" )
257+ destfile = file.path(dir , " cmdstan-2.35.0 .tar.gz" )
260258
261259 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" ,
263261 destfile )
264262
265263 expect_message(
266264 expect_output(
267265 install_cmdstan(dir = dir , cores = 2 , quiet = FALSE , overwrite = TRUE ,
268266 release_file = destfile ,
269267 wsl = os_is_wsl()),
270- " Compiling, linking C++ code" ,
268+ " Compiling C++ code" ,
271269 fixed = TRUE
272270 ),
273271 " CmdStan path set" ,
0 commit comments