on type-errors help sign in
servant/.github/run-ghcjs-tests.sh
14 lines 460 B history raw
1#!/usr/bin/env bash
2#
3# cabal v2-test does not work with GHCJS
4# See: https://github.com/haskell/cabal/issues/6175
5#
6# This invokes cabal-plan to figure out test binaries, and invokes them with node.
8cabal-plan list-bins '*:test:*' | while read -r line
9do
10 testpkg=$(echo "$line" | perl -pe 's/:.*//')
11 testexe=$(echo "$line" | awk '{ print $2 }')
12 echo "testing $textexe in package $textpkg"
13 (cd "$testpkg" && node "$testexe".jsexe/all.js)
14done