make test use cabal

This commit is contained in:
Joey Hess 2013-02-27 15:13:25 -04:00
parent c234d46345
commit 2f4070b1db

View file

@ -47,14 +47,13 @@ install: build-stamp install-docs
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell
runghc Build/InstallDesktopFile.hs $(PREFIX)/bin/git-annex || true runghc Build/InstallDesktopFile.hs $(PREFIX)/bin/git-annex || true
test: $(sources) $(clibs) test:
@if ! $(GHCMAKE) -O0 test $(clibs); then \ # workaround for, apparently, a cabal bug
echo "** failed to build the test suite" >&2; \ hsc2hs Utility/Touch.hsc
exit 1; \ cabal configure --enable-tests
elif ! ./test; then \ cabal build
echo "** test suite failed!" >&2; \ rm -f Utility/Touch.hs
exit 1; \ cabal test
fi
testcoverage: testcoverage:
rm -f test.tix test rm -f test.tix test