Running ‘testthat.R’ [16s/56s]
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
  ✔ Creating 'R/'
  ✔ Creating 'man/'
  ✔ Writing 'DESCRIPTION'
  ✔ Writing 'NAMESPACE'
  ✔ Creating 'tools/'
  ✔ Creating 'src/'
  ✔ Creating 'src/stan_files/'
  ✔ Creating 'src/stan_files/chunks/'
  ✔ Creating 'inst/'
  ✔ Creating 'inst/include/'
  Writing NAMESPACE
  Running /home/ripley/R/cc/bin/R CMD INSTALL /tmp/RtmpdBaWXe/testPackage \
    '--library=/tmp/RtmpdBaWXe/devtools_install_98e17cb4124' --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
  CC -library=stlport4 -I"/home/ripley/R/cc/include" -DNDEBUG -I"../inst/include" -I"`"/home/ripley/R/cc/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error -I"/tmp/Rtmp1yaWI1/RLIBS_6b165f8bf41/StanHeaders/include" -I"/tmp/Rtmp1yaWI1/RLIBS_6b165f8bf41/rstan/include" -I"/tmp/Rtmp1yaWI1/RLIBS_6b165f8bf41/BH/include" -I"/tmp/Rtmp1yaWI1/RLIBS_6b165f8bf41/Rcpp/include" -I"/tmp/Rtmp1yaWI1/RLIBS_6b165f8bf41/RcppEigen/include" -I/usr/local/include   -KPIC  -O -xlibmil -xtarget=native -nofstore  -c init.cpp -o init.o
  CC -library=stlport4 -G -L/usr/local/lib -o testPackage.so init.o
  installing to /tmp/RtmpdBaWXe/devtools_install_98e17cb4124/testPackage/libs
  * DONE (testPackage)
  ── 1. Error: (unknown) (@test-rstan_package_skeleton.R#4)  ─────────────────────
  object 'm' not found
  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: run_ns_load_actions(package)
  8: action(nsenv)
  9: loadModule(module = m, what = TRUE, env = ns, loadNow = TRUE)
  10: is(module, "character")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 43 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test-rstan_package_skeleton.R#4) 
  
  Error: testthat unit tests failed
  Execution halted