David Gibson wrote:
> libhugetlbfs: Print summary of testsuite results
>
> This patch adds some tracking to the run_tests script which counts the
> total number of tests, and the number of passes, failures and other
> results. This is printed as a summary once the script is finished, so
> you can see at a glance if the tests ran clean or not.
>
> Signed-off-by: David Gibson <[EMAIL PROTECTED]>
>
> ---
> tests/run_tests.sh | 41 ++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 40 insertions(+), 1 deletion(-)
>
> Index: libhugetlbfs/tests/run_tests.sh
> ===================================================================
> --- libhugetlbfs.orig/tests/run_tests.sh 2008-07-03 15:15:46.000000000
> +1000
> +++ libhugetlbfs/tests/run_tests.sh 2008-07-03 15:15:48.000000000 +1000
> @@ -7,6 +7,17 @@ unset HUGETLB_MORECORE
>
> ENV=/usr/bin/env
>
> +for BITS in 32 64; do
> + tot_tests[$BITS]=0
> + tot_tests[$BITS]=0
> + tot_pass[$BITS]=0
> + tot_fail[$BITS]=0
> + tot_config[$BITS]=0
> + tot_signal[$BITS]=0
> + tot_strange[$BITS]=0
> + tot_skip[$BITS]=0
> +done
> +
> function free_hpages() {
> H=$(grep 'HugePages_Free:' /proc/meminfo | cut -f2 -d:)
> [ -z "$H" ] && H=0
> @@ -36,8 +47,22 @@ run_test_bits () {
> shift
>
> if [ -d obj$BITS ]; then
> + tot_tests[$BITS]=$[tot_tests[$BITS] + 1]
> echo -n "$@ ($BITS): "
> - PATH="obj$BITS:$PATH"
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../obj$BITS:obj$BITS" $ENV "$@"
> + if PATH="obj$BITS:$PATH"
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../obj$BITS:obj$BITS" $ENV "$@"; then
> + tot_pass[$BITS]=$[tot_pass[$BITS] + 1]
> + else
> + rc="$?"
> + if [ "$rc" == "1" ]; then
> + tot_config[$BITS]=$[tot_config[$BITS] + 1]
> + elif [ "$rc" == "2" ]; then
> + tot_fail[$BITS]=$[tot_fail[$BITS] + 1]
> + elif [ "$rc" -gt 127 ]; then
> + tot_signal[$BITS]=$[tot_signal[$BITS] + 1]
> + else
> + tot_strange[$BITS]=$[tot_strange[$BITS] + 1]
> + fi
> + fi
> fi
> }
>
> @@ -49,6 +74,9 @@ run_test () {
>
> skip_test () {
> echo "$@: SKIPPED"
> + for bits in $WORDSIZES; do
> + tot_skip=$[tot_skip + 1]
> + done
> }
I was going to ask:
Shouldn't skip_test() also increment tot_tests[$bits]?
Shouldn't there be a [$bits] subscript on tot_skip?
But then I noticed that skip_test() doesn't seem to be called from
anywhere. Perhaps it should be removed?
-Andrew Hastings
Cray Inc.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel