Skip to content

allocation tests fail with coverage=true after dfe6a13e5038c8cbe0f1720d190629225ec1a19b #57220

Open
@lmiq

Description

@lmiq

See discussion at: https://discourse.julialang.org/t/tests-fail-on-ci-pass-locally/125140/11

After this commit, allocation tests in packages started failing on CI runs because, with Pkg.test(;coverage=true), allocations appear where with coverage=false they do not.

My simple example of such behavior (used to bisect the commit is):

import Pkg
Pkg.add(url="https://github.com/lmiq/MeuNovoPacote.jl")
Pkg.test("MeuNovoPacote"; coverage=true)

This implied that CI tests that passed until v1.11.2 started failing on v1.11.3 and later versions.

The actual test that is being run in that package is:

using PDBTools
using BenchmarkTools
atoms = read_pdb(PDBTools.TESTPDB, "protein")
a = @benchmark sum($mass, $atoms) samples=1 evals=1
@test a.allocs == 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions