-
Notifications
You must be signed in to change notification settings - Fork 3
/
regress-av.sh
executable file
·104 lines (82 loc) · 2.43 KB
/
regress-av.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
TEST_ROOT=~/test
TEST_HOME=${TEST_ROOT}/HPCC-Platform/testing/regress
BUILD_HOME=~/build/CE/platform/build
# Clean system
echo ""
#echo "Clean system"
#[ ! -e $TEST_ROOT ] && mkdir -p $TEST_ROOT
#
#rm -rf ${TEST_ROOT}/*
cd ${TEST_ROOT}
#rpm -qa | grep hpcc | grep -v grep |
#while read hpcc_package
#do
# rpm -e $hpcc_package
#done
#rpm -qa | grep hpcc > /dev/null 2>&1
#if [ $? -eq 0 ]
#then
# touch clean.failed
# exit
#fi
# Install HPCC
#echo ""
#echo "Install HPCC-Platform"
#rpm -i --nodeps ${BUILD_HOME}/hpccsystems-platform_community*.rpm > install.log 2>&1
#if [ $? -ne 0 ]
#then
# echo "TestResult:FAILED" >> install.summary
# exit
#else
# echo "TestResult:PASSED" >> install.summary
#fi
#service hpcc-init start
# Get test from github
#echo ""
#echo "Get test from github"
#git clone https://github.com/hpcc-systems/HPCC-Platform.git
# Prepare regression test
echo ""
echo "Prepar reqgression test"
logDir=/root/HPCCSystems-regression/log
[ ! -d $logDir ] && mkdir -p $logDir
rm -rf ${logDir}/*
libDir=/var/lib/HPCCSystems/regression
[ ! -d $libDir ] && mkdir -p $libDir
rm -rf ${libDir}/*
# Run test
echo ""
echo "Run reqgression test"
cd $TEST_HOME
./regress --suiteDir . list | grep -v "Cluster" |
while read cluster
do
echo ""
echo "./regress --suiteDir . run $cluster"
./regress --suiteDir . run $cluster
cp ${logDir}/${cluster}*.log ${TEST_ROOT}/
total=$(cat ${logDir}/${cluster}*.log | sed -n "s/^[[:space:]]*Queries:[[:space:]]*\([0-9]*\)[[:space:]]*$/\1/p")
passed=$(cat ${logDir}/${cluster}*.log | sed -n "s/^[[:space:]]*Passing:[[:space:]]*\([0-9]*\)[[:space:]]*$/\1/p")
failed=$(cat ${logDir}/${cluster}*.log | sed -n "s/^[[:space:]]*Failure:[[:space:]]*\([0-9]*\)[[:space:]]*$/\1/p")
#[ $passed -gt 0 ] && passed="<span style=\"color:#298A08\">$passed</span>"
#[ $failed -gt 0 ] && failed="<span style=\"color:#FF0000\">$passed</span>"
echo "TestResult:Total:${total} passed:$passed failed:$failed" > ${TEST_ROOT}/${cluster}.summary
done
cd $TEST_ROOT
# Uninstall HPCC
#echo ""
#echo "Uninstall HPCC-Platform"
#uninstallFailed=FALSE
#hpccPackageName=$(rpm -qa | grep hpcc)
#rpm -e $hpccPackageName > uninstall.log 2>&1
#[ $? -ne 0 ] && uninstallFailed=TRUE
#
#rpm -qa | grep hpcc > /dev/null 2>&1
#[ $? -eq 0 ] && uninstallFailed=TRUE
#if [ "$uninstallFailed" = "TRUE" ]
#then
# echo "TestResult:FAILED" >> uninstall.summary
#else
# echo "TestResult:PASSED" >> uninstall.summary
#fi