-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyscript2
More file actions
executable file
·40 lines (33 loc) · 1.52 KB
/
Copy pathmyscript2
File metadata and controls
executable file
·40 lines (33 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
#
# Developed by Anya Harter <aharter@redhat.com> on 2018-08-03
# With help from Kevin Postlethwait <kpostlet@redhat.com>
#
# Last Updated 2018-08-15
#
# Pass in the log file generated by the -p (--prettylog) commandline option
#
tabs 11 17 57 65 75 85 95 105
filename="$1"
echo "-----------------------------------------------------------------"
printf " \033[1;37mSTATUS\t #\tNAME\tDURATION\033[1;000m\n"
echo "-----------------------------------------------------------------"
gawk '{gsub(/not ok/,"\033[0;31m FAILURE \033[1;000m")}{gsub(/\<ok\>/,"\033[0;32m SUCCESS \033[1;000m")}{gsub(/__main__/,"")}{gsub("\\.","")}{gsub("[0-9]+ ","&\t")}{gsub("# duration: ","\t")}/FAILURE|SUCCESS/' $1
testsfailed=`gawk '{gsub("#","\033[7;31m")}{gsub("]","&\033[1;000m")}/FAILED/' $filename`
testspassed=`gawk '{gsub("#","\033[7;32m")}{gsub("]","&\033[1;000m")}/PASSED/' $filename`
if ! [ -z "$testsfailed" ]
then
echo "-----------------------------------------------------------------"
echo "$testsfailed"
echo "-----------------------------------------------------------------"
elif ! [ -z "$testspassed" ]
then
echo "-----------------------------------------------------------------"
echo "$testspassed"
echo "-----------------------------------------------------------------"
else
echo "-----------------------------------------------------------------"
echo -e " \033[7;33mTEST SUITE FAILED TO TERMINATE\033[1;000m"
echo "-----------------------------------------------------------------"
fi
tabs 8