Debian Codegraph @

tools/testing/reporting/scripts/initDERBYDIR

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 # Must be positioned in ${DERBYDIR}.
19 # env.sh and testenv.sh must exist in current directory.
20 # Assumes Derby has been checked out to ${derby_source} (${DERBYDIR}/${BRANCH_DIR},
21 # see ${derby_source}/tools/testing/reporting/TEMPLATES/env.sh)
22 # Example:
23 #-1. TOPDIR=${HOME}/testingReportingScripts/outerWorld # Update the env.sh script in SANDBOX with this
24 # TESTSET=testset # Update the env.sh script in SANDBOX with this
25 # SANDBOX=trunkJDK16 # Update the env.sh script in SANDBOX with this
26 # DERBYDIR=${TOPDIR}/${TESTSET}/${SANDBOX}
27 # BRANCH_DIR=trunk # or 10.2, 10.1, .... the branch you want to check out
28 # 0. mkdir -p ${TOPDIR}; chmod go+rx ${TOPDIR}
29 # 1. mkdir -p ${TOPDIR}/${TESTSET}; chmod go+rx ${TOPDIR}/${TESTSET}
30 # 2. mkdir ${DERBYDIR}; chmod go+rx ${DERBYDIR}
31 # 3. cd ${DERBYDIR}
32 # 4. Now checkout the Derby source (See http://db.apache.org/derby/derby_downloads.html).
33 # E.g. 'svn checkout https://svn.apache.org/repos/asf/db/derby/code/${BRANCH_DIR}'
34 # 5. TEMPLATEDIR=${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/TEMPLATES
35 # 6. cp ${TEMPLATEDIR}/env.sh ./
36 # 7. cp ${TEMPLATEDIR}/testenv.sh ./
37 # 8. Modify env.sh and testenv.sh as required.
38 # 9. TOOLDIR=${DERBYDIR}/${BRANCH_DIR}/tools/testing/reporting/scripts
39 #10. Run this script: ${TOOLDIR}/initDERBYDIR
40
41
42 if [ ! -e env.sh ]
43 then
44 echo "env.sh not found!"
45 echo "See ${derby_source}/tools/testing/reporting/TEMPLATES for templates."
46 exit
47 fi
48
49
50 # DEBUG
51 echo -n "We're in: "; pwd
52 . ./env.sh
53 # DEBUG
54 echo "DERBYDIR: ${DERBYDIR}"
55 # DEBUG
56 echo "BRANCH_DIR: ${BRANCH_DIR}"
57 # DEBUG
58 pwd
59
60 # Example top level web page(s):
61 if [ ! -e ../index.html ]
62 then
63 cp ${TEMPLATEDIR}/index.html ../index.html
64 fi
65 if [ ! -e ../index.shtml ]
66 then
67 cp ${TEMPLATEDIR}/index.shtml ../index.shtml
68 fi
69 echo ""
70
71 ##################################
72 # Create dirs in ${TOPDIR}/${TESTSET}/${SANDBOX}
73
74 rm -rf BuildLog FailReports testing UpdateLog UpdateInfo builds
75 mkdir -p BuildLog FailReports testing UpdateLog UpdateInfo builds
76 chmod go+rx BuildLog FailReports testing UpdateLog UpdateInfo builds
77 rm -f Failures
78 ln -s ${BRANCH_DIR}/tools/testing/reporting/Failures Failures
79
80 echo ""
81 # DEBUG
82 ls -al .
83 echo ""
84
85 # Create dirs in ${TOPDIR}/${TESTSET}/${SANDBOX}/testing
86 cd testing
87 mkdir -p Full Limited Notes testlog
88 chmod go+rx Full Limited Notes testlog
89 ln -s ../builds builds # Until all scripts are fixed.
90 ln -s ../UpdateInfo UpdateInfo # Until all scripts are fixed.
91 # Must exist: edit to exclude if neccessary.
92 touch ExcludeFromZip
93
94 # Example minimal test suite list:
95 echo "derbyall" > testlist
96 echo "org.apache.derbyTesting.functionTests.suites.All" >> testlist
97 echo ""
98 echo "testlist: "
99 cat testlist
100 echo ""
101 echo "Add more suites as desired."
102 ln -s testlist showtestlist
103 echo "Create separate showtestlist if you want to report only for a subset."
104 echo ""
105
106 # Get back in ${TOPDIR}/${TESTSET}/${SANDBOX}
107 cd ..
108 echo "To have a complete build environment you should have"
109 echo " osgi.jar"
110 echo " junit.jar"
111 echo " jdbc2_0-stdext.jar"
112 echo " jce1_2_2.jar"
113 echo "in ${BRANCH_DIR}/tools/java:"
114 ls -l ${BRANCH_DIR}/tools/java
115
116 echo ""
117 echo "Remember to run buildDerby and updateBuildTestDerby with your correct ant property file:"
118 echo " Default: ~/ant.properties"
119
120 exit
121
122 # CLEANUP: