| 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 |
# export DERBYDIR="${HOME}/Apache/Derby" |
| 19 |
DERBYDIR=$1 |
| 20 |
|
| 21 |
if [ "${DERBYDIR}" = "" ] |
| 22 |
then |
| 23 |
echo "DERBYDIR must be defined." |
| 24 |
exit |
| 25 |
fi |
| 26 |
if [ ! -e ${DERBYDIR} ] |
| 27 |
then |
| 28 |
echo "Nonexisting DERBYDIR: ${DERBYDIR} was given to $0." |
| 29 |
exit |
| 30 |
fi |
| 31 |
|
| 32 |
cd ${DERBYDIR} |
| 33 |
|
| 34 |
HOST=`uname -n` |
| 35 |
|
| 36 |
. ./env.sh |
| 37 |
. ./testenv.sh |
| 38 |
|
| 39 |
TOOLDIR="${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts" |
| 40 |
. ${TOOLDIR}/env |
| 41 |
|
| 42 |
SANDBOX=`basename ${DERBYDIR}` |
| 43 |
if [ ! -e ${BUILDLOGDIR}/buildOK ] |
| 44 |
then |
| 45 |
echo "Derby was NOT updated or build failed" |
| 46 |
echo " ${BUILDLOGDIR}/buildOK does not exist." |
| 47 |
### UNCOMMENT TO SEND MAIL. ${TOOLDIR}/textMail "${SANDBOX} was NOT updated or build failed" "${MAILTOINT}" "${BUILDLOGDIR}/lastBuildInfo" |
| 48 |
exit |
| 49 |
fi |
| 50 |
|
| 51 |
mkdir -p TestRunLogs |
| 52 |
cd TestRunLogs |
| 53 |
|
| 54 |
echo "${TOOLDIR}/runAllTests ../testing/testlist ${DERBYDIR}/testing/testlog > ${HOST}.log" > ${HOST}.log |
| 55 |
${TOOLDIR}/runAllTests ../testing/testlist ${DERBYDIR}/testing/testlog >> ${HOST}.log 2>${HOST}.err & |
| 56 |
|