Running 'testthat.R' [202s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(jlmerclusterperm)
  > 
  > test_check("jlmerclusterperm")
  Julia Version 1.8.5
  Commit 17cfb8e65e (2023-01-08 06:45 UTC)
  Platform Info:
    OS: Windows (x86_64-w64-mingw32)
    CPU: 48 × AMD EPYC 7443 24-Core Processor                
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
    Threads: 1 on 96 virtual cores
  nothing
  ℹ Starting Julia with 2 threads
  ✔ Starting Julia with 2 threads [5.3s]
  
  ℹ Activating package environment
  ✖ Activating package environment [18.5s]
  
  i Starting Julia with 2 threads
  v Starting Julia with 2 threads [5.3s]
  
  i Activating package environment
  Precompiling project...
    ✗ GLM
    ✓ MathOptInterface
    ✓ NLopt
    ✗ MixedModels
    ✗ JlmerClusterPerm
    2 dependencies successfully precompiled in 138 seconds. 103 already precompiled.
    4 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages
  v Activating package environment [2m 22.5s]
  
  i Running package setup scripts (1/11)
  x Failed to compile jlmerclusterperm. Please submit an issue to <https://github.com/yjunechoe/jlmerclusterperm/issues>.
  i Running package setup scripts (1/11)
  x Running package setup scripts (6/11) [2.2s]
  
  Starting Julia ...
  ✖ Failed to compile jlmerclusterperm. Please submit an issue to <https://github.com/yjunechoe/jlmerclusterperm/issues>.
  [ FAIL 5 | WARN 0 | SKIP 7 | PASS 5 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (7): 'test-jlmer.R:1:1', 'test-julia_rng.R:1:1',
    'test-permute.R:1:1', 'test-progress.R:1:1', 'test-singularity.R:1:1',
    'test-threshold_search.R:1:1', 'test-timewise_statistics.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-aaa-a-logging.R:7:1'): (code run outside of `test_that()`) ─────
  Error: Evaluation in Julia failed.
  Original Julia error message:
  LoadError: Error when installing package Distributions:
  IOError: rm("C:\\Users\\CRAN\\.julia\\packages\\Distributions\\tQhJE\\test\\ref"): directory not empty (ENOTEMPTY)
  Stacktrace:
   [1] uv_error
     @ .\libuv.jl:97 [inlined]
   [2] rm(path::String; force::Bool, recursive::Bool)
     @ Base.Filesystem .\file.jl:306
   [3] rm(path::String; force::Bool, recursive::Bool) (repeats 2 times)
     @ Base.Filesystem .\file.jl:294
   [4] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
     @ Base.Filesystem .\file.jl:330
   [5] #mv#15
     @ .\file.jl:425 [inlined]
   [6] install_archive(urls::Vector{Pair{String, Bool}}, hash::Base.SHA1, version_path::String; io::Base.DevNull)
     @ Pkg.Operations C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:563
   [7] macro expansion
     @ C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:761 [inlined]
   [8] (::Pkg.Operations.var"#46#51"{Bool, Pkg.Types.Context, Tuple{SubString{String}, Dict{Base.UUID, Base.SHA1}}, Channel{Any}, Channel{NamedTuple{(:pkg, :urls, :path), Tuple{Pkg.Types.PackageEntry, Set{String}, String}}}})()
     @ Pkg.Operations .\task.jl:484
  Stacktrace:
    [1] pkgerror(::String, ::Vararg{String})
      @ Pkg.Types C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Types.jl:67
    [2] macro expansion
      @ C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:783 [inlined]
    [3] macro expansion
      @ .\task.jl:454 [inlined]
    [4] download_source(ctx::Pkg.Types.Context; readonly::Bool)
      @ Pkg.Operations C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:724
    [5] download_source
      @ C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:700 [inlined]
    [6] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
      @ Pkg.Operations C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:1300
    [7] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; shared::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.DevNull, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.DevNull}}})
      @ Pkg.API C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:222
    [8] develop(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.DevNull, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Pkg.API C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:156
    [9] #develop#14
      @ C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:143 [inlined]
   [10] develop(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::String, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Base.DevNull, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.DevNull}}})
      @ Pkg.API C:\PROGRA~1\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:173
   [11] top-level scope
      @ string:1
   [12] eval
      @ .\boot.jl:368 [inlined]
   [13] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base .\loading.jl:1428
   [14] include_string (repeats 2 times)
      @ .\loading.jl:1438 [inlined]
   [15] mainevalcmd(str::String)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:150
   [16] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Base .\essentials.jl:729
   [17] invokelatest(::Any, ::Any, ::Vararg{Any})
      @ Base .\essentials.jl:726
   [18] evaluate!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:67
   [19] evaluate_checked!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:55
   [20] serve_repl(sock::Sockets.TCPSocket)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\communicating.jl:185
   [21] (::Main.RConnector.var"#3#5")()
      @ Main.RConnector .\task.jl:484
  in expression starting at string:1
  Backtrace:
      ▆
   1. └─jlmerclusterperm:::set_projenv(cache_dir = tempdir(), verbose = TRUE) at test-aaa-a-logging.R:7:1
   2.   └─JuliaConnectoR::juliaEval("Pkg.develop(path = \"JlmerClusterPerm\", io = devnull)")
   3.     └─JuliaConnectoR::juliaCall("RConnector.mainevalcmd", expr)
   4.       ├─base::tryCatch(...)
   5.       │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6.       │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7.       │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   8.       └─JuliaConnectoR:::doCallJulia(funName, jlargs)
   9.         └─JuliaConnectoR:::handleCallbacksAndOutput()
  ── Error ('test-aaa-b-setup.R:7:3'): Setup with seed works (use 2 for testing) ──
  Error: Evaluation in Julia failed.
  Original Julia error message:
  LoadError: ArgumentError: Package Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] is required but does not seem to be installed:
   - Run `Pkg.instantiate()` to install all recorded dependencies.
  
  Stacktrace:
    [1] _require(pkg::Base.PkgId)
      @ Base .\loading.jl:1306
    [2] _require_prelocked(uuidkey::Base.PkgId)
      @ Base .\loading.jl:1200
    [3] macro expansion
      @ .\loading.jl:1180 [inlined]
    [4] macro expansion
      @ .\lock.jl:223 [inlined]
    [5] require(into::Module, mod::Symbol)
      @ Base .\loading.jl:1144
    [6] eval
      @ .\boot.jl:368 [inlined]
    [7] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base .\loading.jl:1428
    [8] include_string (repeats 2 times)
      @ .\loading.jl:1438 [inlined]
    [9] mainevalcmd(str::String)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:150
   [10] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Base .\essentials.jl:729
   [11] invokelatest(::Any, ::Any, ::Vararg{Any})
      @ Base .\essentials.jl:726
   [12] evaluate!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:67
   [13] evaluate_checked!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:55
   [14] serve_repl(sock::Sockets.TCPSocket)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\communicating.jl:185
   [15] (::Main.RConnector.var"#3#5")()
      @ Main.RConnector .\task.jl:484
  in expression starting at string:1
  Backtrace:
       ▆
    1. ├─testthat::expect_true(...) at test-aaa-b-setup.R:7:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─jlmerclusterperm::jlmerclusterperm_setup(...)
    5.   └─jlmerclusterperm:::setup_with_progress(...)
    6.     ├─base::withCallingHandlers(...)
    7.     └─jlmerclusterperm:::source_jl(verbose = verbose)
    8.       └─JuliaConnectoR::juliaEval(jl_pkgs[i])
    9.         └─JuliaConnectoR::juliaCall("RConnector.mainevalcmd", expr)
   10.           ├─base::tryCatch(...)
   11.           │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   12.           │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   13.           │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   14.           └─JuliaConnectoR:::doCallJulia(funName, jlargs)
   15.             └─JuliaConnectoR:::handleCallbacksAndOutput()
  ── Failure ('test-aaa-b-setup.R:13:3'): RNG initializes to seed=1 counter=0 ────
  get_rng_seed() (`actual`) not equal to 1 (`expected`).
  
  `actual` is NULL
  `expected` is a double vector (1)
  ── Error ('test-aaa-b-setup.R:14:3'): RNG initializes to seed=1 counter=0 ──────
  Error: Evaluation in Julia failed.
  Original Julia error message:
  LoadError: UndefVarError: rng not defined
  Stacktrace:
    [1] top-level scope
      @ string:1
    [2] eval
      @ .\boot.jl:368 [inlined]
    [3] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base .\loading.jl:1428
    [4] include_string (repeats 2 times)
      @ .\loading.jl:1438 [inlined]
    [5] mainevalcmd(str::String)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:150
    [6] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Base .\essentials.jl:729
    [7] invokelatest(::Any, ::Any, ::Vararg{Any})
      @ Base .\essentials.jl:726
    [8] evaluate!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:67
    [9] evaluate_checked!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:55
   [10] serve_repl(sock::Sockets.TCPSocket)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\communicating.jl:185
   [11] serve(port_hint::Int64; multiclient::Bool, portfile::String)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\communicating.jl:152
   [12] top-level scope
      @ D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\main.jl:23
   [13] include(mod::Module, _path::String)
      @ Base .\Base.jl:419
   [14] exec_options(opts::Base.JLOptions)
      @ Base .\client.jl:303
   [15] _start()
      @ Base .\client.jl:522
  in expression starting at string:1
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(get_rng_state(), 0) at test-aaa-b-setup.R:14:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─jlmerclusterperm::get_rng_state()
    5.   └─JuliaConnectoR::juliaEval("Int(rng.ctr1)")
    6.     └─JuliaConnectoR::juliaCall("RConnector.mainevalcmd", expr)
    7.       ├─base::tryCatch(...)
    8.       │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.       │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.       │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   11.       └─JuliaConnectoR:::doCallJulia(funName, jlargs)
   12.         └─JuliaConnectoR:::handleCallbacksAndOutput()
  ── Error ('test-clusterpermute.R:3:1'): (code run outside of `test_that()`) ────
  Error: Evaluation in Julia failed.
  Original Julia error message:
  LoadError: ArgumentError: Package Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] is required but does not seem to be installed:
   - Run `Pkg.instantiate()` to install all recorded dependencies.
  
  Stacktrace:
    [1] _require(pkg::Base.PkgId)
      @ Base .\loading.jl:1306
    [2] _require_prelocked(uuidkey::Base.PkgId)
      @ Base .\loading.jl:1200
    [3] macro expansion
      @ .\loading.jl:1180 [inlined]
    [4] macro expansion
      @ .\lock.jl:223 [inlined]
    [5] require(into::Module, mod::Symbol)
      @ Base .\loading.jl:1144
    [6] eval
      @ .\boot.jl:368 [inlined]
    [7] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base .\loading.jl:1428
    [8] include_string (repeats 2 times)
      @ .\loading.jl:1438 [inlined]
    [9] mainevalcmd(str::String)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:150
   [10] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Base .\essentials.jl:729
   [11] invokelatest(::Any, ::Any, ::Vararg{Any})
      @ Base .\essentials.jl:726
   [12] evaluate!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:67
   [13] evaluate_checked!(call::Main.RConnector.Call, communicator::Main.RConnector.CommunicatoR{Sockets.TCPSocket})
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\evaluating.jl:55
   [14] serve_repl(sock::Sockets.TCPSocket)
      @ Main.RConnector D:\RCompile\CRANpkg\lib\4.5\JuliaConnectoR\Julia\communicating.jl:185
   [15] (::Main.RConnector.var"#3#5")()
      @ Main.RConnector .\task.jl:484
  in expression starting at string:1
  Backtrace:
       ▆
    1. └─jlmerclusterperm::jlmerclusterperm_setup(...) at test-clusterpermute.R:3:1
    2.   └─jlmerclusterperm:::setup_with_progress(...)
    3.     ├─base::withCallingHandlers(...)
    4.     └─jlmerclusterperm:::source_jl(verbose = verbose)
    5.       └─JuliaConnectoR::juliaEval(jl_pkgs[i])
    6.         └─JuliaConnectoR::juliaCall("RConnector.mainevalcmd", expr)
    7.           ├─base::tryCatch(...)
    8.           │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.           │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.           │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   11.           └─JuliaConnectoR:::doCallJulia(funName, jlargs)
   12.             └─JuliaConnectoR:::handleCallbacksAndOutput()
  
  [ FAIL 5 | WARN 0 | SKIP 7 | PASS 5 ]
  Error: Test failures
  Execution halted