From 231beb5c3fc50f40e31b9e00237c67f267188057 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Wed, 9 Aug 2017 09:53:34 +0100 Subject: preliminary testbed --- test/scorsh_testsuite | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 test/scorsh_testsuite (limited to 'test/scorsh_testsuite') diff --git a/test/scorsh_testsuite b/test/scorsh_testsuite new file mode 100644 index 0000000..57954f7 --- /dev/null +++ b/test/scorsh_testsuite @@ -0,0 +1,57 @@ +#!/bin/sh + +#### +## +## testsuite for SCORSH +## + +if [ $# -lt 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +. ./scorsh_functions + +[ -f "$1" ] || ( echo "Unable to open file $1" && exit 2 ) + +. "$1" + + +trap cleanup 0 HUP INT TRAP TERM QUIT + +## func +cleanup(){ + ## do stuff here + rm -rf ${SCORSH_REPO} + rm -rf ${SCORSH_APP} + rm -rf ${REMOTE_REPO} + rm -rf ${LOCAL_REPO} + + echo "Exiting..." +} + +## func +run_tests(){ + + for t in $TESTS; do + export PASSED_TESTS FAILED_TESTS TOT_TESTS + echo "\033[4;7;36m-+-+- running tests in $t -+-+-\033[0m" + $t + eval $(cat ${STATUS_FILE}) + echo "\033[35m-------------------------------------------------------------\033[0m" + + done + export PASSED_TESTS FAILED_TESTS TOT_TESTS +} + + +## main + +export SCORSH_URL SCORSH_REPO SCORSH_APP REMOTE_REPO LOCAL_REPO +PASSED_TESTS=0 +FAILED_TESTS=0 +TOT_TESTS=0 + +run_tests + +report_results -- cgit v1.2.3