Debian Codegraph @

tools/testing/reporting/scripts/platformsFailCount

raw
1 #!/bin/bash
2
3 # Licensed to the Apache Software Foundation (ASF) under one or more
4 # contributor license agreements. See the NOTICE file distributed with
5 # this work for additional information regarding copyright ownership.
6 # The ASF licenses this file to you under the Apache License, Version 2.0
7 # (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 REVISION=$1
19 SHOWDETAILS=$2
20 SUITE=$3
21
22 TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts"
23 . ${TOOLDIR}/env
24
25 # Get the set of platforms
26 cd ${TESTLOGDIR}
27 PLATFORMS=`ls`
28
29 DERBALLFAILS="["
30 for PLATFORM in ${PLATFORMS} # TinderBox uses ONE platform..
31 do
32 # DEBUG echo -n "${PLATFORM} "; pwd
33 if [ -e ${PLATFORM}/externallyVisible ] || [ "${SHOWDETAILS}" = "details" ]
34 then
35 if [ -e ${PLATFORM}/${REVISION}.csv ]
36 then
37 # 2: Number, 3: OK, 4: Failed, 5: Skipped, 6: time
38 ## RES=`grep "^derbyall " ${PLATFORM}/${REVISION}.csv`
39 RES=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv`
40 FAILED=`echo ${RES} | gawk '{ print $4 }'`
41 if [ "${FAILED}" == "" ]
42 then
43 FAILED="?"
44 fi
45 DERBALLFAILS="${DERBALLFAILS} ${FAILED} "
46 else
47 DERBALLFAILS="${DERBALLFAILS} - "
48 fi
49 fi # visible, showdetails
50 done # PLATFORMS
51 DERBALLFAILS="${DERBALLFAILS}]"
52
53 echo ${DERBALLFAILS}