From 6f9374f9c41fffbf030ffe893cfa214e7e0553f4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 21 Dec 2007 05:19:03 +0000 Subject: [PATCH] [gitconv @ Add tests/run-tests.] A little script that runs both Properties and Commands. Exits with error if any of the tests fail. --- tests/run-tests | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/run-tests diff --git a/tests/run-tests b/tests/run-tests new file mode 100644 index 0000000..eae28e6 --- /dev/null +++ b/tests/run-tests @@ -0,0 +1,13 @@ +#!/bin/sh + +# Run tests and signal error on failure. +# Saves output in 'test.log', unless no failures are detected. + +runhaskell -iNetwork tests/Properties.hs \ + | tee test.log && if grep Falsifiable test.log >/dev/null ; then exit 1 ; +else rm -f test.log ; fi + +runhaskell -iNetwork tests/Commands.hs \ + | tee test.log && \ + if grep "\*\*\* FAILURE \*\*\*" test.log >/dev/null ; then \ + exit 1 ; else rm -f test.log ; fi -- 2.11.4.GIT