Agregué la ruta local en test-variables
This commit is contained in:
parent
07fa2293e1
commit
8ab9c3110a
2 changed files with 58 additions and 0 deletions
56
scripts/report-basblocks
Executable file
56
scripts/report-basblocks
Executable file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
while getopts rq OPT 2>/dev/null ; do
|
||||
case $OPT in
|
||||
'r')
|
||||
REBUILD=1
|
||||
break
|
||||
;;
|
||||
'q')
|
||||
QUIET=1
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
OUTPUT_DIR=/output/hwtests
|
||||
|
||||
[[ -f scripts.env ]] && source scripts.env
|
||||
|
||||
HEADER='SERVER|DISK|SERIAL|RESULT|COMMENT'
|
||||
|
||||
for SRV_DIR in $OUTPUT_DIR/* ; do
|
||||
SERVER=`basename $SRV_DIR`
|
||||
[[ $SERVER == snapshot ]] && continue
|
||||
SERVERS+=" $SERVER"
|
||||
#echo $SRV_DIR
|
||||
done
|
||||
|
||||
#echo $SERVERS
|
||||
|
||||
if [[ -n $REBUILD ]] ; then
|
||||
for SERVER in $SERVERS ; do
|
||||
SRV_CSV=$OUTPUT_DIR/$SERVER/badblocks.csv
|
||||
#echo $SRV_CSV
|
||||
echo $HEADER > $SRV_CSV
|
||||
DSK_DIR=$OUTPUT_DIR/$SERVER/disk
|
||||
for CSV in $DSK_DIR/*.badblocks.csv ; do
|
||||
if [[ -f $CSV ]] ; then
|
||||
#echo $CSV
|
||||
cat $CSV >> $SRV_CSV
|
||||
fi
|
||||
done
|
||||
done
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ -z $QUIET ]] ; then
|
||||
echo $HEADER
|
||||
for SERVER in $SERVERS ; do
|
||||
SRV_CSV=$OUTPUT_DIR/$SERVER/badblocks.csv
|
||||
if [[ -f $SRV_CSV ]] ; then
|
||||
cat $SRV_CSV | grep -v 'SERVER'
|
||||
fi
|
||||
done
|
||||
fi
|
|
@ -15,3 +15,5 @@ RES_ULT=${BLD}RESULT${OFF}
|
|||
#RES_FAIL_BLINK="${RED_BLINK}FAIL${OFF}"
|
||||
RES_FAIL_BIG="${RED_BOLD}######## FAIL ########${OFF}"
|
||||
|
||||
export PATH=.:$PATH
|
||||
|
||||
|
|
Loading…
Reference in a new issue