Add the possibility to work without python virtualenv
Add new option "-v" which runs tests without python virtualenv Closes-Bug: #1377183 DocImpact: Add to the paragraph http://docs.mirantis.com/fuel-dev/devops.html#environment-creation-via-devops-fuel-main If using system_tests.sh without virtualenv please pass the option "-v". Change-Id: Ica5dc4ec3cefdae9246fbb88ce6e441bbcc75b4d
This commit is contained in:
parent
f1c16d552f
commit
7502d0f01d
|
@ -36,6 +36,7 @@ if you do need to override them.
|
||||||
Uses ENV_NAME variable is set.
|
Uses ENV_NAME variable is set.
|
||||||
-j (name) - Name of this job. Determines ISO name, Task name and used by tests.
|
-j (name) - Name of this job. Determines ISO name, Task name and used by tests.
|
||||||
Uses Jenkins' JOB_NAME if not set
|
Uses Jenkins' JOB_NAME if not set
|
||||||
|
-v - Do not use virtual environment
|
||||||
-V (dir) - Path to python virtual environment
|
-V (dir) - Path to python virtual environment
|
||||||
-i (file) - Full path to ISO file to build or use for tests.
|
-i (file) - Full path to ISO file to build or use for tests.
|
||||||
Made from iso dir and name if not set.
|
Made from iso dir and name if not set.
|
||||||
|
@ -128,10 +129,12 @@ GlobalVariables() {
|
||||||
# only show what commands would be executed but do nothing
|
# only show what commands would be executed but do nothing
|
||||||
# this feature is usefull if you want to debug this script's behaviour
|
# this feature is usefull if you want to debug this script's behaviour
|
||||||
DRY_RUN="${DRY_RUN:=no}"
|
DRY_RUN="${DRY_RUN:=no}"
|
||||||
|
|
||||||
|
VENV="${VENV:=yes}"
|
||||||
}
|
}
|
||||||
|
|
||||||
GetoptsVariables() {
|
GetoptsVariables() {
|
||||||
while getopts ":w:j:i:t:o:a:A:m:U:r:b:V:l:dkKe:h" opt; do
|
while getopts ":w:j:i:t:o:a:A:m:U:r:b:V:l:dkKe:v:h" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
w)
|
w)
|
||||||
WORKSPACE="${OPTARG}"
|
WORKSPACE="${OPTARG}"
|
||||||
|
@ -184,6 +187,9 @@ GetoptsVariables() {
|
||||||
d)
|
d)
|
||||||
DRY_RUN="yes"
|
DRY_RUN="yes"
|
||||||
;;
|
;;
|
||||||
|
v)
|
||||||
|
VENV="no"
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
ShowHelp
|
ShowHelp
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -364,10 +370,12 @@ RunTest() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run python virtualenv
|
# run python virtualenv
|
||||||
if [ "${DRY_RUN}" = "yes" ]; then
|
if [ "${VENV}" = "yes" ]; then
|
||||||
echo . $VENV_PATH/bin/activate
|
if [ "${DRY_RUN}" = "yes" ]; then
|
||||||
else
|
echo . $VENV_PATH/bin/activate
|
||||||
. $VENV_PATH/bin/activate
|
else
|
||||||
|
. $VENV_PATH/bin/activate
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ENV_NAME}" = "" ]; then
|
if [ "${ENV_NAME}" = "" ]; then
|
||||||
|
|
Loading…
Reference in New Issue