Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
awasthishubh opened this issue Jul 3, 2020 · 4 comments
Closed

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

awasthishubh opened this issue Jul 3, 2020 · 4 comments

Comments

@awasthishubh
Copy link

awasthishubh commented Jul 3, 2020

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

@Mikolaj
Copy link
Member

Mikolaj commented Jul 29, 2021

@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?

@Mikolaj
Copy link
Member

Mikolaj commented Aug 2, 2021

@gbaz: perhaps you remember the details?

@awasthishubh
Copy link
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.

@Mikolaj
Copy link
Member

Mikolaj commented Aug 2, 2021

@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
Projects
None yet
Development

No branches or pull requests

4 participants