#! /bin/csh -f
#
#  Generate a performance total list for multiple runs
#
# $Header: /home/westiv/iorate/RCS/gen_totals,v 3.0 2011/06/18 14:33:22 westiv Exp westiv $
#

( cd data; ./gen_sums )

set target = `cat run_test.count`
@ target -= 3

set count = 0
while ( $count < 4 )

    echo Generating summary totals for test pass $target

    set total = total.$target

    rm -f $total

    if ( `ls data/*.$target".xls" | wc -w` > 0 ) then
	foreach xls ( data/*.$target".xls" )
	    echo "Test "$xls >> $total
	    tail +2 $xls | awk -f gen_totals.awk >> $total
	end
    endif

    @ count ++
    @ target ++

end

