[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819
Michael 'Mickey' Lauer
mickey at vanille-media.de
Sat Aug 6 08:18:39 UTC 2011
The following commit has been merged in the debian branch:
commit 0f4bccbe7181cfd34f9d9fb5ee8cd55e03c7d1e1
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Tue Nov 17 14:29:05 2009 +0100
testing: add 5 seconds blocking delay to all operations,
so that we can actually see whether client operations are
being carried out sync. or async.
diff --git a/framework/subsystems/testing/testing.py b/framework/subsystems/testing/testing.py
index e0af4d7..3a368c6 100644
--- a/framework/subsystems/testing/testing.py
+++ b/framework/subsystems/testing/testing.py
@@ -2,7 +2,7 @@
"""
Dummy Subsystem for Testing Purposes
-(C) 2008 Michael 'Mickey' Lauer <mlauer at vanille-media.de>
+(C) 2008-2009 Michael 'Mickey' Lauer <mlauer at vanille-media.de>
(C) 2008 Openmoko, Inc.
GPLv2 or later
@@ -22,6 +22,8 @@ import gobject
import logging
logger = logging.getLogger( MODULE_NAME )
+import time
+
DBUS_INTERFACE = "org.freesmartphone.Testing"
DBUS_OBJECT_PATH = "/org/freesmartphone/Testing"
@@ -46,18 +48,22 @@ class Resource( resource.Resource ):
#
def _enable( self, on_ok, on_error ):
logger.info( "enabling" )
+ time.sleep( 5.0 )
self._doit( "enabling", on_ok, on_error )
def _disable( self, on_ok, on_error ):
logger.info( "disabling" )
+ time.sleep( 5.0 )
self._doit( "disabling", on_ok, on_error )
def _suspend( self, on_ok, on_error ):
logger.info( "suspending" )
+ time.sleep( 5.0 )
self._doit( "suspending", on_ok, on_error )
def _resume( self, on_ok, on_error ):
logger.info("resuming")
+ time.sleep( 5.0 )
self._doit( "resuming", on_ok, on_error )
def _doit( self, category, on_ok, on_error ):
@@ -75,6 +81,7 @@ class Resource( resource.Resource ):
#
@dbus.service.method( DBUS_INTERFACE, "", "",
async_callbacks=( "dbus_ok", "dbus_error" ) )
+ @resource.checkedmethod
def SetResourceBehaviour( self, category, behaviour, dbus_ok, dbus_error ):
try:
value = self.catmap[category]
@@ -88,12 +95,14 @@ class Resource( resource.Resource ):
@dbus.service.method( DBUS_INTERFACE, "", "aa{sv}",
async_callbacks=( "dbus_ok", "dbus_error" ) )
+ @resource.checkedmethod
def ReturnTest( self, dbus_ok, dbus_error ):
d = {"foo":"bar"}
dbus_ok( [d,d] )
@dbus.service.method( DBUS_INTERFACE, "", "",
async_callbacks=( "dbus_ok", "dbus_error" ) )
+ @resource.checkedmethod
def SignalTest( self, dbus_ok, dbus_error ):
self.Test( dict(yo="kurt") )
dbus_ok()
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list