Commit 2ea28cab authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Edward Z. Yang
Browse files

Expect tests for cabal-testsuite.



- We switched to using regex-tdfa, as regex-posix is buggy on Windows.
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 91318e31
import Test.Cabal.Prelude hiding (cabal)
import qualified Test.Cabal.Prelude as P
main = cabalTest $ do
-- See #4332, dep solving output is not deterministic
main = cabalTest . recordMode DoNotRecord $ do
fails $ cabal "new-build" []
cabal "new-build" ["--allow-newer"]
fails $ cabal "new-build" ["--allow-newer=baz,quux"]
......
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowNewer-0.1.0.0 (user goal)
next goal: base (dependency of AllowNewer-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowNewer => base<1)
fail (backjumping, conflict set: AllowNewer, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowNewer (3), base (2)Trying configure anyway.
Configuring AllowNewer-0.1.0.0...
cabal: Encountered missing dependencies:
base ==0.*
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
setup: Encountered missing dependencies:
base ==0.*
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
# Setup configure
Configuring AllowNewer-0.1.0.0...
......@@ -17,9 +17,11 @@ test-suite foo-test
main-is: Test.hs
hs-source-dirs: tests
build-depends: base > 42
default-language: Haskell2010
benchmark foo-bench
type: exitcode-stdio-1.0
main-is: Bench.hs
hs-source-dirs: benchmarks
build-depends: base > 42
default-language: Haskell2010
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: AllowOlder-0.1.0.0 (user goal)
next goal: base (dependency of AllowOlder-0.1.0.0)
rejecting: base-<VERSION>/installed-<HASH>... (conflict: AllowOlder => base>42)
fail (backjumping, conflict set: AllowOlder, base)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: AllowOlder (3), base (2)Trying configure anyway.
Configuring AllowOlder-0.1.0.0...
cabal: Encountered missing dependencies:
base >42
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
setup: Encountered missing dependencies:
base >42
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Configuring AllowOlder-0.1.0.0...
# Setup configure
Resolving dependencies...
Configuring p-0.1.0.0...
# Setup build
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for p-0.1.0.0..
# Setup configure
Resolving dependencies...
Configuring q-0.1.0.0...
# Setup build
Preprocessing library for q-0.1.0.0..
Building library for q-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for q-0.1.0.0..
# Setup configure
Resolving dependencies...
Configuring package-import-0.1.0.0...
# Setup build
Preprocessing executable 'package-import' for package-import-0.1.0.0..
Building executable 'package-import' for package-import-0.1.0.0..
# package-import
p q
# Setup configure
Configuring p-0.1.0.0...
# Setup build
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for p-0.1.0.0..
# Setup configure
Configuring q-0.1.0.0...
# Setup build
Preprocessing library for q-0.1.0.0..
Building library for q-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for q-0.1.0.0..
# Setup configure
Configuring package-import-0.1.0.0...
# Setup build
Preprocessing executable 'package-import' for package-import-0.1.0.0..
Building executable 'package-import' for package-import-0.1.0.0..
# package-import
p q
# Setup configure
Resolving dependencies...
Configuring p-0.1.0.0...
# Setup build
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for p-0.1.0.0..
# Setup configure
Resolving dependencies...
Configuring q-0.1.0.0...
# Setup build
Preprocessing library for q-0.1.0.0..
Building library for q-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for q-0.1.0.0..
# Setup configure
Resolving dependencies...
Configuring reexport-0.1.0.0...
# Setup build
Preprocessing library for reexport-0.1.0.0..
Building library for reexport-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for reexport-0.1.0.0..
# Setup configure
Resolving dependencies...
Configuring reexport-test-0.1.0.0...
# Setup build
Preprocessing executable 'reexport-test' for reexport-test-0.1.0.0..
Building executable 'reexport-test' for reexport-test-0.1.0.0..
# reexport-test
p q
# Setup configure
Configuring p-0.1.0.0...
# Setup build
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for p-0.1.0.0..
# Setup configure
Configuring q-0.1.0.0...
# Setup build
Preprocessing library for q-0.1.0.0..
Building library for q-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for q-0.1.0.0..
# Setup configure
Configuring reexport-0.1.0.0...
# Setup build
Preprocessing library for reexport-0.1.0.0..
Building library for reexport-0.1.0.0..
# Setup copy
Installing library in <PATH>
# Setup register
Registering library for reexport-0.1.0.0..
# Setup configure
Configuring reexport-test-0.1.0.0...
# Setup build
Preprocessing executable 'reexport-test' for reexport-test-0.1.0.0..
Building executable 'reexport-test' for reexport-test-0.1.0.0..
# reexport-test
p q
# Setup configure
Resolving dependencies...
Configuring AutogenModules-0.1...
cabal: An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'.
On executable 'Exe' an 'autogen-module' is not on 'other-modules'
On test suite 'Test' an 'autogen-module' is not on 'other-modules'
On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
# Setup sdist
Distribution quality errors:
An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'.
On executable 'Exe' an 'autogen-module' is not on 'other-modules'
On test suite 'Test' an 'autogen-module' is not on 'other-modules'
On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
Note: the public hackage server would reject this package.
Warning: Cannot run preprocessors. Run 'configure' command first.
Building source dist for AutogenModules-0.1...
cabal: Error: Could not find module: MyLibHelperModule with any suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs","hsig","lhsig"]. If the module is autogenerated it should be added to 'autogen-modules'.
# Setup configure
Configuring AutogenModules-0.1...
setup: An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'.
On executable 'Exe' an 'autogen-module' is not on 'other-modules'
On test suite 'Test' an 'autogen-module' is not on 'other-modules'
On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
# Setup sdist
Distribution quality errors:
An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'.
On executable 'Exe' an 'autogen-module' is not on 'other-modules'
On test suite 'Test' an 'autogen-module' is not on 'other-modules'
On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
Note: the public hackage server would reject this package.
Warning: Cannot run preprocessors. Run 'configure' command first.
Building source dist for AutogenModules-0.1...
setup: Error: Could not find module: MyLibHelperModule with any suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs","hsig","lhsig"]. If the module is autogenerated it should be added to 'autogen-modules'.
# Setup configure
Resolving dependencies...
Configuring AutogenModules-0.1...
# Setup sdist
Building source dist for AutogenModules-0.1...
Preprocessing executable 'Exe' for AutogenModules-0.1..
Preprocessing library for AutogenModules-0.1..
Source tarball created: setup.cabal.dist/work/dist/AutogenModules-0.1.tar.gz
# Setup sdist
List of package sources written to file '<ROOT>/setup.cabal.dist/work/./dist/list-sources.txt'
List of package sources written to file '<ROOT>/setup.cabal.dist/work/./dist/list-sources.txt'
# Setup configure
Configuring AutogenModules-0.1...
# Setup sdist
Building source dist for AutogenModules-0.1...
Preprocessing executable 'Exe' for AutogenModules-0.1..
Preprocessing library for AutogenModules-0.1..
Source tarball created: setup.dist/work/dist/AutogenModules-0.1.tar.gz
# Setup sdist
List of package sources written to file '<ROOT>/setup.dist/work/./dist/list-sources.txt'
......@@ -9,6 +9,7 @@ cabal-version: >=1.25
library sig
signatures: A
build-depends: base
default-language: Haskell2010
library
build-depends: sig
......
# Setup configure
Resolving dependencies...
Configuring Fail1-0.1.0.0...
Error:
Package 'sig-0.1.0.0' does not require: MissingReq
In mixins: sig requires (MissingReq as A)
In the stanza library
# Setup configure
Configuring Fail1-0.1.0.0...
Error:
Package 'sig-0.1.0.0' does not require: MissingReq
In mixins: sig requires (MissingReq as A)
In the stanza library
# Setup configure
Resolving dependencies...
Configuring Fail2-0.1.0.0...
# Setup configure
Configuring Fail2-0.1.0.0...
......@@ -9,6 +9,7 @@ cabal-version: >=1.25
library
signatures: UnfilledSig
build-depends: base
default-language: Haskell2010
executable foo
build-depends: Fail1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment