aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-26 14:28:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-26 14:28:34 +0000
commit68852eae675fb232ae5ed870227c38aa40ff3a7a (patch)
tree1889cc63dfbeb56170e3ae3253b408008c7f5b0b
parentbfb0c42f367746c8d32381192aab5512dd213c19 (diff)
parentc08fa5882b111a65ebcf121b66d5107d481b66fd (diff)
Merge "Add function for Promise libraries pre-install"
-rw-r--r--docker/Dockerfile2
-rwxr-xr-xdocker/run_tests.sh2
-rwxr-xr-xtestcases/config_functest.py27
3 files changed, 20 insertions, 11 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 45aa05c7..3c5a2a65 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -54,8 +54,6 @@ libxml2-dev \
libffi-dev \
crudini \
ruby1.9.1-dev \
-npm \
-nodejs \
--no-install-recommends
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 50a1296c..bf68612f 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -165,7 +165,7 @@ test/csit/suites/vpnservice
;;
"promise")
info "Running PROMISE test case..."
- python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py --debug all ${report}
+ python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py --debug ${report}
clean_openstack
;;
"doctor")
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index 973c8a38..d1a19760 100755
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -133,14 +133,7 @@ def action_start():
cmd = "/bin/bash -c '" + script + "'"
functest_utils.execute_command(cmd, logger = logger_debug, exit_on_error=False)
-
- logger.info("Installing dependencies for Promise testcase...")
- cmd = 'npm install -g yangforge'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
-
- shutil.copy2(REPOS_DIR+'/promise/package.json',FUNCTEST_REPO+'/testcases/features/package.json')
- cmd = 'npm install'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
+ install_promise(logger_debug)
# Create result folder under functest if necessary
if not os.path.exists(RALLY_RESULT_DIR):
@@ -261,6 +254,24 @@ def install_rally():
return True
+def install_promise(logger_debug):
+ logger.info("Installing dependencies for Promise testcase...")
+ current_dir = os.getcwd()
+ os.chdir(REPOS_DIR+'/promise/')
+
+ cmd = 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -'
+ functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
+
+ cmd = 'sudo apt-get install -y nodejs'
+ functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
+
+ cmd = 'sudo npm -g install npm@latest'
+ functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
+
+ cmd = 'npm install'
+ functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
+ os.chdir(current_dir)
+
def check_rally():
"""