Create test owner for presence service

This owner changes properties periodically so we can test out the PS's handling
of property changes.  To execute, run Sugar and then make sure that the D-Bus
address is the one sugar is using (get it from ~/.sugar/default/session.info).
Then run:

build/bin/sugar-presence-service X

where X is a number 1 -> 9 inclusive.  It will generate fake buddy info for that
test buddy and then start up a presence service for that buddy, changing a random
property of the buddy every 10 seconds.
This commit is contained in:
Dan Williams
2007-04-11 22:49:14 -04:00
parent 894fcea9fc
commit 162a87f882
4 changed files with 306 additions and 64 deletions
+10 -1
View File
@@ -32,4 +32,13 @@ import presenceservice
logging.info('Starting presence service')
presenceservice.main()
test=0
if len(sys.argv) > 1:
try:
test = int(sys.argv[1])
except ValueError:
logging.debug("Bad test user number.")
if test < 1 or test > 10:
logging.debug("Bad test user number.")
presenceservice.main(test)