@@ -16,7 +16,7 @@ test_that("install_cmdstan() successfully installs cmdstan", {
1616 }
1717 expect_message(
1818 expect_output(
19- install_cmdstan(dir = dir , cores = 1 , quiet = FALSE , overwrite = TRUE ,
19+ install_cmdstan(dir = dir , cores = CORES , quiet = FALSE , overwrite = TRUE ,
2020 release_url = cmdstan_test_tarball_url ,
2121 wsl = os_is_wsl()),
2222 " Compiling C++ code" ,
@@ -55,7 +55,7 @@ test_that("install_cmdstan() errors if it times out", {
5555 expect_warning(
5656 expect_message(
5757 install_cmdstan(dir = dir , timeout = 1 , quiet = TRUE , overwrite = dir_exists ,
58- cores = 1 , wsl = os_is_wsl()),
58+ cores = CORES , wsl = os_is_wsl()),
5959 if (dir_exists ) " * Removing the existing installation" else " * * Installing CmdStan from https://github.com" ,
6060 fixed = TRUE
6161 ),
@@ -67,7 +67,7 @@ test_that("install_cmdstan() errors if it times out", {
6767 expect_warning(
6868 expect_message(
6969 install_cmdstan(dir = dir , timeout = 1 , quiet = FALSE , overwrite = dir_exists ,
70- cores = 1 , wsl = os_is_wsl()),
70+ cores = CORES , wsl = os_is_wsl()),
7171 if (dir_exists ) " * Removing the existing installation" else " * * Installing CmdStan from https://github.com" ,
7272 fixed = TRUE
7373 ),
@@ -104,7 +104,7 @@ test_that("install_cmdstan() works with version and release_url", {
104104
105105 expect_message(
106106 expect_output(
107- install_cmdstan(dir = dir , overwrite = TRUE , cores = 1 ,
107+ install_cmdstan(dir = dir , overwrite = TRUE , cores = CORES ,
108108 release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.36.0/cmdstan-2.36.0.tar.gz" ,
109109 wsl = os_is_wsl()),
110110 " Compiling C++ code" ,
@@ -116,7 +116,7 @@ test_that("install_cmdstan() works with version and release_url", {
116116 expect_warning(
117117 expect_message(
118118 expect_output(
119- install_cmdstan(dir = dir , overwrite = TRUE , cores = 1 ,
119+ install_cmdstan(dir = dir , overwrite = TRUE , cores = CORES ,
120120 version = " 2.36.0" ,
121121 # the URL is intentionally invalid to test that the version has higher priority
122122 release_url = " https://github.com/stan-dev/cmdstan/releases/download/v2.27.3/cmdstan-2.27.3.tar.gz" ,
@@ -192,7 +192,7 @@ test_that("toolchain checks on Windows with RTools 3.5 work", {
192192
193193test_that(" clean and rebuild works" , {
194194 expect_output(
195- rebuild_cmdstan(cores = 1 ),
195+ rebuild_cmdstan(cores = CORES ),
196196 paste0(" CmdStan v" , cmdstan_version(), " built" ),
197197 fixed = TRUE
198198 )
@@ -220,11 +220,11 @@ test_that("Downloads respect quiet argument", {
220220 # expect_message has trouble capturing the messages from download.file
221221 # so handle manually
222222 install_normal <- suppressWarnings(
223- capture.output(install_cmdstan(dir = dir , overwrite = TRUE , quiet = FALSE , cores = 1 ),
223+ capture.output(install_cmdstan(dir = dir , overwrite = TRUE , quiet = FALSE , cores = CORES ),
224224 type = " message" )
225225 )
226226 install_quiet <- suppressWarnings(
227- capture.output(install_cmdstan(dir = dir , overwrite = TRUE , quiet = TRUE , cores = 1 ),
227+ capture.output(install_cmdstan(dir = dir , overwrite = TRUE , quiet = TRUE , cores = CORES ),
228228 type = " message" )
229229 )
230230
@@ -269,7 +269,7 @@ test_that("Install from release file works", {
269269
270270 expect_message(
271271 expect_output(
272- install_cmdstan(dir = dir , cores = 1 , quiet = FALSE , overwrite = TRUE ,
272+ install_cmdstan(dir = dir , cores = CORES , quiet = FALSE , overwrite = TRUE ,
273273 release_file = destfile ,
274274 wsl = os_is_wsl()),
275275 " Compiling C++ code" ,
0 commit comments