(MyPkg) pkg> test
Testing MyPkg
Status `/tmp/jl_SGBb6L/Project.toml`
[ab5201b8] MyPkg v1.0.0 `~/repos/MyPkg.jl`
[8dfed614] Test v1.11.0
Status `/tmp/jl_SGBb6L/Manifest.toml`
[ab5201b8] MyPkg v1.0.0 `~/repos/MyPkg.jl`
[2a0f44e3] Base64 v1.11.0
[b77e0a4c] InteractiveUtils v1.11.0
[56ddb016] Logging v1.11.0
[d6f4376e] Markdown v1.11.0
[9a3f8284] Random v1.11.0
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization v1.11.0
[8dfed614] Test v1.11.0
Testing Running tests...
ERROR: julia: -t,--threads=<n>[,auto|<m>]; n must be an integer >= 1
ERROR: Package MyPkg errored during testing
Project.toml:
name = "MyPkg"
uuid = "e1850440-3ef3-40f4-a083-5ede0cc67044"
authors = ["---"]
version = "1.0.0"
[weakdeps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[compat]
Test = "1"
[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[targets]
test = ["Test"]
I’ve tried these two commands, and from the cmd line the tests run and pass:
I’m running julia on vscode with 4 threads, apparently, no idea if that’s the default or some accidental config on my side.
julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 40 × Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, skylake-avx512)
Threads: 4 default, 0 interactive, 2 GC (on 40 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 0
JULIA_PKG_USE_CLI_GIT = true
This post might be helpful. It looks like you may need to specify the number of threads in the VSCode settings for Julia.
Update
Click on the gearbox icon in the bottom left hand corner. Select Settings from the menu. Select Julia from the Extensions drop down menu. In the field Julia: Additional Args, click on Edit in settings.json" .
Ok solved thank you. Interestingly, the julia.NumThreads line that I have to add for this to work is not used. It appears it that it’s used to set the JULIA_NUM_THREADS env variable, but I set it to 5 but I’m still running 4 threads.
Anyway don’t care, I can run tests from vscode now.
vscode is really good when it works, but it feels like it’s so complex that the configs break often.
I have had generally good experience, but I realize things might break on different systems. I wonder whether it would be worth reporting the problem on GitHub and providing your system and version info.