[CalendarServer-changes] [5614] CalDAVTester/trunk/src/manager.py

source_changes at macosforge.org source_changes at macosforge.org
Tue May 18 13:58:52 PDT 2010


Revision: 5614
          http://trac.macosforge.org/projects/calendarserver/changeset/5614
Author:   cdaboo at apple.com
Date:     2010-05-18 13:58:50 -0700 (Tue, 18 May 2010)
Log Message:
-----------
Allow targeting a specific sub-directory of tests.

Modified Paths:
--------------
    CalDAVTester/trunk/src/manager.py

Modified: CalDAVTester/trunk/src/manager.py
===================================================================
--- CalDAVTester/trunk/src/manager.py	2010-05-18 20:38:50 UTC (rev 5613)
+++ CalDAVTester/trunk/src/manager.py	2010-05-18 20:58:50 UTC (rev 5614)
@@ -140,9 +140,10 @@
         fnames = []
         all = False
         excludes = set()
+        subdir = None
         pidfile = "../CalendarServer/logs/caldavd.pid"
         random_order = False
-        options, args = getopt.getopt(sys.argv[1:], "s:p:dmx:", ["all", "exclude=", "pid=", "random"])
+        options, args = getopt.getopt(sys.argv[1:], "s:p:dmx:", ["all", "subdir=", "exclude=", "pid=", "random"])
         
         # Process single options
         for option, value in options:
@@ -156,6 +157,8 @@
                 dname = value
             elif option == "--all":
                 all = True
+            elif option == "--subdir":
+                subdir = value + "/"
             elif option == "--exclude":
                 excludes.add(value)
             elif option == "-m":
@@ -169,8 +172,9 @@
             files = []
             os.path.walk(dname, lambda arg,dir,names:files.extend([os.path.join(dir, name) for name in names]), None)
             for file in files:
-                if file.endswith(".xml") and file not in excludes:
-                    fnames.append(file)
+                if file.endswith(".xml") and file[len(dname)+1:] not in excludes:
+                    if subdir is None or file[len(dname)+1:].startswith(subdir):
+                        fnames.append(file)
 
         # Remove any server info file from files enumerated by --all
         fnames[:] = [x for x in fnames if (x != sname) and (not pname or (x != pname))]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100518/c6645a33/attachment-0001.html>


More information about the calendarserver-changes mailing list