Running 'testthat.R' [17s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(rstantools)
  This is rstantools version 1.5.0
  > 
  > foo <- function(x) {"test function"}
  > 
  > test_check("rstantools")
  Changing active project to testPackage
  v Creating 'R/'
  v Creating 'man/'
  v Writing 'DESCRIPTION'
  v Writing 'NAMESPACE'
  v Creating 'tools/'
  v Creating 'src/'
  v Creating 'src/stan_files/'
  v Creating 'src/stan_files/chunks/'
  v Creating 'inst/'
  v Creating 'inst/include/'
  Writing NAMESPACE
  Running "D:/RCompile/recent/R/bin/x64/Rcmd.exe" INSTALL \
    "D:/temp/RtmpCqrAxs/testPackage" \
    "--library=D:\temp\RtmpCqrAxs\devtools_install_1d9e0326028e8" --no-R \
    --no-data --no-help --no-demo --no-inst --no-docs --no-exec --no-multiarch \
    --no-test-load --preclean
  * installing *source* package 'testPackage' ...
  ** libs
  make[1]: Entering directory `/cygdrive/d/temp/RtmpCqrAxs/testPackage/src'
  make[1]: Leaving directory `/cygdrive/d/temp/RtmpCqrAxs/testPackage/src'
  make[1]: Entering directory `/cygdrive/d/temp/RtmpCqrAxs/testPackage/src'
  "D:/RCompile/recent/R/bin/x64/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/test.stan
  Wrote C++ file "stan_files/test.cc"
  d:/Compiler/gcc-4.9.3/mingw_64/bin/g++ -m64 -std=gnu++11 -I"D:/RCompile/recent/R/include" -DNDEBUG -I"../inst/include" -I"`"D:/RCompile/recent/R/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -I"`"D:/RCompile/recent/R/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'boost_not_in_BH', package = 'rstan'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_NO_CXX11_RVALUE_REFERENCES -I"D:/temp/RtmpEHGlAz/RLIBS_464453c52e/StanHeaders/include" -I"D:/temp/RtmpEHGlAz/RLIBS_464453c52e/rstan/include" -I"D:/temp/RtmpEHGlAz/RLIBS_464453c52e/BH/include" -I"D:/temp/RtmpEHGlAz/RLIBS_464453c52e/Rcpp/include" -I"D:/temp/RtmpEHGlAz/RLIBS_464453c52e/RcppEigen/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -UNDEBUG -Wall -pedantic -g -Og -c stan_files/test.cc -o stan_files/test.o
  In file included from D:/temp/RtmpEHGlAz/RLIBS_464453c52e/rstan/include/rstan/rstaninc.hpp:3:0,
                   from stan_files/test.hpp:18,
                   from stan_files/test.cc:3:
  D:/temp/RtmpEHGlAz/RLIBS_464453c52e/rstan/include/rstan/stan_fit.hpp:11:28: fatal error: stan/version.hpp: No such file or directory
   #include <stan/version.hpp>
                              ^
  compilation terminated.
  makerm stan_files/test.cc[1]: *** [stan_files/test.o] Error 1
  
  make[1]: Leaving directory `/cygdrive/d/temp/RtmpCqrAxs/testPackage/src'
  ERROR: compilation failed for package 'testPackage'
  * removing 'D:/temp/RtmpCqrAxs/devtools_install_1d9e0326028e8/testPackage'
  In R CMD INSTALL
  -- 1. Error: (unknown) (@test-rstan_package_skeleton.R#4)  ---------------------
  System command error
  1: rstan_package_skeleton(path = file.path(tempdir(), "testPackage"), stan_files = test_path("test.stan")) at testthat/test-rstan_package_skeleton.R:4
  2: suppressMessages(roxygen2::roxygenise(package.dir = DIR, clean = TRUE))
  3: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  4: roxygen2::roxygenise(package.dir = DIR, clean = TRUE)
  5: load_code(base_path)
  6: pkgload::load_all(path)
  7: pkgbuild::compile_dll(path, quiet = quiet)
  8: withr::with_makevars(compiler_flags(TRUE), assignment = "+=", {
         install_min(path, dest = install_dir, components = "libs", args = if (needs_clean(path)) 
             "--preclean", quiet = quiet)
     })
  9: with_envvar(c(R_MAKEVARS_USER = makevars_file), {
         set_makevars(new, path, makevars_file, assignment = assignment)
         force(code)
     })
  10: force(code)
  ...
  16: force(code)
  17: callr::rcmd_safe(..., env = env, spinner = FALSE)
  18: run_r(options)
  19: with(options, with_envvar(env, run(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout), 
         stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback, 
         stderr_callback = real_block_callback, echo_cmd = echo, echo = show, spinner = spinner, 
         error_on_status = fail_on_status, timeout = timeout)))
  20: with.default(options, with_envvar(env, run(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout), 
         stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback, 
         stderr_callback = real_block_callback, echo_cmd = echo, echo = show, spinner = spinner, 
         error_on_status = fail_on_status, timeout = timeout)))
  21: eval(substitute(expr), data, enclos = parent.frame())
  22: eval(substitute(expr), data, enclos = parent.frame())
  23: with_envvar(env, run(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout), 
         stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback, 
         stderr_callback = real_block_callback, echo_cmd = echo, echo = show, spinner = spinner, 
         error_on_status = fail_on_status, timeout = timeout))
  24: force(code)
  25: run(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout), stderr_line_callback = real_callback(stderr), 
         stdout_callback = real_block_callback, stderr_callback = real_block_callback, 
         echo_cmd = echo, echo = show, spinner = spinner, error_on_status = fail_on_status, 
         timeout = timeout)
  
  == testthat results  ===========================================================
  OK: 41 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test-rstan_package_skeleton.R#4) 
  
  Error: testthat unit tests failed
  Execution halted