Permalink
Browse files

using the image determined by env

  • Loading branch information...
1 parent 9921a92 commit 9c735f4196251475b60be10466202f0cb40dfa61 @buzztroll buzztroll committed Nov 21, 2011
Showing with 10 additions and 7 deletions.
  1. +8 −5 tests/cc-nimbusNodesAlloc-test.py
  2. +1 −1 tests/cc-submit-common-unprop-size-test.py
  3. +1 −1 tests/cc-unprop-md5test.py
@@ -4,9 +4,12 @@
import sys
import os
-to=90
+to=int(os.environ["NIMBUS_TEST_TIMEOUT"])
cc_home=os.environ['CLOUD_CLIENT_HOME']
nimbus_home=os.environ['NIMBUS_HOME']
+tst_image_name = os.environ['NIMBUS_TEST_IMAGE']
+tst_image_src = os.environ['NIMBUS_SOURCE_TEST_IMAGE']
+
logfile = sys.stdout
try:
@@ -15,14 +18,14 @@
print "The directory already exists"
pass
-cmd = "%s/bin/cloud-client.sh --transfer --sourcefile /etc/group" % (cc_home)
+cmd = "%s/bin/cloud-client.sh --transfer --sourcefile %s" % (cc_home, tst_image_src)
(x, rc)=pexpect.run(cmd, withexitstatus=1)
-cmd = "%s/bin/cloud-client.sh --run --name group --hours .25" % (cc_home)
+cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25" % (cc_home, tst_image_name)
child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
rc = child.expect ('Running:')
if rc != 0:
- print "group not found in the list"
+ print "%s not found in the list" % (tst_image_name)
sys.exit(1)
handle = child.readline().strip().replace("'", "")
rc = child.expect(pexpect.EOF)
@@ -78,7 +81,7 @@
print "error"
sys.exit(1)
-cmd = "%s/bin/cloud-client.sh --delete --name group" % (cc_home)
+cmd = "%s/bin/cloud-client.sh --delete --name %s" % (cc_home, tst_image_name)
(x, rc)=pexpect.run(cmd, withexitstatus=1)
if rc != 0:
print "error"
@@ -25,7 +25,7 @@
sys.exit(1)
cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25" % (cc_home, common_image)
-child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile, timeout=to)
+child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
rc = child.expect ('Running:')
if rc != 0:
print "Running not found in the list"
@@ -31,7 +31,7 @@
(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25" % (cc_home, image_name)
- child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile, timeout=to)
+ child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
rc = child.expect ('Running:')
if rc != 0:
print "Running: not found in the list"

0 comments on commit 9c735f4

Please sign in to comment.