Skip to content

Flag --test-keep-tix-files doesn't work with v2-test #6938

Closed

Description

@awasthishubh

Description
Command cabal v2-test all --test-keep-tix-files is supposed to keep the tix file that must be generated while running tests. This file is helpful in determining code-coverage using hpc.
cabal v1-test --keep-tix-files works fine but I am working on updating Hackage Builder to use cabal v2 as a part of my GSoC project.

Steps to reproduce the behaviour:

# Download and extract tarball of the package
cd "loc_to_pkg"
cabal v2-test all --test-keep-tix-files`

Expected behaviour
A test-pkg.tix is expected to be present somewhere inside the package directory.
Instead, I was only able to find an empty folder at dist-newstyle/build/x86_64-linux/ghc-8.6.5/async-2.2.2/t/test-async/hpc/vanilla/tix/test-async

System information

  • Operating system: Ubuntu 20.04
  • Cabal: 3.2.0.0
  • GHC: 8.6.5

Additional context
I tested with pkg: async-2.2.2

Activity

  1. Mikolaj commented on Jul 29, 2021

    @Mikolaj
    Member

    @awasthishubh: I'm unclear how to reproduce. I definitely see .tix files at cabal-testsuite/PackageTests/Regression/T5213/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-gh5213-0.1/t/tests/hpc/vanilla/tix after running tests [edit: with coverage: True in cabal.project]. Do you mean the files should be there even when running without --coverage, but with --test-keep-tix-files?

  2. Mikolaj commented on Aug 2, 2021

    @Mikolaj
    Member

    @gbaz: perhaps you remember the details?

  3. awasthishubh commented on Aug 2, 2021

    @awasthishubh
    Author

    @Mikolaj I am sorry but I do not remember exact details anymore. As far as I remember, I wanted to have the tix files which was working with cabal v1 but not with cabal v2.

    cabal v1-test --keep-tix-files keeps the tix files
    cabal v2-test all --test-keep-tix-files do not keeps them

    It wasn't mention anywhere that I need to have --coverage as well (v1 do not need this). If adding the --coverage keeps the tix files, I guess it would have resolved my issue.

  4. Mikolaj commented on Aug 2, 2021

    @Mikolaj
    Member

    @awasthishubh: thank you. In that case, I will close the issue and if it turns out Hackage needs .tix file generated without .mix files or whatever the precise requirement may be, this can be reopened, with extra details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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