File: initDERBYDIR

package info (click to toggle)
derby 10.14.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 79,056 kB
  • sloc: java: 691,961; sql: 42,686; xml: 20,512; sh: 3,373; sed: 96; makefile: 60
file content (122 lines) | stat: -rw-r--r-- 4,148 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Must be positioned in ${DERBYDIR}.
# env.sh and testenv.sh must exist in current directory.
# Assumes Derby has been checked out to ${derby_source} (${DERBYDIR}/${BRANCH_DIR}, 
# see ${derby_source}/tools/testing/reporting/TEMPLATES/env.sh)
# Example: 
#-1. TOPDIR=${HOME}/testingReportingScripts/outerWorld # Update the env.sh script in SANDBOX with this
#    TESTSET=testset # Update the env.sh script in SANDBOX with this
#    SANDBOX=trunkJDK16 # Update the env.sh script in SANDBOX with this
#    DERBYDIR=${TOPDIR}/${TESTSET}/${SANDBOX}
#    BRANCH_DIR=trunk # or 10.2, 10.1, .... the branch you want to check out
# 0. mkdir -p ${TOPDIR}; chmod go+rx ${TOPDIR}
# 1. mkdir -p ${TOPDIR}/${TESTSET}; chmod go+rx ${TOPDIR}/${TESTSET}
# 2. mkdir ${DERBYDIR}; chmod go+rx ${DERBYDIR}
# 3. cd ${DERBYDIR}
# 4. Now checkout the Derby source (See http://db.apache.org/derby/derby_downloads.html).
#    E.g. 'svn checkout https://svn.apache.org/repos/asf/db/derby/code/${BRANCH_DIR}'
# 5. TEMPLATEDIR=${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/TEMPLATES
# 6. cp ${TEMPLATEDIR}/env.sh ./
# 7. cp ${TEMPLATEDIR}/testenv.sh ./
# 8. Modify env.sh and testenv.sh as required.
# 9. TOOLDIR=${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts
#10. Run this script: ${TOOLDIR}/initDERBYDIR


if [ ! -e env.sh ]
then
  echo "env.sh not found!"
  echo "See ${derby_source}/tools/testing/reporting/TEMPLATES for templates."
  exit
fi


# DEBUG 
echo -n "We're in: "; pwd
. ./env.sh
# DEBUG 
echo "DERBYDIR: ${DERBYDIR}"
# DEBUG 
echo "BRANCH_DIR: ${BRANCH_DIR}"
# DEBUG 
pwd

# Example top level web page(s):
if [ ! -e ../index.html ]
then
  cp ${TEMPLATEDIR}/index.html ../index.html 
fi
if [ ! -e ../index.shtml ]
then
  cp ${TEMPLATEDIR}/index.shtml ../index.shtml 
fi
echo ""

##################################
# Create dirs in ${TOPDIR}/${TESTSET}/${SANDBOX}

rm -rf      BuildLog FailReports testing UpdateLog UpdateInfo builds
mkdir -p    BuildLog FailReports testing UpdateLog UpdateInfo builds
chmod go+rx BuildLog FailReports testing UpdateLog UpdateInfo builds
rm -f                                                Failures
ln -s ${BRANCH_DIR}/tools/testing/reporting/Failures Failures

echo ""
# DEBUG 
ls -al .
echo ""

# Create dirs in ${TOPDIR}/${TESTSET}/${SANDBOX}/testing
cd  testing
mkdir -p    Full Limited Notes testlog
chmod go+rx Full Limited Notes testlog
ln -s ../builds builds # Until all scripts are fixed.
ln -s ../UpdateInfo UpdateInfo # Until all scripts are fixed.
# Must exist: edit to exclude if neccessary.
touch ExcludeFromZip

# Example minimal test suite list:
echo "derbyall"                                          > testlist
echo "org.apache.derbyTesting.functionTests.suites.All" >> testlist
echo ""
echo "testlist: "
cat testlist
echo ""
echo "Add more suites as desired."
ln -s testlist showtestlist
echo "Create separate showtestlist if you want to report only for a subset."
echo ""

# Get back in ${TOPDIR}/${TESTSET}/${SANDBOX}
cd ..
echo "To have a complete build environment you should have"
echo "  osgi.jar"
echo "  junit.jar"
echo "  jdbc2_0-stdext.jar"
echo "  jce1_2_2.jar"
echo "in ${BRANCH_DIR}/tools/java:"
ls -l ${BRANCH_DIR}/tools/java

echo ""
echo "Remember to run buildDerby and updateBuildTestDerby with your correct ant property file:"
echo " Default: ~/ant.properties"

exit

# CLEANUP: