| 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 |
PLATFORM=$2 |
| 20 |
|
| 21 |
if [ "${REVISION}" == "" ] |
| 22 |
then |
| 23 |
echo "Usage: $0 <revision> <platform>" |
| 24 |
exit |
| 25 |
fi |
| 26 |
if [ "${PLATFORM}" == "" ] |
| 27 |
then |
| 28 |
echo "Usage: $0 ${REVISION} <platform>" |
| 29 |
exit |
| 30 |
fi |
| 31 |
|
| 32 |
TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" |
| 33 |
. ${TOOLDIR}/env |
| 34 |
|
| 35 |
# We have one catalog per platform |
| 36 |
if [ ! -e ${TESTLOGDIR} ] |
| 37 |
then |
| 38 |
echo "${TESTLOGDIR} does not exist" |
| 39 |
exit |
| 40 |
fi |
| 41 |
|
| 42 |
# Get the list of testsuite we are running: |
| 43 |
TESTLISTFILE="${DERBYDIR}/testing/testlist" |
| 44 |
SUITES=`gawk '{ print $1 }' ${TESTLISTFILE} | grep -v "^#"` |
| 45 |
|
| 46 |
# Get the set of platforms |
| 47 |
cd ${TESTLOGDIR} |
| 48 |
echo "Available tested platforms:" |
| 49 |
ls |
| 50 |
# We have one catalog per platform |
| 51 |
if [ ! -e ${PLATFORM} ] |
| 52 |
then |
| 53 |
echo "${PLATFORM} does not exist" |
| 54 |
exit |
| 55 |
fi |
| 56 |
|
| 57 |
echo "" |
| 58 |
echo ${PLATFORM} |
| 59 |
# Create one file per platform |
| 60 |
BASELINEFILE="${PLATFORM}/baseline.csv" |
| 61 |
# if [ ! -e ${BASELINEFILE} ] |
| 62 |
# then |
| 63 |
# echo "Could not find ${BASELINEFILE}" |
| 64 |
# exit |
| 65 |
# fi |
| 66 |
echo "# ${REVISION}" > ${BASELINEFILE} |
| 67 |
|
| 68 |
for SUITE in ${SUITES} |
| 69 |
do |
| 70 |
TIME=`grep "^${SUITE} " ${PLATFORM}/${REVISION}.csv | gawk '{ sub("\r$", ""); print }' | gawk '{ print $6 }'` |
| 71 |
# removes DOS endofline |
| 72 |
SECONDS=`${TOOLDIR}/toSeconds ${TIME}` |
| 73 |
echo "${SUITE} ${TIME} ${SECONDS}" >> ${BASELINEFILE} |
| 74 |
done # SUITES |
| 75 |
|