[CalendarServer-changes] [1812] CalDAVTester/trunk/fsusage.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 20 19:38:41 PDT 2007
Revision: 1812
http://trac.macosforge.org/projects/calendarserver/changeset/1812
Author: cdaboo at apple.com
Date: 2007-08-20 19:38:41 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Use separate names for each temp file.
Modified Paths:
--------------
CalDAVTester/trunk/fsusage.py
Modified: CalDAVTester/trunk/fsusage.py
===================================================================
--- CalDAVTester/trunk/fsusage.py 2007-08-21 02:34:21 UTC (rev 1811)
+++ CalDAVTester/trunk/fsusage.py 2007-08-21 02:38:41 UTC (rev 1812)
@@ -36,8 +36,9 @@
-f file pid file of caldavd server
"""
-def getFSUsage(testscript, runs, pid, sname):
- fd = open("temp", "w")
+def getFSUsage(count, testscript, runs, pid, sname):
+ tmpfile = "temp.fsusage.%02d" % (count,)
+ fd = open(tmpfile, "w")
cid = subprocess.Popen(["fs_usage", "-f", "filesys", "%s" %(pid,),], stdout=fd).pid
pname = None
@@ -48,7 +49,7 @@
os.kill(cid, signal.SIGTERM)
- fd = open("temp", "r")
+ fd = open(tmpfile, "r")
ctr = 0
for line in fd:
ctr += 1
@@ -91,5 +92,5 @@
)
result = []
- for test in tests:
- print "%s\t%s" % (test[2], getFSUsage(test[0], test[1], pid, scriptsfile),)
+ for ctr, test in enumerate(tests):
+ print "%s\t%s" % (test[2], getFSUsage(ctr, test[0], test[1], pid, scriptsfile),)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070820/c22535eb/attachment.html
More information about the calendarserver-changes
mailing list