Skip to content

Program coverage crashes in cabal new-test #4798

@jiaochangyang

Description

@jiaochangyang
Preprocessing test suite 'testsuite' for simple-server-0.1.0.0..
Building test suite 'testsuite' for simple-server-0.1.0.0..
Running 1 test suites...
Test suite testsuite: RUNNING...
Tests
  core unit tests
    testing storeInsert empty:                                     OK
    testing storeInsert when already in small:                     OK
    testing storeInsert when already in commit:                    OK
    testing storeInsert when data is in both:                      OK
    testing isSecondaryIndexed when in store:                      OK
    testing isSecondaryIndexed when not in store:                  OK
    testing secondaryLookup when not in secondary:                 OK
    testing secondaryLookup when in small:                         OK
    testing secondaryLookup when in commit:                        OK
    testing secondaryInsert when not in secondary:                 OK
    testing read (ReadAll) when not in store:                      OK
    testing read (lookup) when in small store:                     OK
    testing read (lookup) when in commit store:                    OK
    testing write successfully in small store:                     OK
    testing write unsuccessfully (duplicate) in small store:       OK
    testing write unsuccessfully (duplicate) in commit store:      OK
    testing write failure in store (somehow):                      OK
    testing write failure in secondary (already in store somehow): OK
    testing write failure in store (already in secondary somehow): OK

All 19 tests passed (0.00s)
Test suite testsuite: PASS
Test suite logged to:
/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/test/simple-server-0.1.0.0-testsuite.log
hpc: can not find simple-server-0.1.0.0-inplace/Data.API.Read in ./.hpc, /Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/simple-server-0.1.0.0, /Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/testsuite
CallStack (from HasCallStack):
  error, called at libraries/hpc/Trace/Hpc/Mix.hs:122:15 in hpc-0.6.0.3:Trace.Hpc.Mix
cabal: Tests failed for test:testsuite from simple-server-0.1.0.0.

@cartazio was looking through this with me and can reproduce the same issue

we are using ghc 8.2.1 and cabal new-build / new-test

cabal --version
cabal-install version 2.0.0.0
compiled using version 2.0.0.2 of the Cabal library

a verbose (-v3) output would be as follows

te testsuite: PASS
Test suite logged to:
/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/test/simple-server-0.1.0.0-testsuite.log
Environment: [("Apple_PubSub_Socket_Render","/private/tmp/com.apple.launchd.Q3JKpyPRfN/Render"),("COLORFGBG","7;0"),("COLORTERM","truecolor"),("HASKELL_DIST_DIR","/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite"),("HOME","/Users/cyj"),("ITERM_PROFILE","Default"),("ITERM_SESSION_ID","w0t2p0:F80CC278-087E-4137-B59D-639A0978E05D"),("LANG","en_US.UTF-8"),("LOGNAME","cyj"),("PATH","/Users/cyj/.ghc-installs/ghc-8.2.1-hq/bin:/Users/cyj/.cabal/bin:/Users/cyj/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/cyj/.cabal/bin:/Users/cyj/.cabal/bin"),("PWD","/Users/cyj/Documents/simple-server"),("SECURITYSESSIONID","186a6"),("SHELL","/bin/bash"),("SHLVL","1"),("SSH_AUTH_SOCK","/private/tmp/com.apple.launchd.AaBcIdWfTT/Listeners"),("TERM","xterm-256color"),("TERM_PROGRAM","iTerm.app"),("TERM_PROGRAM_VERSION","3.1.2"),("TERM_SESSION_ID","w0t2p0:F80CC278-087E-4137-B59D-639A0978E05D"),("TMPDIR","/var/folders/fp/_6rb74hd3j39xp_scrxxf4ww0000gn/T/"),("USER","cyj"),("XPC_FLAGS","0x0"),("XPC_SERVICE_NAME","0"),("__CF_USER_TEXT_ENCODING","0x1F5:0x0:0x0")]
/Users/cyj/.ghc-installs/ghc-8.2.1-hq/bin/hpc markup /Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/tix/testsuite/testsuite.tix '--destdir=/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/html/testsuite' '--hpcdir=/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/testsuite' '--hpcdir=/Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/simple-server-0.1.0.0' '--exclude=Main'
hpc: can not find simple-server-0.1.0.0-inplace/Data.API.Read in ./.hpc, /Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/simple-server-0.1.0.0, /Users/cyj/Documents/simple-server/dist-newstyle/build/x86_64-osx/ghc-8.2.1/simple-server-0.1.0.0/c/testsuite/hpc/vanilla/mix/testsuite
CallStack (from HasCallStack):
  error, called at libraries/hpc/Trace/Hpc/Mix.hs:122:15 in hpc-0.6.0.3:Trace.Hpc.Mix
/Users/cyj/.ghc-installs/ghc-8.2.1-hq/bin/hpc returned ExitFailure 1
packages definitely up to date: simple-server-0.1.0.0-inplace
packages previously probably up to date: simple-server-0.1.0.0-inplace, simple-server-0.1.0.0-inplace-simple-server-scotty, simple-server-0.1.0.0-inplace-simple-server-snap
packages now probably up to date: simple-server-0.1.0.0-inplace, simple-server-0.1.0.0-inplace-simple-server-scotty, simple-server-0.1.0.0-inplace-simple-server-snap
packages newly up to date:
packages out to date: simple-server-0.1.0.0-inplace-testsuite
packages invalid due to dep change: simple-server-0.1.0.0-inplace-testsuite
packages invalid due to build failure: simple-server-0.1.0.0-inplace-testsuite
CallStack (from HasCallStack):
  die', called at ./Distribution/Client/ProjectOrchestration.hs:782:8 in main:Distribution.Client.ProjectOrchestration
cabal: Tests failed for simple-server-0.1.0.0-inplace-testsuite.

we can make the simple application code available to any cabal maintainer privately (well, @cartazio will deal with that), but can't make it public at the moment, (its a pretty small project, but minimizing this failure would require more ideas about how cabal works than we do! :) )

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions