4979N/AUse the 'testgam' binary from workspace which is not shipped
4979N/Ain gamin package.
4979N/A
4979N/Aon terminal 1:
4979N/A==============
4979N/Amkdir /tmp/aha
4979N/AGAM_DEBUG= /usr/lib/gam_server --notimeout test
4979N/A
4979N/Aon terminal 2:
4979N/A==============
4979N/Atestgam -
4979N/A> connect test
4979N/A...
4979N/A> mondir /tmp/aha
4979N/A
4979N/Aon terminal 3:
4979N/A==============
4979N/Amkdir /tmp/aha/x
4979N/Atouch /tmp/aha/y
4979N/Armdir /tmp/aha/x
4979N/Arm /tmp/aha/y
4979N/A
4979N/AOn terminal 2 observe notifications about created and deleted entities.
4979N/A
4979N/A
4979N/AVerify that both 32 bit and 64 bit testgam binary works with
4979N/A64 bit gam_server.
4979N/A
4979N/A
4979N/A
4979N/A
4979N/APython bindings are tested by this program:
4979N/A
4979N/A------------------------------------->8----
4979N/A#!/usr/bin/env python
4979N/A
4979N/Aimport gamin
4979N/Aimport time
4979N/A
4979N/Adef callback(path, event):
4979N/A print "Got callback: %s, %s" % (path, event)
4979N/A
4979N/Amon = gamin.WatchMonitor()
4979N/Amon.watch_directory("/tmp/aha", callback)
4979N/Awhile True:
4979N/A time.sleep(1)
4979N/A ret = mon.event_pending()
4979N/A if ret > 0:
4979N/A ret = mon.handle_one_event()
4979N/A ret = mon.handle_events()
4979N/Amon.stop_watch("/tmp/aha")
4979N/Adel mon
4979N/A------------------------------------->8----
4979N/A
4979N/A$ pkill -9 -f gam_server # this will also test that gam_server is
4979N/A # spawned from the library when needed
4979N/A$ export GAM_CLIENT_ID=test
4979N/A$ /usr/bin/python2.7 /tmp/test.py
4979N/A
4979N/A# on second terminal create and delete files in /tmp/aha
4979N/A# and observe the test.py output
4979N/A
4979N/A$ pkill -9 -f gam_server
4979N/A$ /usr/bin/amd64/python2.7 /tmp/test.py # or sparcv9
4979N/A
4979N/A# on second terminal create and delete files in /tmp/aha
4979N/A# and observe the test.py output
4979N/A