summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2016-10-13 23:40:31 -0400
committerMatthewLi <matthew.lijun@huawei.com>2016-10-13 23:43:21 -0400
commitcfd1ea69a8815e4063aea10676601ce1ab39c6af (patch)
treeaf708c2ceea7e5d1384d8d1a08fec586919365f7
parent156f661735f3ae8483f84c3464bb2a7311555ff4 (diff)
dovetail tool: unittest added
JIRA: DOVETAIL-14 this should be merged after https://gerrit.opnfv.org/gerrit/#/c/23135/ Change-Id: I9bb341c4c4de454ba9246c435e169d948205d2ba Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
-rw-r--r--jjb/dovetail/dovetail-project-jobs.yml35
-rwxr-xr-xjjb/dovetail/dovetail-run.sh2
2 files changed, 30 insertions, 7 deletions
diff --git a/jjb/dovetail/dovetail-project-jobs.yml b/jjb/dovetail/dovetail-project-jobs.yml
index bf0552251..41fd8cdcb 100644
--- a/jjb/dovetail/dovetail-project-jobs.yml
+++ b/jjb/dovetail/dovetail-project-jobs.yml
@@ -57,9 +57,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
builders:
- - shell: |
- echo "dovetail: verify job"
- #unittest will be added future
+ - dovetail-unit-tests
- job-template:
name: 'dovetail-merge-{stream}'
@@ -93,6 +91,31 @@
branch-pattern: '**/{branch}'
builders:
- - shell: |
- echo "dovetail: merge"
- #unittest will be added future
+ - dovetail-unit-tests
+
+################################
+#builders for dovetail project
+###############################
+- builder:
+ name: dovetail-unit-tests
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o pipefail
+
+ echo "Running unit tests..."
+ cd $WORKSPACE
+ virtualenv $WORKSPACE/dovetail_venv
+ source $WORKSPACE/dovetail_venv/bin/activate
+
+ #packages installation
+ easy_install -U setuptools
+ easy_install -U pip
+ pip install -r unittests/requirements.txt
+ pip install -e .
+
+ #unit tests
+ /bin/bash $WORKSPACE/unittests/unittest.sh
+
+ deactivate
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index f7a965575..098b7db0c 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -48,7 +48,7 @@ docker pull opnfv/dovetail:$DOCKER_TAG >$redirect
# Run docker
echo "Dovetail: docker running..."
sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/dovetail:${DOCKER_TAG} \
-"/home/opnfv/dovetail/scripts/run.py"
+"/home/opnfv/dovetail/dovetail/run.py"
echo "Dovetail: store results..."
sudo cp -r /home/opnfv/dovetail/results ./