~ubuntu-branches/ubuntu/utopic/calendarserver/utopic

« back to all changes in this revision

Viewing changes to testcaldav

  • Committer: Package Import Robot
  • Author(s): Rahul Amaram
  • Date: 2012-05-29 18:12:12 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120529181212-mxjdfncopy6vou0f
Tags: 3.2+dfsg-1
* New upstream release
* Moved from using cdbs to dh sequencer
* Modified calenderserver init.d script based on /etc/init.d/skeleton script
* Removed ldapdirectory.patch as the OpenLDAP directory service has been 
  merged upstream
* Moved package to section "net" as calendarserver is more service than 
  library (Closes: #665859)
* Changed Architecture of calendarserver package to any as the package
  now includes compiled architecture dependent Python extensions
* Unowned files are no longer left on the system upon purging
  (Closes: #668731)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
##
4
 
# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
5
 
#
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
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
 
 
19
 
wd="$(cd "$(dirname "$0")" && pwd)";
20
 
cdt="${wd}/../CalDAVTester";
21
 
 
22
 
##
23
 
# Command line handling
24
 
##
25
 
 
26
 
verbose="";
27
 
serverinfo="${cdt}/scripts/server/serverinfo.xml";
28
 
documentroot="${wd}/twistedcaldav/test/data";
29
 
 
30
 
usage ()
31
 
{
32
 
  program="$(basename "$0")";
33
 
  echo "Usage: ${program} [-v] [-d docroot] [-s serverinfo]";
34
 
  echo "Options:";
35
 
  echo "        -h  Print this help and exit";
36
 
  echo "        -d  Set the document root";
37
 
  echo "        -s  Set the serverinfo.xml";
38
 
  echo "        -v  Verbose.";
39
 
 
40
 
  if [ "${1-}" == "-" ]; then return 0; fi;
41
 
  exit 64;
42
 
}
43
 
 
44
 
while getopts 'hvd:s:' option; do
45
 
  case "$option" in 
46
 
    '?') usage; ;;
47
 
    'h') usage -; exit 0; ;;
48
 
    'd') documentroot="${OPTARG}"; ;;
49
 
    's')   serverinfo="${OPTARG}"; ;;
50
 
    'v')      verbose="v"; ;;
51
 
  esac;
52
 
done;
53
 
 
54
 
shift $((${OPTIND} - 1));
55
 
 
56
 
if [ $# == 0 ]; then
57
 
  set - "--all";
58
 
fi;
59
 
 
60
 
##
61
 
# Do The Right Thing
62
 
##
63
 
 
64
 
export PYTHONPATH=$("${wd}/run" -p);
65
 
 
66
 
if [ ! -e "${documentroot}/calendars/__uids__/user01" ]; then
67
 
  curl "http://localhost:8008/calendars/__uids__/user01/";
68
 
fi;
69
 
 
70
 
python twistedcaldav/test/data/makelargecalendars.py -n 1 -d "${documentroot}";
71
 
 
72
 
cd "${cdt}" && python testcaldav.py -s "${serverinfo}" "$@";