Ensure that ruby libraries was installed before running vims test-case
authorboucherv <valentin.boucher@orange.com>
Mon, 4 Jan 2016 10:36:18 +0000 (11:36 +0100)
committerboucherv <valentin.boucher@orange.com>
Mon, 4 Jan 2016 10:36:18 +0000 (11:36 +0100)
Change-Id: Ice896c37fc28e01f260cd617ee4c38d323607bb5
Signed-off-by: boucherv <valentin.boucher@orange.com>
testcases/config_functest.py

index 20d3a9d..5af2975 100755 (executable)
@@ -55,6 +55,7 @@ RALLY_REPO_DIR = functest_yaml.get("general").get("directories").get("dir_repo_r
 RALLY_INSTALLATION_DIR = functest_yaml.get("general").get("directories").get("dir_rally_inst")
 RALLY_RESULT_DIR = functest_yaml.get("general").get("directories").get("dir_rally_res")
 VPING_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_vping")
+VIMS_TEST_DIR = functest_yaml.get("general").get("directories").get("dir_repo_vims_test")
 ODL_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_odl")
 DATA_DIR = functest_yaml.get("general").get("directories").get("dir_functest_data")
 
@@ -114,6 +115,14 @@ def action_start():
             action_clean()
             exit(-1)
 
+        # Install ruby libraries for vims test-case
+        script += 'source /etc/profile.d/rvm.sh; '
+        script += 'cd ' + VIMS_TEST_DIR + '; '
+        script += 'bundle install'
+
+        cmd = "/bin/bash -c '" + script + "'"
+        functest_utils.execute_command(cmd,logger)
+
         # Create result folder under functest if necessary
         if not os.path.exists(RALLY_RESULT_DIR):
             os.makedirs(RALLY_RESULT_DIR)