ecperf.sh (1364B)
1 #! /bin/bash 2 # 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 ######################################################################## 8 # 9 # tests/ec/ecperf.sh 10 # 11 # needs to work on all Unix and Windows platforms 12 # 13 # special strings 14 # --------------- 15 # FIXME ... known problems, search for this string 16 # NOTE .... unexpected behavior 17 # 18 ######################################################################## 19 20 ############################## ecperf_init ############################# 21 # local shell function to initialize this script 22 ######################################################################## 23 24 ecperf_init() 25 { 26 SCRIPTNAME="ecperf.sh" 27 if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ] ; then 28 cd ../common 29 . ./init.sh 30 fi 31 SCRIPTNAME="ecperf.sh" 32 html_head "ecperf test" 33 } 34 35 ecperf_cleanup() 36 { 37 html "</TABLE><BR>" 38 cd ${QADIR} 39 . common/cleanup.sh 40 } 41 42 ecperf_init 43 ECPERF_OUT=$(ecperf 2>&1) 44 echo "$ECPERF_OUT" 45 ECPERF_OUT=`echo $ECPERF_OUT | grep -i 'failed\|Assertion failure'` 46 # TODO: this is a perf test we don't check for performance here but only failed 47 if [ -n "$ECPERF_OUT" ] ; then 48 html_failed "ec(perf) test" 49 else 50 html_passed "ec(perf) test" 51 fi 52 ecperf_cleanup