You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flag --test-keep-tix-files doesn't work with v2-test #6938
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
@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 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.
@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.
Activity
Mikolaj commentedon 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/tixafter running tests [edit: withcoverage: Truein cabal.project]. Do you mean the files should be there even when running without--coverage, but with--test-keep-tix-files?Mikolaj commentedon Aug 2, 2021
@gbaz: perhaps you remember the details?
awasthishubh commentedon Aug 2, 2021
@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-fileskeeps the tix filescabal v2-test all --test-keep-tix-filesdo not keeps themIt wasn't mention anywhere that I need to have
--coverageas well (v1 do not need this). If adding the--coveragekeeps the tix files, I guess it would have resolved my issue.Mikolaj commentedon 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.