-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintel-ipmi-test
More file actions
executable file
·40 lines (30 loc) · 972 Bytes
/
intel-ipmi-test
File metadata and controls
executable file
·40 lines (30 loc) · 972 Bytes
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
#!/bin/bash
testdir="$HOME/intel-ipmi-test"
resultlog="intel-ipmi-test.log"
cat /dev/null > $resultlog
[ ! -d "$testdir" ] && mkdir -p $testdir
cd $testdir
for ((i=0; i<10; i++)); do
# Create a logfile name based on the number of the test and copy
# its name into the result log.
#
logname=$(printf "test-%02d.log" $i)
echo $logname | tee -a $resultlog
echo "----------------------" >> $resultlog
# Run the test that intel provided for their CacheRiver IPMI tool
# and write the results into the logfile.
#
~/BMC/test ~/BMC/get.ini > $logname
# If there were no failures, then just tail the last two lines of
# the log file to the results file.
# Else, cat all the failures in the log file to the results file.
#
if grep -q "failed: 0" $logname ; then
tail -2 $logname >> $resultlog
else
# egrep -n -i -e fail -e err $logname >> $resultlog
grep -n -i fail $logname >> $resultlog
fi
echo -e "===================\n" >> $resultlog
done
cd -