# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
-cd $repos_dir/functest
-git pull
mkdir -p /home/opnfv/functest/conf
config_file=/home/opnfv/functest/conf/config_functest.yaml
ONOS_REPO_DIR=$(cat $config_file | grep -w dir_repo_onos | awk 'END {print $NF}')
PROMISE_REPO_DIR=$(cat $config_file | grep -w dir_repo_promise | awk 'END {print $NF}')
OVNO_REPO_DIR=$(cat $config_file | grep -w dir_repo_ovno | awk 'END {print $NF}')
+DOCTOR_REPO_DIR=$(cat $config_file | grep -w dir_repo_doctor | 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}')
PROMISE_COMMIT=$(cat $config_file | grep -w promise_commit | awk 'END {print $NF}')
OVNO_BRANCH=$(cat $config_file | grep -w ovno_branch | awk 'END {print $NF}')
OVNO_COMMIT=$(cat $config_file | grep -w ovno_commit | awk 'END {print $NF}')
-
+DOCTOR_BRANCH=$(cat $config_file | grep -w doctor_branch | awk 'END {print $NF}')
+DOCTOR_COMMIT=$(cat $config_file | grep -w doctor_commit | awk 'END {print $NF}')
echo "_____Parsed needed data from ${config_file}:"
echo "####### Directories #######"
echo "PROMISE_COMMIT=${PROMISE_COMMIT}"
echo "OVNO_BRANCH=${OVNO_BRANCH}"
echo "OVNO_COMMIT=${OVNO_COMMIT}"
+echo "DOCTOR_BRANCH=${DOCTOR_BRANCH}"
+echo "DOCTOR_COMMIT=${DOCTOR_COMMIT}"
echo "############################"
info () {
git reset --hard ${OVNO_COMMIT}
fi
+ info "Updating DOCTOR repository...."
+ cd ${DOCTOR_REPO_DIR}
+ if [ ${DOCTOR_BRANCH} != "master" ]; then
+ info "DOCTOR repo: checkout ${DOCTOR} branch..."
+ git checkout ${DOCTOR_BRANCH}
+ fi
+ info "DOCTOR repo: pulling to latest..."
+ git pull
+ if [ ${DOCTOR_COMMIT} != "latest" ]; then
+ info "DOCTOR repo: given commit is ${DOCTOR_COMMIT}. Reseting..."
+ git reset --hard ${DOCTOR_COMMIT}
+ fi
fi
# We do this regardless if its online or offline mode.