Running 'build-tools.R'
  Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(pkgbuild)
  > 
  > test_check("pkgbuild")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  • is_windows() && !has_rtools() is TRUE (1)
  • is_windows() && !is.null(scan_path_for_rtools()) is not TRUE (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-build.r:18:3): binary builds return correct filenames ─────────
  file.exists(path) is not TRUE
  
  `actual`:       
  `expected`: TRUE
  ── Failure (test-build.r:22:3): can build package without src without compiler ──
  file.exists(path) is not TRUE
  
  `actual`:       
  `expected`: TRUE
  Backtrace:
      █
   1. ├─pkgbuild::without_compiler(...) test-build.r:22:2
   2. │ ├─pkgbuild::without_cache(...)
   3. │ └─withr::with_makevars(flags, code)
   4. │   ├─withr::with_envvar(...)
   5. │   │ └─base::force(code)
   6. │   └─base::force(code)
   7. └─testthat::expect_true(file.exists(path)) test-build.r:26:4
  ── Error (test-build.r:34:3): source builds return correct filenames ───────────
  Error: Could not find tools necessary to compile a package
  Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
  Backtrace:
      █
   1. └─pkgbuild::build(...) test-build.r:34:2
   2.   └─pkgbuild:::build_setup(...)
   3.     └─pkgbuild:::build_setup_source(...)
   4.       └─pkgbuild::check_build_tools(quiet = TRUE)
  ── Failure (test-build.r:59:3): package tarball binary build ───────────────────
  file.exists(path2) is not TRUE
  
  `actual`:       
  `expected`: TRUE
  ── Error (test-build.r:60:3): package tarball binary build ─────────────────────
  Error: missing value where TRUE/FALSE needed
  Backtrace:
      █
   1. ├─testthat::expect_false(is.na(desc::desc(path2)$get("Packaged"))) test-build.r:60:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─desc::desc(path2)
   5.   └─description$new(cmd, file, text, package)
   6.     └─desc:::initialize(...)
   7.       └─desc:::idesc_create(self, private, cmd, file, text, package)
  ── Failure (test-build_tools.R:4:3): tests always run in environment with dev tools ──
  has_build_tools() is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  Backtrace:
      █
   1. ├─pkgbuild::without_cache(...) test-build_tools.R:4:2
   2. └─testthat::expect_true(has_build_tools()) test-build_tools.R:5:4
  ── Failure (test-build_tools.R:4:3): tests always run in environment with dev tools ──
  has_rtools() not equal to is_windows().
  1 element mismatch
  Backtrace:
      █
   1. ├─pkgbuild::without_cache(...) test-build_tools.R:4:2
   2. └─testthat::expect_equal(has_rtools(), is_windows()) test-build_tools.R:6:4
  ── Failure (test-compile_dll.R:4:3): can compile a DLL and clean up afterwards ──
  `compile_dll("testWithSrc", quiet = TRUE, register_routines = FALSE)` threw an error.
  Message: Could not find tools necessary to compile a package
  Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-compile_dll.R:4:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─pkgbuild::compile_dll("testWithSrc", quiet = TRUE, register_routines = FALSE)
   7.   └─pkgbuild::check_build_tools(quiet = TRUE)
  
  [ FAIL 8 | WARN 0 | SKIP 4 | PASS 46 ]
  Error: Test failures
  Execution halted