Skip to content

Commit

Permalink
Merge pull request #488 from swormke/feature.buildbot
Browse files Browse the repository at this point in the history
F5 OpenStack build infrastructure updates
  • Loading branch information
mattgreene authored Dec 16, 2016
2 parents 27a732c + 32d1c5f commit 7a88c25
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 35 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ access to a BIG-IP device or VE instance.
2. Run the functional tests by supplying the symbol file that you just created
which includes the information relative to your environment using the
example file. The example below runs the disconnected services neutronless
functional test cases.
functional test cases (the tox target changes to the [test/functional](test/functional)
directory before running.

::

$ tox -e functest -- \
--symbols ~/path/to/symbols/symbols.json \
./test/functional/neutronless/disconnected_service
neutronless/disconnected_service

Troubleshooting
===============
Expand Down
2 changes: 1 addition & 1 deletion requirements.functest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# OpenStack dependancies
git+https://github.com/openstack/neutron@stable/liberty
git+https://github.com/openstack/oslo.log.git@stable/liberty
git+https://github.com/openstack/oslo.log.git@liberty-eol
git+https://github.com/openstack/neutron-lbaas.git@stable/liberty

# F5 LBaaS dependancies
Expand Down
2 changes: 1 addition & 1 deletion requirements.unittest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# app
git+https://github.com/openstack/neutron@stable/liberty
git+https://github.com/openstack/oslo.log.git@stable/liberty
git+https://github.com/openstack/oslo.log.git@liberty-eol
git+https://github.com/F5Networks/f5-openstack-lbaasv2-driver.git@liberty
git+https://github.com/F5Networks/f5-openstack-test.git
git+https://github.com/openstack/neutron-lbaas.git@stable/liberty
Expand Down
22 changes: 11 additions & 11 deletions systest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ VENV_ACTIVATE := $(MAKEFILE_DIR)/$(VENV)/bin/activate

# Before we run any tests we need a virtualenv and a few packages
pre-build:
virtualenv $(VENV); \
. $(VENV_ACTIVATE); \
pip install tox; \
pip install git+ssh://git@bldr-git.int.lineratesystems.com/tools/testenv.git; \
pip install git+ssh://git@bldr-git.int.lineratesystems.com/velcro/systest-common.git
sudo apt-get update; \
sudo apt-get install -y libssl-dev; \
sudo apt-get install -y libffi-dev; \
sudo -H pip install tox; \
sudo -H pip install git+ssh://git@bldr-git.int.lineratesystems.com/tools/testenv.git; \
sudo -H pip install git+ssh://git@bldr-git.int.lineratesystems.com/velcro/systest-common.git; \
sudo -H pip install git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-meta.git; \
sudo -H pip install git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-autolog.git; \
sudo -H pip install git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-symbols.git;

unit: pre-build
. $(VENV_ACTIVATE); \
cd $(MAKEFILE_DIR)/../; \
tox -e unit-buildbot -- \
tox -e unit --sitepackages -- \
--exclude incomplete no_regression \
--autolog-outputdir $(unit_results) \
--autolog-session $(unit_session) \
Expand All @@ -59,13 +62,12 @@ disconnected_service:

disconnected_service-setup: pre-build
@echo "setting up functional test environment ..."
. $(VENV_ACTIVATE); \
testenv create base; \
testenv create --name $(disconnected_session) --config $(testenv_config); \

disconnected_service-run: pre-build
@echo "running disconnected tests ..."
tox -e functest-buildbot -- \
tox -e functest --sitepackage -- \
--symbols $(MAKEFILE_DIR)/testenv_symbols/testenv_symbols.json \
--exclude incomplete no_regression \
--autolog-outputdir $(disconnected_results) \
Expand All @@ -76,11 +78,9 @@ disconnected_service-teardown:
@echo "tearing down functional test environment..."
if [ ! -e $(disconnected_results) ]; then mkdir -p $(disconnected_results); fi
if [ ! -e $(unit_results) ]; then mkdir -p $(unit_results); fi
. $(VENV_ACTIVATE); \
testenv delete --name $(disconnected_session) --config $(testenv_config)

# Remove the buildbot venv directory and any tox venvs we made
clean:
-rm -rf $(MAKEFILE_DIR)/$(VENV)
-rm -rf $(MAKEFILE_DIR)/../.tox/functest-buildbot
-rm -rf $(MAKEFILE_DIR)/../.tox/unit-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ def setup_l2adjacent_test(request, bigip, makelogdir):
loghandler = setup_neutronless_test(request, bigip, makelogdir, vlan=True)
LOG.info('Test setup: %s' % request.node.name)

# FIXME: This is a work around for GH issue #487
# https://github.com/F5Networks/f5-openstack-agent/issues/487
def kill_icontrol():
time.sleep(2)
request.addfinalizer(kill_icontrol)

try:
remove_elements(bigip,
SEG_INDEPENDENT_LB_URIS |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN pip install paramiko
RUN pip install decorator
RUN pip install -e git+https://github.com/openstack/neutron#egg=neutron
RUN pip install -e git+https://github.com/openstack/neutron-lbaas.git#egg=neutron_lbaas
RUN pip install --upgrade git+https://github.com/openstack/oslo.log.git@stable/liberty
RUN pip install --upgrade git+https://github.com/openstack/oslo.log.git@liberty-eol
RUN pip install --upgrade git+https://github.com/F5Networks/f5-openstack-test.git@liberty
# RUN pip install --upgrade git+https://github.com/F5Networks/f5-openstack-lbaasv2-driver.git@liberty
RUN pip install --upgrade git+https://github.com/F5Networks/pytest-symbols.git
Expand Down
19 changes: 0 additions & 19 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,8 @@ deps = -rrequirements.unittest.txt
changedir = f5_openstack_agent
commands = py.test -svvra --cov {posargs}

[testenv:unit-buildbot]
basepython = python2.7
changedir = f5_openstack_agent
deps =
git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-meta.git
git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-autolog.git
-rrequirements.unittest.txt
commands = py.test -svvra --cov {posargs}

[testenv:functest]
basepython = python2.7
changedir = test/functional/
deps = -rrequirements.functest.txt
commands = py.test --cov -svvra {posargs}

[testenv:functest-buildbot]
basepython = python2.7
changedir = test/functional/
deps =
git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-meta.git
git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-autolog.git
git+ssh://git@bldr-git.int.lineratesystems.com/tools/pytest-symbols.git
-rrequirements.functest.txt
commands = py.test --cov -svvra {posargs}

0 comments on commit 7a88c25

Please sign in to comment.