Skip to content
Newer
Older
100755 34 lines (28 sloc) 830 Bytes
3a422da adding a new test
BuzzTroll authored Aug 17, 2010
1 #!/usr/bin/env python
2
3 import pexpect
4 import sys
5 import os
6
b354f65 changing timeouts in cloud-client tests. NMI is exceeding
BuzzTroll authored Sep 24, 2010
7 to=90
3a422da adding a new test
BuzzTroll authored Aug 17, 2010
8 cc_home=os.environ['CLOUD_CLIENT_HOME']
9 logfile = sys.stdout
10
11 cmd = "%s/bin/cloud-client.sh --transfer --sourcefile /etc/group" % (cc_home)
12 (x, rc)=pexpect.run(cmd, withexitstatus=1)
13
14 cmd = "%s/bin/cloud-client.sh --run --name group --hours .25" % (cc_home)
b354f65 changing timeouts in cloud-client tests. NMI is exceeding
BuzzTroll authored Sep 24, 2010
15 child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
3a422da adding a new test
BuzzTroll authored Aug 17, 2010
16 rc = child.expect ('Running:')
17 if rc != 0:
18 print "group not found in the list"
19 sys.exit(1)
20 handle = child.readline().strip().replace("'", "")
21 rc = child.expect(pexpect.EOF)
22 if rc != 0:
23 print "run"
24 sys.exit(1)
25
ee6e859 simple submit and destroy test
BuzzTroll authored Aug 17, 2010
26 cmd = "%s/bin/cloud-client.sh --terminate --handle %s" % (cc_home, handle)
27 print cmd
28 (x, rc)=pexpect.run(cmd, withexitstatus=1)
3a422da adding a new test
BuzzTroll authored Aug 17, 2010
29 print x
30 if rc != 0:
31 print "failed to terminate"
32 sys.exit(1)
33 sys.exit(0)
Something went wrong with that request. Please try again.