Skip to content

Commit beb0556

Browse files
committed
Test sdist installation
1 parent 72359d7 commit beb0556

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

travis/test-install.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
set -e
22

33
# Check that a source distribution can be successfully generated, and that
4-
# the generated source distribution can be installed
4+
# the generated source distribution can be installed and tested
55
cabal sdist
6-
if SRC_TGZ="$PWD/dist/$(cabal info . | awk '{print $2;exit}').tar.gz"
6+
PKGNAME=$(cabal info . | awk '{print $2;exit}')
7+
if SRC_TGZ="$PWD/dist/$PKGNAME.tar.gz"
78
then
89
mkdir -p ../install-test
910
cd ../install-test
1011
mkdir -p sandboxes/$GHCVER/${STACKAGE:-none}
1112
cabal sandbox init --sandbox sandboxes/$GHCVER/${STACKAGE:-none}
12-
cabal install -j2 --ghc-options='+RTS -A32m -RTS' "$SRC_TGZ"
13+
14+
if [ `echo "$STACKAGE" | sed 's/\..*$//'` = "lts-3" ]; then
15+
tar -xzf i--strip-components=1 $PKGNAME.tar.gz
16+
cabal install
17+
cabal test
18+
else
19+
cabal install "$SRC_TGZ"
20+
fi
1321
fi

0 commit comments

Comments
 (0)