bstinson / centos / t_functional

Forked from centos/t_functional 3 years ago
Clone

Blame runtests.sh

Karanbir Singh 2dd0be
#!/bin/bash
Karanbir Singh 7a0496
Steve Barnes e801dc
# Author: Steve Barnes (steve@echo.id.au)
Steve Barnes e801dc
# Description: this script sources our library functions and starts a test run.
Steve Barnes e801dc
Karanbir Singh 2dd0be
export readonly PASS=0
Karanbir Singh 2dd0be
export readonly FAIL=1
Karanbir Singh 7a0496
Karanbir Singh 2dd0be
echo -e "\n[+] `date` -> CentOS QA $0 starting."
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
LIB_FUNCTIONS='./tests/0_lib/functions.sh'
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
[ -f $LIB_FUNCTIONS ] && source $LIB_FUNCTIONS || { echo -e "\n[+] `date` -> Unable to source functions library. Cannot continue\n"; exit $FAIL; }
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
# case insensitive filename matching
Karanbir Singh 2dd0be
shopt -s nocasematch
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
# exit as soon as any script returns a non-zero exit status
Karanbir Singh 2dd0be
set -e
Karanbir Singh 2dd0be
Steve Barnes e801dc
# process our test script folders
Steve Barnes e801dc
t_ProcessFolder <(/usr/bin/find ./tests/0_common/ -type f|sort)
Steve Barnes e801dc
t_ProcessFolder <(/usr/bin/find ./tests/p_*/ -type f|sort)
Steve Barnes e801dc
t_ProcessFolder <(/usr/bin/find ./tests/r_*/ -type f|sort)
Karanbir Singh 2dd0be
Steve Barnes e801dc
# and, we're done.
Karanbir Singh 2dd0be
t_Log "Finished."
Steve Barnes e801dc