[CalendarServer-changes] [11427] CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/ python
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 26 01:18:48 PDT 2013
Revision: 11427
http://trac.calendarserver.org//changeset/11427
Author: glyph at apple.com
Date: 2013-06-26 01:18:48 -0700 (Wed, 26 Jun 2013)
Log Message:
-----------
Much better failure.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/launchd.py
CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/test/test_launchd.py
Modified: CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/launchd.py
===================================================================
--- CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/launchd.py 2013-06-26 08:18:27 UTC (rev 11426)
+++ CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/launchd.py 2013-06-26 08:18:48 UTC (rev 11427)
@@ -21,6 +21,8 @@
from __future__ import print_function
+import sys
+
from cffi import FFI
ffi = FFI()
@@ -221,11 +223,9 @@
@return: a C{dict}-like object.
"""
- return _launchify(
- (lib.launch_msg(
- (lib.launch_data_new_string(lib.LAUNCH_KEY_CHECKIN))
- ))
- )
+ lkey = lib.launch_data_new_string(lib.LAUNCH_KEY_CHECKIN)
+ msgr = lib.launch_msg(lkey)
+ return _launchify(msgr)
Modified: CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/test/test_launchd.py
===================================================================
--- CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/test/test_launchd.py 2013-06-26 08:18:27 UTC (rev 11426)
+++ CalendarServer/branches/users/glyph/launchd-wrapper-bis/twext/python/test/test_launchd.py 2013-06-26 08:18:48 UTC (rev 11427)
@@ -255,14 +255,17 @@
env = dict(os.environ)
env["TESTING_PORT"] = repr(port.getHost().port)
self.stdout = fp.child("stdout.txt")
+ self.stderr = fp.child("stderr.txt")
plist = {
"Label": "org.calendarserver.UNIT-TESTS." + repr(os.getpid()),
"ProgramArguments": [sys.executable, "-m", __name__, self.id()],
"EnvironmentVariables": env,
"KeepAlive": False,
"StandardOutPath": self.stdout.path,
- "StandardErrorPath": fp.child("stderr.txt").path,
- "Sockets": [{"SecureSocketWithKey": "GeneratedSocket"}],
+ "StandardErrorPath": self.stderr.path,
+ "Sockets": {
+ "Awesome": [{"SecureSocketWithKey": "GeneratedSocket"}]
+ },
"RunAtLoad": True,
}
self.job = fp.child("job.plist")
@@ -307,4 +310,8 @@
def tearDown(self):
os.spawnlp(os.P_WAIT, "launchctl", "launchctl", "unload", self.job.path)
+ err = self.stderr.getContent()
+ if 'Traceback' in err:
+ self.fail(err)
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130626/0849b619/attachment-0001.html>
More information about the calendarserver-changes
mailing list