Move doctests to shell script
This fixes various problems with doctest: * https://github.com/sol/doctest/issues/245 * https://github.com/composewell/streamly/issues/83 Also clean up travis.yml for cabal-3.
This commit is contained in:
22
run-doctests.sh
Executable file
22
run-doctests.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n "${SKIP_DOCTESTS}" ] ; then
|
||||
echo "Skipping doctests"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! command -v doctest >/dev/null ; then
|
||||
tempdir="$(mktemp -d)"
|
||||
(
|
||||
cd "${tempdir}"
|
||||
cabal install --installdir="${tempdir}" doctest
|
||||
)
|
||||
export PATH="${tempdir}:$PATH"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
cabal exec doctest -- -isrc -XOverloadedStrings System.Posix.FilePath
|
||||
cabal exec doctest -- -isrc -XOverloadedStrings HPath
|
||||
Reference in New Issue
Block a user