Ported r2581:2583 from trunk.
This commit is contained in:
parent
2f109c68a2
commit
3cc754003b
3 changed files with 18 additions and 9 deletions
|
@ -407,7 +407,7 @@ cat << EOF
|
||||||
|
|
||||||
create-sbu_du-report: $PREV
|
create-sbu_du-report: $PREV
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@./create-sbu_du-report.sh logs $VERSION $TEST
|
@./create-sbu_du-report.sh logs $VERSION
|
||||||
@\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report)
|
@\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report)
|
||||||
@touch \$@
|
@touch \$@
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -5,20 +5,17 @@ set -e
|
||||||
|
|
||||||
LOGSDIR=$1
|
LOGSDIR=$1
|
||||||
VERSION=$2
|
VERSION=$2
|
||||||
TESTLEVEL=$3
|
|
||||||
|
|
||||||
# Make sure that we have a directory as first argument
|
# Make sure that we have a directory as first argument
|
||||||
[[ ! -d "$LOGSDIR" ]] && \
|
[[ ! -d "$LOGSDIR" ]] && \
|
||||||
echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version testsuites_level]\n" && exit
|
echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version]\n" && exit
|
||||||
|
|
||||||
# Make sure that the first argument is a jhalfs logs directory
|
# Make sure that the first argument is a jhalfs logs directory
|
||||||
[[ ! -f "$LOGSDIR"/000-masterscript.log ]] && \
|
[[ ! -f "$LOGSDIR"/000-masterscript.log ]] && \
|
||||||
echo -e "\nLooks like $LOGSDIR isn't a jhalfs logs directory.\n" && exit
|
echo -e "\nLooks like $LOGSDIR isn't a jhalfs logs directory.\n" && exit
|
||||||
|
|
||||||
# If this script is run manually, the book version and testsuite levels
|
# If this script is run manually, the book version may be unknow
|
||||||
# may be unknow
|
|
||||||
[[ -z "$VERSION" ]] && VERSION=unknown
|
[[ -z "$VERSION" ]] && VERSION=unknown
|
||||||
[[ -z "$TESTLEVEL" ]] && TESTLEVEL=unknown
|
|
||||||
|
|
||||||
# If there is iteration logs directories, copy the logs inside iteration-1
|
# If there is iteration logs directories, copy the logs inside iteration-1
|
||||||
# to the top level dir
|
# to the top level dir
|
||||||
|
@ -28,13 +25,20 @@ TESTLEVEL=$3
|
||||||
# Set the report file
|
# Set the report file
|
||||||
REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report
|
REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report
|
||||||
|
|
||||||
# Dump generation time stamp, book version, and testsuites level
|
# Dump generation time stamp and book version
|
||||||
echo -e "\n`date`\n" > "$REPORT"
|
echo -e "\n`date`\n" > "$REPORT"
|
||||||
echo -e "Book version is:\t$VERSION\n" >> "$REPORT"
|
echo -e "Book version is:\t$VERSION\n" >> "$REPORT"
|
||||||
echo -e "Test suites level:\t$TESTLEVEL\n" >> "$REPORT"
|
|
||||||
|
# If found, dump jhalfs.config file in a readable format
|
||||||
|
if [[ -f jhalfs.config ]] ; then
|
||||||
|
echo -e "\n\tjhalfs configuration settings:\n" >> "$REPORT"
|
||||||
|
cat jhalfs.config | sed -e '/parameters/d;s/.\[[013;]*m//g;s/</\t</;s/^\w\{1,6\}:/&\t/' >> "$REPORT"
|
||||||
|
else
|
||||||
|
echo -e "\nNOTE: the jhalfs configuration settings are unknown" >> "$REPORT"
|
||||||
|
fi
|
||||||
|
|
||||||
# Dump CPU and memory info
|
# Dump CPU and memory info
|
||||||
echo -e "\n\t\tCPU type:\n" >> "$REPORT"
|
echo -e "\n\n\t\tCPU type:\n" >> "$REPORT"
|
||||||
cat /proc/cpuinfo >> "$REPORT"
|
cat /proc/cpuinfo >> "$REPORT"
|
||||||
echo -e "\n\t\tMemory info:\n" >> "$REPORT"
|
echo -e "\n\t\tMemory info:\n" >> "$REPORT"
|
||||||
free >> "$REPORT"
|
free >> "$REPORT"
|
||||||
|
|
|
@ -503,6 +503,11 @@ fi
|
||||||
if [[ ! -d $LOGDIR ]]; then
|
if [[ ! -d $LOGDIR ]]; then
|
||||||
mkdir $LOGDIR
|
mkdir $LOGDIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# After be sure that all look sane and if REPORT=1, dump the settings to a file
|
||||||
|
# This file will be used to create the REPORT header
|
||||||
|
[[ "$REPORT" = "1" ]] && validate_config > $JHALFSDIR/jhalfs.config
|
||||||
|
|
||||||
>$LOGDIR/$LOG
|
>$LOGDIR/$LOG
|
||||||
|
|
||||||
get_book
|
get_book
|
||||||
|
|
Reference in a new issue