Merge "config info for different testcase in vstf"
authoryaoguang wang <sunshine.wang@huawei.com>
Mon, 6 Jun 2016 00:08:53 +0000 (00:08 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Mon, 6 Jun 2016 00:08:53 +0000 (00:08 +0000)
testsuites/rubbos/run_rubbos.py
testsuites/vstf/run_vstf.py

index afe653f..455b3e5 100755 (executable)
@@ -375,8 +375,8 @@ def main():
         print "Cannot create instances, as Failed to create image(s)."
         exit (-1)
 
-    print "Wait 300 seconds after stack creation..."
-    time.sleep(300)
+    print "Wait 600 seconds after stack creation..."
+    time.sleep(600)
 
     #reboot_instances()
     #time.sleep(180)
index 1529264..0849061 100755 (executable)
@@ -191,15 +191,25 @@ def get_instances(nova_client):
         print "Error [get_instances(nova_client)]:", e
         return None
 
-def vstf_run():
+def vstf_run(launch_file=None, test_file=None):
     print "================run vstf==============="
 
     nova = _get_nova_client()
     print(nova.servers.list())
+    time.sleep(100)
     instances = get_instances(nova)
     if instances == None:
         print "Found *None* instances, exit vstf_run()!"
         return False
+    if launch_file == None or test_file == None:
+         print "Error, vstf launch/test file not given"
+         return False
+    cmd = "bash " + launch_file
+    subprocess.call(cmd, shell=True)
+    time.sleep(50)
+    cmd = "bash " + test_file
+    subprocess.call(cmd, shell=True)
+    time.sleep(20)
 
 def main():
 
@@ -256,7 +266,9 @@ def main():
     print "Wait 100 seconds after stack creation..."
     time.sleep(100)
 
-    vstf_run()
+    launchfile = Bottlenecks_repo_dir + "/utils/infra_setup/heat_template/vstf_heat_template/launch_vstf.sh"
+    testfile = Bottlenecks_repo_dir + "utils/infra_setup/heat_template/vstf_heat_template/test_vstf.sh"
+    vstf_run(launch_file=launchfile, test_file=testfile)
 
     vstf_env_cleanup()