Missing coverage data

I’m having trouble with figuring out why I’m not getting coverage data on a package I’m trying to get ready for submission to the General registry.

This is what I’m doing:

% git clone https://github.com/JuliaQuantumControl/QuantumGradientGenerators.jl.git
% cd QuantumGradientGenerators.jl
% julia --project=test
julia> using Pkg
julia> Pkg.Registry.add(Pkg.RegistrySpec("General"))
julia> Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaQuantumControl/QuantumControlRegistry.git"))
julia> Pkg.develop(path=".")
julia> Pkg.instantiate()
julia> exit()
% julia --project=test --code-coverage=user
julia> include("test/runtests.jl")

This gives me .cov files in the test subdirectory, but no .cov files in the src directory. My initial thought was that I hadn’t properly dev-installed the package, but the test/Manifest.toml file seems to confirm that the QuantumGradientGenerators is indeed running from the current working directory.

I have other packages with basically the same setup that generate .cov data without any problems, and I can’t figure what’s getting in the way of generating the coverage data here.

Does anybody have any ideas?

My versioninfo is

julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, westmere)
  Threads: 1 on 10 virtual cores

Never mind, I was just being stupid :man_facepalming: The new package is refactored from another existing package (which is still a dependency of the new package). Of course, since I blindly copied the tests from the old package, all the routines I’m testing were still being imported from the old package, and no code from the new package was being run. Fixed now.

1 Like