Skip to content

Test coverage for package whose test suite is in another package. #5713

@NorfairKing

Description

@NorfairKing

General summary/comments (optional)

Coverage reports are broken when you use a test suite in one package to test another that doesn't have a test suite.

Steps to reproduce

  1. Make package foobar with code in a library foobar:lib:foobar.
  2. Make package foobar-gen with generators and testutils in a library foobar-gen:lib:foobar-gen
  3. Make test suite foobar-gen:test:foobar-test to test foobar using the generators in foobar-gen.

Run stack test foobar foobar-gen --coverage. Find that there is no coverage report for any code in foobar.

Expected

Coverage report for both foobar and foobar-gen

Actual

No coverage report for foobar.

Stack version

$ stack --version
2.7.3 x86_64 hpack-0.34.6

Method of installation

  • Nixpkgs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions