提交 e4a3fe0d 编写于 作者: J Jacob Champion 提交者: Kalen Krempely

CLI code coverage: install requirements-dev.txt across all hosts

This installs the requirements for each host in a ccp cluster, and on
a demo cluster. For the demo cluster, it copies the Python requirements
that are first installed into a temporary virtual env into the vendored Python
stack. For ccp clusters, it copies the Python libraries from the virtual
env on mdw to each host including mdw that is in hostfile_all.
Co-authored-by: NKalen Krempely <kkrempely@pivotal.io>
Co-authored-by: NNikolaos Kalampalikis <nkalampalikis@pivotal.io>
上级 b5770c13
......@@ -54,17 +54,19 @@ function gen_env(){
--python /usr/local/greenplum-db-devel/ext/python/bin/python /tmp/venv
fi
# activate virtualenv after sourcing greenplum_path, so that virtualenv
# takes precedence
source /usr/local/greenplum-db-devel/greenplum_path.sh
# Install requirements into the vendored Python stack.
mkdir -p /tmp/py-requirements
source /tmp/venv/bin/activate
pip install --prefix /tmp/py-requirements -r "\${1}/gpdb_src/gpMgmt/requirements-dev.txt"
cp -r /tmp/py-requirements/* /usr/local/greenplum-db-devel/ext/python/
deactivate
source /usr/local/greenplum-db-devel/greenplum_path.sh
cd "\${1}/gpdb_src/gpAux"
source gpdemo/gpdemo-env.sh
cd "\${1}/gpdb_src/gpMgmt/"
pip install -r requirements-dev.txt
BEHAVE_TAGS="${BEHAVE_TAGS}"
BEHAVE_FLAGS="${BEHAVE_FLAGS}"
if [ ! -z "\${BEHAVE_TAGS}" ]; then
......
......@@ -22,6 +22,14 @@ patchelf \
virtualenv \
--python /usr/local/greenplum-db-devel/ext/python/bin/python /tmp/venv
# Install requirements into the vendored Python stack on all hosts.
mkdir -p /tmp/py-requirements
source /tmp/venv/bin/activate
pip install --prefix /tmp/py-requirements -r /home/gpadmin/gpdb_src/gpMgmt/requirements-dev.txt
while read host; do
rsync -rz /tmp/py-requirements/ $host:/usr/local/greenplum-db-devel/ext/python/
done < /tmp/hostfile_all
deactivate
cat > ~/gpdb-env.sh << EOF
source /usr/local/greenplum-db-devel/greenplum_path.sh
......@@ -39,10 +47,5 @@ if gpstate > /dev/null 2>&1 ; then
gpstop -u
fi
# activate virtualenv after sourcing greenplum_path, so that virtualenv takes
# precedence
source /tmp/venv/bin/activate
cd /home/gpadmin/gpdb_src/gpMgmt
pip install -r requirements-dev.txt
make -f Makefile.behave behave flags="$BEHAVE_FLAGS"
......@@ -27,4 +27,6 @@ run:
fi
'"
# TODO: ask CCP maintainers for a feature to do this for us
scp cluster_env_files/hostfile_all mdw:/tmp
ssh -t mdw "$CUSTOM_ENV bash /home/gpadmin/gpdb_src/concourse/scripts/run_behave_test.sh \"$BEHAVE_FLAGS\""
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册