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

cabal test does no longer direct stdout to log file? #9809

Open
jwaldmann opened this issue Mar 14, 2024 · 2 comments
Open

cabal test does no longer direct stdout to log file? #9809

jwaldmann opened this issue Mar 14, 2024 · 2 comments

Comments

@jwaldmann
Copy link

Describe the bug

cabal test used to redirect stdout to the log file, but no longer does this?

To Reproduce

$ cabal unpack ersatz-0.5
$ cd ersatz-0.5
$ cabal test hunit

Expected behavior

with cabal-install version 3.10.2.1 , output is

...
Running 1 test suites...
Test suite hunit: RUNNING...
Test suite hunit: PASS
Test suite logged to:
/home/waldmann/tmp/ersatz-0.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ersatz-0.5/t/hunit/test/ersatz-0.5-hunit.log
1 of 1 test suites (1 of 1 test cases) passed.

and the log file contains actual test output.

Observed behaviour

with cabal-install version 3.11.0.0, output is

...
Running 1 test suites...
Test suite hunit: RUNNING...
unit tests:
  unconstrained literals: [OK]

         Test Cases  Total 
 Passed  1           1     
 Failed  0           0     
 Total   1           1     
Test suite hunit: PASS
Test suite logged to:
/home/waldmann/tmp/ersatz-0.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ersatz-0.5/t/hunit/test/ersatz-0.5-hunit.log
1 of 1 test suites (1 of 1 test cases) passed.

and the mentioned log file contains only

Test suite hunit: RUNNING...
Test suite hunit: PASS
Test suite logged to: /home/waldmann/tmp/ersatz-0.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/ersatz-0.5/t/hunit/test/ersatz-0.5-hunit.log

and NOT the actual test output.

System information

Fedora GNU/Linux 6.7.6-200.fc39.x86_64, ghc-9.8.2, cabal-install built from source at

commit b75671b0bb163a52a00df403eaf5d545121a27a3 (HEAD -> 3.12, origin/3.12)
Merge: 880831f97 698339c07
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Mar 11 15:06:57 2024 +0000
@alt-romes
Copy link
Collaborator

alt-romes commented Mar 18, 2024

This was most likely introduced by me in #9524, it is very similar to the same change it introduced cabal build (#9607).

If that is the case, it should be very straightforward to fix.

@alt-romes
Copy link
Collaborator

I had mentioned the wrong PR that fixed this same issue for build, it should be: #9607

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

2 participants