forked from TrueCloudLab/frostfs-testcases
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
0d86352cbe
commit
5485238ca5
6 changed files with 26 additions and 16 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "neofs-keywords"]
|
||||||
|
path = neofs-keywords
|
||||||
|
url = ssh://git@github.com/nspcc-dev/neofs-keywords.git
|
4
Makefile
4
Makefile
|
@ -23,6 +23,10 @@ venvs:
|
||||||
|
|
||||||
$(foreach venv,$(VENVS),$(eval $(call VENV_template,$(venv))))
|
$(foreach venv,$(VENVS),$(eval $(call VENV_template,$(venv))))
|
||||||
|
|
||||||
|
submodules:
|
||||||
|
@git submodule init
|
||||||
|
@git submodule update --recursive --remote
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf venv.*
|
rm -rf venv.*
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
diff -urN bin.orig/activate bin/activate
|
diff -urN bin.orig/activate bin/activate
|
||||||
--- bin.orig/activate 2018-12-27 14:55:13.916461020 +0900
|
--- bin.orig/activate 2018-12-27 14:55:13.916461020 +0900
|
||||||
+++ bin/activate 2018-12-27 20:38:35.223248728 +0900
|
+++ bin/activate 2018-12-27 20:38:35.223248728 +0900
|
||||||
@@ -30,6 +30,10 @@
|
@@ -30,6 +30,15 @@
|
||||||
unset _OLD_VIRTUAL_PS1
|
unset _OLD_VIRTUAL_PS1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+ # Uset external env variables
|
+ # Unset exported dev-env variables
|
||||||
|
+ pushd ${DEVENV_PATH} > /dev/null
|
||||||
|
+ unset `make env | awk -F= '{print $1}'`
|
||||||
|
+ popd > /dev/null
|
||||||
|
+
|
||||||
|
+ # Unset external env variables
|
||||||
+ declare -f env_deactivate > /dev/null && env_deactivate
|
+ declare -f env_deactivate > /dev/null && env_deactivate
|
||||||
+ declare -f venv_deactivate > /dev/null && venv_deactivate
|
+ declare -f venv_deactivate > /dev/null && venv_deactivate
|
||||||
+
|
+
|
||||||
unset VIRTUAL_ENV
|
unset VIRTUAL_ENV
|
||||||
if [ ! "${1-}" = "nondestructive" ] ; then
|
if [ ! "${1-}" = "nondestructive" ] ; then
|
||||||
# Self destruct!
|
# Self destruct!
|
||||||
@@ -47,6 +51,11 @@
|
@@ -47,6 +56,11 @@
|
||||||
PATH="$VIRTUAL_ENV/bin:$PATH"
|
PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
+# Set external variables
|
+# Set external variables
|
||||||
+if [ -f ${VIRTUAL_ENV}/bin/environment.sh ] ; then
|
+if [ -f ${VIRTUAL_ENV}/bin/environment.sh ] ; then
|
||||||
+ . ${VIRTUAL_ENV}/bin/environment.sh
|
+ . ${VIRTUAL_ENV}/bin/environment.sh
|
||||||
|
|
1
neofs-keywords
Submodule
1
neofs-keywords
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 2e36e9144dcbbaaa0e5add41fcf2307fdfc063fd
|
|
@ -1,8 +1,8 @@
|
||||||
# DevEnv variables
|
# DevEnv variables
|
||||||
export NEOFS_MORPH_DISABLE_CACHE=true
|
export NEOFS_MORPH_DISABLE_CACHE=true
|
||||||
export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../neofs-dev-env}"
|
export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../neofs-dev-env}"
|
||||||
pushd $DEVENV_PATH
|
pushd $DEVENV_PATH > /dev/null
|
||||||
export `make env`
|
export `make env`
|
||||||
popd
|
popd > /dev/null
|
||||||
|
|
||||||
export PYTHONPATH=${PYTHONPATH}:${VIRTUAL_ENV}/neofs-keywords/lib:${VIRTUAL_ENV}/neofs-keywords/robot:${VIRTUAL_ENV}/../robot/resources/lib/python:${VIRTUAL_ENV}/../robot/resources/lib/robot:${VIRTUAL_ENV}/../robot/variables
|
export PYTHONPATH=${PYTHONPATH}:${VIRTUAL_ENV}/../neofs-keywords/lib:${VIRTUAL_ENV}/../neofs-keywords/robot:${VIRTUAL_ENV}/../robot/resources/lib/python:${VIRTUAL_ENV}/../robot/resources/lib/robot:${VIRTUAL_ENV}/../robot/variables
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
define VENV_template
|
define VENV_template
|
||||||
venv.$(1): venv.$(1)/bin/activate venv.$(1)/bin/environment.sh
|
venv.$(1): venv.$(1)/bin/activate venv.$(1)/bin/environment.sh
|
||||||
|
|
||||||
venv.$(1)/bin/activate: venv/$(1)/requirements.txt
|
venv.$(1)/bin/activate: venv/$(1)/requirements.txt submodules
|
||||||
@echo "Creating $(1) venv in $$@ from $$<"
|
@echo "Creating $(1) venv in $$@ from $$<"
|
||||||
virtualenv --python=python3.8 --prompt="($(1))" venv.$(1)
|
virtualenv --python=python3.8 --prompt="($(1))" venv.$(1)
|
||||||
source venv.$(1)/bin/activate && \
|
source venv.$(1)/bin/activate && \
|
||||||
pip3.8 install -Ur venv/$(1)/requirements.txt
|
pip3.8 install -Ur venv/$(1)/requirements.txt && \
|
||||||
@echo "Cloning keywords repo"
|
pip3.8 install -Ur neofs-keywords/requirements.txt
|
||||||
git clone $(KEYWORDS_REPO) venv.$(1)/neofs-keywords
|
|
||||||
source venv.$(1)/bin/activate && \
|
|
||||||
pip3.8 install -Ur venv.$(1)/neofs-keywords/requirements.txt
|
|
||||||
@echo "Applying activate script patch"
|
@echo "Applying activate script patch"
|
||||||
patch -R --dry-run -p1 -s -f -d venv.$(1)/bin/ < build_assets/activate.patch || \
|
patch -R --dry-run -p1 -s -f -d venv.$(1)/bin/ < build_assets/activate.patch || \
|
||||||
patch -p1 -d venv.$(1)/bin/ < build_assets/activate.patch
|
patch -p1 -d venv.$(1)/bin/ < build_assets/activate.patch
|
||||||
|
|
Loading…
Reference in a new issue