2 # **********************************************************************
4 # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
6 # This copy of Ice is licensed to you under the terms described in the
7 # ICE_LICENSE file included in this distribution.
9 # **********************************************************************
13 path
= [ ".", "..", "../..", "../../..", "../../../.." ]
14 head
= os
.path
.dirname(sys
.argv
[0])
16 path
= [os
.path
.join(head
, p
) for p
in path
]
17 path
= [os
.path
.abspath(p
) for p
in path
if os
.path
.exists(os
.path
.join(p
, "scripts", "TestUtil.py")) ]
19 raise "can't find toplevel directory!"
20 sys
.path
.append(os
.path
.join(path
[0]))
23 testdir
= os
.path
.dirname(os
.path
.abspath(__file__
))
26 # Clean the contents of the database directory.
28 dbdir
= os
.path
.join(os
.getcwd(), "db")
29 TestUtil
.cleanDbDir(dbdir
)
31 client
= os
.path
.join(os
.getcwd(), "client")
33 if TestUtil
.appverifier
:
34 TestUtil
.setAppVerifierSettings([client
])
36 print "starting populate...",
37 populateProc
= TestUtil
.startClient(client
, ' --dbdir "%s" populate' % os
.getcwd(), startReader
= False)
39 populateProc
.startReader()
40 populateProc
.waitTestSuccess()
42 print "starting verification client...",
43 clientProc
= TestUtil
.startClient(client
, ' --dbdir "%s" validate' % os
.getcwd(), startReader
= False)
45 clientProc
.startReader()
46 clientProc
.waitTestSuccess()
48 if TestUtil
.appverifier
:
49 TestUtil
.appVerifierAfterTestEnd([client
])