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

Testsuite fixes #112

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ The docs get put in `dist/doc/html/`.
## Building the testsuite

The `snap-server` has a fairly comprehensive test suite. To build and run it,
`cd` into the `test/` directory and run
run

$ cabal configure # for the stock backend, or..
$ cabal configure -fopenssl # for the SSL backend
$ cabal configure --enable-tests # for the stock backend, or..
$ cabal configure -fopenssl --enable-tests # for the SSL backend

$ cabal build

Expand Down
3 changes: 2 additions & 1 deletion runTestsAndCoverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export LANG=C
rm -Rf testsuite.tix

# TODO How do we find the executable without knowing the version number in dist-newstyle?
./dist-newstyle/build/snap-server-1.0.0.0/build/testsuite/testsuite -j4 -a1000 $*
TESTSUITE=`find . -type f -perm 775 -name 'testsuite'`
$TESTSUITE -j4 -a1000 $*

DIR="./dist-newstyle/hpc"

Expand Down
9 changes: 7 additions & 2 deletions snap-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ Test-suite testsuite
parallel >= 3 && < 4,
test-framework >= 0.8.0.3 && < 0.9,
test-framework-hunit >= 0.2.7 && < 0.4,
test-framework-quickcheck2 >= 0.2.12.1 && < 0.4
test-framework-quickcheck2 >= 0.2.12.1 && < 0.4,
Cabal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this new dependency here? I don't see any code changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC https-streams complained about missing cabal lib. I've retested and the result of:

cabal sandbox init
cabal install --dependencies-only --enable-tests -fbuild-testserver -fopenssl

is this error message:

Configuring http-streams-0.8.5.5...
Failed to install http-streams-0.8.5.5
Build log ( /home/karel/git/snap-server/.cabal-sandbox/logs/http-streams-0.8.5.5.log ):
cabal: Error: some packages failed to install:
http-streams-0.8.5.5 failed during the configure step. The exception was:
user error (The package 'http-streams' requires Cabal library version -any &&
>=1.24 but no suitable version is installed.)

but well, indeed, adding Cabal there does not solve the issue. I've needed to perform separate

cabal install Cabal==2.0.1.1

to fix this and complete installation of dependencies. Then configure and cabal build run fine.
So I'll commit cleanup in a minute. Sorry for this and thanks for catching this.


other-extensions:
BangPatterns,
Expand Down Expand Up @@ -495,6 +496,9 @@ Executable snap-test-server
System.SendFile,
System.SendFile.FreeBSD

if !impl(ghc >= 8.0)
build-depends: semigroups >= 0.16 && < 0.19

build-depends:
attoparsec,
base,
Expand All @@ -516,7 +520,8 @@ Executable snap-test-server
time,
transformers,
unix-compat,
vector
vector,
filepath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, here's another new dependency.


ghc-options: -Wall -fwarn-tabs -funbox-strict-fields
-fno-warn-unused-do-bind -threaded -rtsopts
Expand Down