4
# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
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.
19
wd="$(cd "$(dirname "$0")" && pwd)";
20
cdt="${wd}/../CalDAVTester";
23
# Command line handling
27
serverinfo="${cdt}/scripts/server/serverinfo.xml";
28
documentroot="${wd}/twistedcaldav/test/data";
32
program="$(basename "$0")";
33
echo "Usage: ${program} [-v] [-d docroot] [-s serverinfo]";
35
echo " -h Print this help and exit";
36
echo " -d Set the document root";
37
echo " -s Set the serverinfo.xml";
40
if [ "${1-}" == "-" ]; then return 0; fi;
44
while getopts 'hvd:s:' option; do
47
'h') usage -; exit 0; ;;
48
'd') documentroot="${OPTARG}"; ;;
49
's') serverinfo="${OPTARG}"; ;;
54
shift $((${OPTIND} - 1));
64
export PYTHONPATH=$("${wd}/run" -p);
66
if [ ! -e "${documentroot}/calendars/__uids__/user01" ]; then
67
curl "http://localhost:8008/calendars/__uids__/user01/";
70
python twistedcaldav/test/data/makelargecalendars.py -n 1 -d "${documentroot}";
72
cd "${cdt}" && python testcaldav.py -s "${serverinfo}" "$@";