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

Test suite failure #10

Closed
bergmark opened this issue Sep 26, 2017 · 6 comments
Closed

Test suite failure #10

bergmark opened this issue Sep 26, 2017 · 6 comments

Comments

@bergmark
Copy link

bergmark commented Sep 26, 2017

From stackage nightly build

Building test suite 'doctests' for linear-accelerate-0.5..

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Build_doctests
[1 of 2] Compiling Build_doctests   ( dist/build/doctests/autogen/Build_doctests.hs, dist/build/doctests/doctests-tmp/Build_doctests.o )
[2 of 2] Compiling Main             ( tests/doctests.hs, dist/build/doctests/doctests-tmp/Main.o )

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Build_doctests
Linking dist/build/doctests/doctests ...
> /tmp/stackage-build14/linear-accelerate-0.5$ dist/build/doctests/doctests
### Failure in /tmp/stackage-build14/linear-accelerate-0.5/src/Data/Array/Accelerate/Linear/Matrix.hs:160: expression `identity :: Exp (M44 Int)'
expected: "let x0 = 1 in"
          "let x1 = 0"
          "in ((x0,x1,x1,x1),(x1,x0,x1,x1),(x1,x1,x0,x1),(x1,x1,x1,x0))"
 but got: "\ESC[33mlet\ESC[0m x0 = 1 \ESC[33min\ESC[0m"
          "\ESC[33mlet\ESC[0m x1 = 0"
          "\ESC[33min\ESC[0m ((x0,x1,x1,x1),(x1,x0,x1,x1),(x1,x1,x0,x1),(x1,x1,x1,x0))"
Examples: 36  Tried: 35  Errors: 0  Failures: 1
bergmark added a commit to commercialhaskell/stackage that referenced this issue Sep 26, 2017
@RyanGlScott
Copy link
Collaborator

Odd, the tests appear to be working for me locally, both via cabal and stack (example). How are you running the tests? FWIW, the output appears to be the same modulo some odd escape characters.

@bergmark
Copy link
Author

bergmark commented Sep 26, 2017

the stackage server doesn't use either, here's the full command+output:

