From 11d8d4904b5346c8ca904e4a3723ddf5ba5bad8c Mon Sep 17 00:00:00 2001 From: boucherv Date: Wed, 28 Oct 2015 10:07:04 +0100 Subject: vIMS test integration and move "push_results_to_db" method Move "push_results_to_db" method to functest_util Updated some files for clearwater vIMS functional testing Change-Id: I21628b063470963e4e4425a0f89fefa33494e40d Signed-off-by: boucherv --- docker/Dockerfile | 9 +++++++++ docker/common.sh | 6 ++++++ docker/prepare_env.sh | 14 ++++++++++++++ 3 files changed, 29 insertions(+) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 59a262d20..836598a08 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,11 +29,13 @@ ENV repos_dir /home/opnfv/repos RUN apt-get update && apt-get install -y \ ssh \ sshpass \ +curl \ git \ gcc \ wget \ python-dev \ python-pip \ +bundler \ postgresql \ build-essential \ libpq-dev \ @@ -53,7 +55,14 @@ RUN git clone https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration +RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test ${repos_dir}/vims-test RUN pip install -r ${repos_dir}/functest/docker/requirements.pip +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN curl -L https://get.rvm.io | bash -s stable +RUN bash -c 'source /etc/profile.d/rvm.sh ; rvm autolibs enable ; rvm install 1.9.3 ; rvm use 1.9.3' +RUN bash -c 'source /etc/profile.d/rvm.sh ; cd ${repos_dir}/vims-test ; bundle install' + ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/ + diff --git a/docker/common.sh b/docker/common.sh index 42b7d3e09..8c02d4874 100755 --- a/docker/common.sh +++ b/docker/common.sh @@ -33,6 +33,7 @@ REPOS_DIR=$(cat $config_file | grep -w dir_repos | awk 'END {print $NF}') FUNCTEST_REPO_DIR=$(cat $config_file | grep -w dir_repo_functest | awk 'END {print $NF}') RALLY_REPO_DIR=$(cat $config_file | grep -w dir_repo_rally | awk 'END {print $NF}') RELENG_REPO_DIR=$(cat $config_file | grep -w dir_repo_releng | awk 'END {print $NF}') +VIMS_REPO_DIR=$(cat $config_file | grep -w dir_repo_vims_test | awk 'END {print $NF}') FUNCTEST_DIR=$(cat $config_file | grep -w dir_functest | awk 'END {print $NF}') FUNCTEST_RESULTS_DIR=$(cat $config_file | grep -w dir_results | awk 'END {print $NF}') @@ -47,6 +48,8 @@ FUNCTEST_BRANCH=$(cat $config_file | grep -w functest_branch | awk 'END {print $ FUNCTEST_COMMIT=$(cat $config_file | grep -w functest_commit | awk 'END {print $NF}') RELENG_BRANCH=$(cat $config_file | grep -w releng_branch | awk 'END {print $NF}') RELENG_COMMIT=$(cat $config_file | grep -w releng_commit | awk 'END {print $NF}') +VIMS_BRANCH=$(cat $config_file | grep -w vims_test_branch | awk 'END {print $NF}') +VIMS_COMMIT=$(cat $config_file | grep -w vims_test_commit | awk 'END {print $NF}') echo "_____Parsed needed data from ${config_file}:" echo "####### Directories #######" @@ -54,6 +57,7 @@ echo "REPOS_DIR=${REPOS_DIR}" echo "FUNCTEST_REPO_DIR=${FUNCTEST_REPO_DIR}" echo "RALLY_REPO_DIR=${RALLY_REPO_DIR}" echo "RELENG_REPO_DIR=${RELENG_REPO_DIR}" +echo "VIMS_REPO_DIR=${VIMS_REPO_DIR}" echo "FUNCTEST_DIR=${FUNCTEST_DIR}" echo "FUNCTEST_RESULTS_DIR=${FUNCTEST_RESULTS_DIR}" echo "FUNCTEST_CONF_DIR=${FUNCTEST_CONF_DIR}" @@ -66,6 +70,8 @@ echo "RELENG_BRANCH=${RELENG_BRANCH}" echo "RELENG_COMMIT=${RELENG_COMMIT}" echo "RALLY_BRANCH=${RALLY_BRANCH}" echo "RALLY_COMMIT=${RALLY_COMMIT}" +echo "VIMS_BRANCH=${VIMS_BRANCH}" +echo "VIMS_COMMIT=${VIMS_COMMIT}" echo "############################" info () { diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh index 42b1e1c43..6c77e8140 100755 --- a/docker/prepare_env.sh +++ b/docker/prepare_env.sh @@ -104,6 +104,20 @@ if [ $offline == false ]; then cd ${RALLY_REPO_DIR} info "Rally repo: pulling to latest..." git pull + + info "Updating vIMS test repository...." + cd ${VIMS_REPO_DIR} + if [ ${VIMS_BRANCH} != "stable" ]; then + info "Releng repo: checkout ${VIMS_TEST_BRANCH} branch..." + git checkout ${VIMS_BRANCH} + fi + info "vIMS test repo: pulling to latest..." + git pull + if [ ${VIMS_COMMIT} != "latest" ]; then + info "vIMS test repo: given commit is ${VIMS_TEST_COMMIT}. Reseting..." + git reset --hard ${VIMS_COMMIT} + fi + fi # We do this regardless if its online or offline mode. -- cgit 1.2.3-korg