From 8569c2c85bec19daa36e013448399c42cf75a257 Mon Sep 17 00:00:00 2001 From: Heikki Kallasjoki Date: Fri, 7 Dec 2018 00:17:09 +0000 Subject: Add a simple test harness and tests for the cpu collector. --- test/run_tests.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/run_tests.sh (limited to 'test/run_tests.sh') diff --git a/test/run_tests.sh b/test/run_tests.sh new file mode 100755 index 0000000..12a0e1a --- /dev/null +++ b/test/run_tests.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +failed=0 + +for suite in "$@"; do + echo "$suite:" + if ./$suite; then + echo "...pass" + else + echo "...FAIL" + failed=1 + fi +done + +if (($failed)); then + printf "\x1b[31;1mTESTS FAILED\x1b[0m\n" + exit 1 +fi + +printf "\x1b[32;1mall tests passed\x1b[0m\n" +exit 0 -- cgit 1.4.1