summaryrefslogtreecommitdiff
path: root/demoscript/book/freeze_filesystem.py
blob: 55f0f1d8764c1cf60c40bc18c570c787170c3836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

import sys, signal

def run(client, server):
    print "testing...",
    sys.stdout.flush()
    client.expect('Created Coleridge/Kubla_Khan')
    server.expect('added')
    client.expect('Contents of filesystem:')
    server.expect('added')
    server.expect('added')
    server.expect('locate')
    server.expect('locate')
    client.expect('Down to a sunless sea')
    server.expect('locate')
    client.expectall(['Destroying Coleridge', 'Destroying README'])
    server.expect('removed object')
    server.expect('removed object')
    client.waitTestSuccess()
    print "ok"

    server.kill(signal.SIGINT)
    server.waitTestSuccess()