Hadrian doesn't find a library installed with cabal v2-install in a testcase with reqlib
Summary
Hadrian doesn't run tests specifying reqlib(<package>)
if the <package>
was installed with cabal v2-install
or cabal-3 install
.
Steps to reproduce
I'm trying to create a test that needs the vector
libraray. I installed the library with
cabal install --with-compiler=./_build/stage1/bin/ghc --lib --allow-newer --package-db=./_build/stage1/lib/package.conf.d vector
Now I can do:
./_build/stage1/bin/ghc --interactive
import Data.Vector
So far everything works as expected. Now I created a test in one of the testsuite/test
subdirectories.
When I add the following line to all.T
the test runs and reports differences on the T16840.stderr
file:
test('T16840', normal, ghci_script, ['T16840.script'])
However with
test('T16840', reqlib('vector'), ghci_script, ['T16840.script'])
I get:
Unexpected passes:
/tmp/ghctest-kio706ev/test spaces/testsuite/tests/ghci.debugger/scripts/T16840.run T16840 [unexpected] (ghci)
/tmp/ghctest-kio706ev/test spaces/testsuite/tests/ghci.debugger/scripts/T16840.run T16840 [unexpected] (ghci-ext)
and no difference report for stderr
is generated.
A full testcase is available in https://gitlab.haskell.org/RolandSenn/ghc
branch T16840Hadrian
.
I run the test with: hadrian/build.sh test --flavour=devel2 --freeze1 -j2 --only=T16840 stage2:exe:ghc-bin
Expected behavior
Hadrian should run the test and report differences for the T16840.stderr
file.
Environment
- GHC version used: GHC HEAD (8.11.0.20200127)
Optional:
- Operating System: Linux (Debian 9)
- System Architecture: x64_86