3 # For Jenkins, we need to keep track of the exit code returned from each tc run;
4 # if it's ever non-zero (ie, a failure), must return that value when this script exits
8 for DIR in `ls | grep ^TC_ | sort`; do
9 echo "**" | tee reports/$DIR.txt
10 echo "** TC Group: $DIR" | tee -a reports/$DIR.txt
11 echo "** Date : "`date` | tee -a reports/$DIR.txt
12 echo "** By : "`who | cut -d " " -f 1` | tee -a reports/$DIR.txt
13 echo "**" | tee -a reports/$DIR.txt
14 echo "" >> reports/$DIR.txt
15 echo "-- Description --" >> reports/$DIR.txt
16 cat $DIR/Description >> reports/$DIR.txt
17 echo -- Positive Cases -- >> reports/$DIR.txt
18 grep -h "^# $DIR.*POS " $DIR/[0-9]* | cut -d ' ' -f 2- | sed -e 's/ / /' >> reports/$DIR.txt
19 echo >> reports/$DIR.txt
20 echo -- Negative Cases -- >> reports/$DIR.txt
21 grep -h "^# $DIR.*NEG " $DIR/[0-9]* | cut -d ' ' -f 2- | sed -e 's/ / /' >> reports/$DIR.txt
24 echo "" >> reports/$DIR.txt
25 echo "-- Results" | tee -a reports/$DIR.txt
26 echo "" | tee -a reports/$DIR.txt
28 bash ./tc $DIR | tee -a reports/$DIR.txt
30 if [[ ${PIPESTATUS[0]} -ne 0 ]]; then