summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--docs/jenkins-job-builder/opnfv-jjb-usage.rst8
-rw-r--r--jjb/test-requirements.txt1
-rw-r--r--modules/requirements.txt3
-rw-r--r--modules/test-requirements.txt6
-rw-r--r--setup.py9
-rw-r--r--tox.ini34
7 files changed, 62 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 431e52139..eeabaeb63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,4 @@ testapi_venv/
.cache
.tox
*.retry
+job_output/
diff --git a/docs/jenkins-job-builder/opnfv-jjb-usage.rst b/docs/jenkins-job-builder/opnfv-jjb-usage.rst
index 52dbdebe5..f34833f5c 100644
--- a/docs/jenkins-job-builder/opnfv-jjb-usage.rst
+++ b/docs/jenkins-job-builder/opnfv-jjb-usage.rst
@@ -21,6 +21,14 @@ Make changes::
To ssh://agardner@gerrit.opnfv.org:29418/releng.git
* [new branch] HEAD -> refs/publish/master
+Test with tox::
+
+ tox -v -ejjb
+
+Submit the change to gerrit::
+
+ git review -v
+
Follow the link to gerrit https://gerrit.opnfv.org/gerrit/51 in a few moments
the verify job will have completed and you will see Verified +1 jenkins-ci in
the gerrit ui.
diff --git a/jjb/test-requirements.txt b/jjb/test-requirements.txt
new file mode 100644
index 000000000..6b700dcfc
--- /dev/null
+++ b/jjb/test-requirements.txt
@@ -0,0 +1 @@
+jenkins-job-builder
diff --git a/modules/requirements.txt b/modules/requirements.txt
new file mode 100644
index 000000000..1eaf8d089
--- /dev/null
+++ b/modules/requirements.txt
@@ -0,0 +1,3 @@
+paramiko>=2.0.1
+mock==1.3.0
+requests==2.9.1
diff --git a/modules/test-requirements.txt b/modules/test-requirements.txt
new file mode 100644
index 000000000..99d7f1313
--- /dev/null
+++ b/modules/test-requirements.txt
@@ -0,0 +1,6 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+
+nose
+coverage
diff --git a/setup.py b/setup.py
new file mode 100644
index 000000000..2d9246ec4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+setup(
+ name="opnfv",
+ version="master",
+ url="https://www.opnfv.org",
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000000000..e9f5fbb0b
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,34 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py27
+skipsdist = True
+
+[testenv]
+usedevelop = True
+setenv=
+ HOME = {envtmpdir}
+ PYTHONPATH = {toxinidir}
+
+[testenv:jjb]
+deps =
+ -rjjb/test-requirements.txt
+commands=
+ jenkins-jobs test -o job_output -r jjb/
+
+[testenv:modules]
+deps=
+ -rmodules/requirements.txt
+ -rmodules/test-requirements.txt
+commands =
+ nosetests -w modules \
+ --with-xunit \
+ --xunit-file=modules/nosetests.xml \
+ --cover-package=opnfv \
+ --with-coverage \
+ --cover-xml \
+ --cover-html \
+ tests/unit