> /tmp/stackage-build14/linear-accelerate-0.5$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb -hide-all-packages -package=Cabal -package=base -package=cabal-doctest Setup
[1 of 1] Compiling Main             ( Setup.lhs, Setup.o )
Linking Setup ...
> /tmp/stackage-build14/linear-accelerate-0.5$ ./Setup configure --enable-tests --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/linear-accelerate-0.5 --htmldir=/var/stackage/work/builds/nightly/doc/linear-accelerate-0.5 --haddockdir=/var/stackage/work/builds/nightly/doc/linear-accelerate-0.5 --flags=
Configuring linear-accelerate-0.5...
> /tmp/stackage-build14/linear-accelerate-0.5$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb -hide-all-packages -package=Cabal -package=base -package=cabal-doctest Setup
> /tmp/stackage-build14/linear-accelerate-0.5$ ./Setup build
Preprocessing library for linear-accelerate-0.5..
Building library for linear-accelerate-0.5..
[ 1 of 14] Compiling Data.Array.Accelerate.Linear.Epsilon ( src/Data/Array/Accelerate/Linear/Epsilon.hs, dist/build/Data/Array/Accelerate/Linear/Epsilon.o )
[ 2 of 14] Compiling Data.Array.Accelerate.Linear.Type ( src/Data/Array/Accelerate/Linear/Type.hs, dist/build/Data/Array/Accelerate/Linear/Type.o )
[ 3 of 14] Compiling Data.Array.Accelerate.Linear.Lift ( src/Data/Array/Accelerate/Linear/Lift.hs, dist/build/Data/Array/Accelerate/Linear/Lift.o )
[ 4 of 14] Compiling Data.Array.Accelerate.Linear.Vector ( src/Data/Array/Accelerate/Linear/Vector.hs, dist/build/Data/Array/Accelerate/Linear/Vector.o )
[ 5 of 14] Compiling Data.Array.Accelerate.Linear.Metric ( src/Data/Array/Accelerate/Linear/Metric.hs, dist/build/Data/Array/Accelerate/Linear/Metric.o )
[ 6 of 14] Compiling Data.Array.Accelerate.Linear.V1 ( src/Data/Array/Accelerate/Linear/V1.hs, dist/build/Data/Array/Accelerate/Linear/V1.o )
[ 7 of 14] Compiling Data.Array.Accelerate.Linear.V2 ( src/Data/Array/Accelerate/Linear/V2.hs, dist/build/Data/Array/Accelerate/Linear/V2.o )
[ 8 of 14] Compiling Data.Array.Accelerate.Linear.V3 ( src/Data/Array/Accelerate/Linear/V3.hs, dist/build/Data/Array/Accelerate/Linear/V3.o )
[ 9 of 14] Compiling Data.Array.Accelerate.Linear.V4 ( src/Data/Array/Accelerate/Linear/V4.hs, dist/build/Data/Array/Accelerate/Linear/V
[10 of 14] Compiling Data.Array.Accelerate.Linear.V0 ( src/Data/Array/Accelerate/Linear/V0.hs, dist/build/Data/Array/Accelerate/Linear/V0.o )
[11 of 14] Compiling Data.Array.Accelerate.Linear.Quaternion ( src/Data/Array/Accelerate/Linear/Quaternion.hs, dist/build/Data/Array/Accelerate/Linear/Quaternion.o )
[12 of 14] Compiling Data.Array.Accelerate.Linear.Plucker ( src/Data/Array/Accelerate/Linear/Plucker.hs, dist/build/Data/Array/Accelerate/Linear/Plucker.o )
[13 of 14] Compiling Data.Array.Accelerate.Linear.Matrix ( src/Data/Array/Accelerate/Linear/Matrix.hs, dist/build/Data/Array/Accelerate/Linear/Matrix.o )
[14 of 14] Compiling Data.Array.Accelerate.Linear ( src/Data/Array/Accelerate/Linear.hs, dist/build/Data/Array/Accelerate/Linear.o )
Preprocessing test suite 'doctests' for linear-accelerate-0.5..
Building test suite 'doctests' for linear-accelerate-0.5..

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Build_doctests
[1 of 2] Compiling Build_doctests   ( dist/build/doctests/autogen/Build_doctests.hs, dist/build/doctests/doctests-tmp/Build_doctests.o )
[2 of 2] Compiling Main             ( tests/doctests.hs, dist/build/doctests/doctests-tmp/Main.o )

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules: Build_doctests
Linking dist/build/doctests/doctests ...
> /tmp/stackage-build14/linear-accelerate-0.5$ dist/build/doctests/doctests
### Failure in /tmp/stackage-build14/linear-accelerate-0.5/src/Data/Array/Accelerate/Linear/Matrix.hs:160: expression `identity :: Exp (M44 Int)'
expected: "let x0 = 1 in"
          "let x1 = 0"
          "in ((x0,x1,x1,x1),(x1,x0,x1,x1),(x1,x1,x0,x1),(x1,x1,x1,x0))"
 but got: "\ESC[33mlet\ESC[0m x0 = 1 \ESC[33min\ESC[0m"
          "\ESC[33mlet\ESC[0m x1 = 0"
          "\ESC[33min\ESC[0m ((x0,x1,x1,x1),(x1,x0,x1,x1),(x1,x1,x0,x1),(x1,x1,x1,x0))"
Examples: 36  Tried: 35  Errors: 0  Failures: 1
-i
-i/tmp/stackage-build14/linear-accelerate-0.5/dist/build/autogen
-i/tmp/stackage-build14/linear-accelerate-0.5/dist/build
-i/tmp/stackage-build14/linear-accelerate-0.5/src
-hide-all-packages
-no-user-package-db
-package-db=/var/stackage/work/builds/nightly/pkgdb
-package-db=dist/package.conf.inplace
-optP-include
-optPdist/build/autogen/cabal_macros.h
-package-id=base-4.10.0.0
-package-id=accelerate-1.1.1.0-Jlnu03oOkl45RDwukapER8
-package-id=distributive-0.5.3-2UPyphlyT297nR2Ta64OkA
-package-id=lens-4.15.4-9nqBRPiZXNvCeZCsneO73P
-package-id=linear-1.20.7-8j8Fzr6VhEm585BJLbOBDE
-package-id=doctest-0.11.4-r40kwYfPpaHYzt5MnxLn1
-package=linear-accelerate-0.5
Data.Array.Accelerate.Linear
Data.Array.Accelerate.Linear.Epsilon
Data.Array.Accelerate.Linear.Matrix
Data.Array.Accelerate.Linear.Metric
Data.Array.Accelerate.Linear.Plucker
Data.Array.Accelerate.Linear.Quaternion
Data.Array.Accelerate.Linear.Type
Data.Array.Accelerate.Linear.V0
Data.Array.Accelerate.Linear.V1
Data.Array.Accelerate.Linear.V2
Data.Array.Accelerate.Linear.V3
Data.Array.Accelerate.Linear.V4
Data.Array.Accelerate.Linear.Vector
Data.Array.Accelerate.Linear.Lift

@bergmark
Copy link
Author

Feel free to close this if it's too obscure!

@RyanGlScott
Copy link
Collaborator

Never mind, I can reproduce this. It turns out I had accelerate-1.1.0.0 installed, but after upgrading to accelerate-1.1.1.0, I experience the same error. Sure enough, the only difference between versions 1.1.0.0 and 1.1.1.0 is:

* Improve and colourise the pretty-printer

So the Show output for Exp does indeed appear to be colorized now, which explains the ANSI escape characters.

@tmcdonell, do you have any ideas on how we might reliably test for Exp's Show output in the face of colorization?

@tmcdonell
Copy link
Collaborator

Okay, this should be fixed now. There is a bit of overhead to each doctest now (>>> test $ ...) but I think that is okay.

@tmcdonell
Copy link
Collaborator

Now in linear-accelerate-0.5.0.1.

tmcdonell added a commit to tmcdonell/stackage that referenced this issue Sep 29, 2017
ekmett/linear-accelerate#10 fixed in linear-accelerate-0.5.0.1 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants