summaryrefslogtreecommitdiffstats
path: root/tests/parser_install.sh
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-08-10 16:21:27 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2016-08-10 18:47:36 +0800
commitd2a7b7ffb4e45dd0803f01c9b5328b7cfba2c572 (patch)
tree0a9f824e53cb891517da15d48ac8dfc208882492 /tests/parser_install.sh
parent08bd9224fd482246180fc1c08396074cc13971f5 (diff)
Add parser install script for functest
As a tester; I want functest prepare the test env for parser; So it 's necessary to create parser_install.sh script for functest when building docker image. JIRA:PARSER-84 Change-Id: I3cc2cbba4d90b676ca362e54242f52afc3387e72 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tests/parser_install.sh')
-rwxr-xr-xtests/parser_install.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/parser_install.sh b/tests/parser_install.sh
new file mode 100755
index 0000000..48f07ac
--- /dev/null
+++ b/tests/parser_install.sh
@@ -0,0 +1,26 @@
+#!/bin/bash -e
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+parser_repos_dir=$1
+
+# start syslog for loghander
+service rsyslog restart && echo "syslog start successfully"
+
+# install requirements for parser
+pip install -r ${parser_repos_dir}/parser/tosca2heat/tosca-parser/requirements.txt
+pip install -r ${parser_repos_dir}/parser/tosca2heat/heat-translator/requirements.txt
+
+# uninstall other tosca-parser and heat-translator for parser
+pip uninstall -y tosca-parser
+pip uninstall -y heat-translator
+
+# install parser
+cd ${parser_repos_dir}/parser/tosca2heat/tosca-parser && python setup.py install
+cd ${parser_repos_dir}/parser/tosca2heat/heat-translator && python setup.py install