summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kulanov <skulanov@mirantis.com>2016-03-10 16:02:33 +0000
committerSergey Kulanov <skulanov@mirantis.com>2016-03-10 16:02:33 +0000
commitb8c1c9487803da642999ad9e9940cce5fbccf4d9 (patch)
treef36b1070305b6fa6f09d04b77b7deb7061237c6f
parent5ae462d039b94dc80207ee35422877ed850a076b (diff)
Revert "Use common tools to run tests"
Notes
Notes (review): Code-Review+1: tatyana-leontovich <tleontovich@mirantis.com> Code-Review+1: Artur Svechnikov <asvechnikov@mirantis.com> Code-Review+2: Igor Kalnitsky <ikalnitsky@mirantis.com> Workflow+1: Igor Kalnitsky <ikalnitsky@mirantis.com> Code-Review+1: Nastya Urlapova <aurlapova@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 10 Mar 2016 16:12:55 +0000 Reviewed-on: https://review.openstack.org/291268 Project: openstack/network-checker Branch: refs/heads/master
-rw-r--r--.testr.conf5
-rwxr-xr-xrun_tests.sh22
-rw-r--r--test-requirements.txt6
-rw-r--r--tox.ini23
4 files changed, 27 insertions, 29 deletions
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 20ffbae..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,5 +0,0 @@
1[DEFAULT]
2test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-dhcp_checker/tests/ url_access_checker/tests/} -p "*.py" $LISTOPT $IDOPTION
3test_id_option=--load-list $IDFILE
4test_list_option=--list
5test_run_concurrency=echo 1
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000..02e8517
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,22 @@
1#!/bin/bash
2
3# Copyright 2015 Mirantis, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License along
16# with this program; if not, write to the Free Software Foundation, Inc.,
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19set -e
20set -x
21
22tox -v
diff --git a/test-requirements.txt b/test-requirements.txt
index 99ae4b0..6f8239c 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,8 +2,10 @@
2# of appearance. Changing the order has an impact on the overall integration 2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later. 3# process, which may cause wedges in the gate later.
4hacking<0.11,>=0.10.2 # Apache-2.0 4hacking<0.11,>=0.10.2 # Apache-2.0
5os-testr>=0.4.1 # Apache-2.0
6oslotest>=1.10.0 # Apache-2.0
7mock>=1.2 # BSD 5mock>=1.2 # BSD
8unittest2 # BSD 6unittest2 # BSD
9requests-mock>=0.7.0 # Apache-2.0 7requests-mock>=0.7.0 # Apache-2.0
8
9# Packages beyond this line are not in Global Requirements list
10# and must be added there or replaced.
11pytest
diff --git a/tox.ini b/tox.ini
index 4b7c1dd..06a00eb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,28 +8,7 @@ usedevelop = True
8setenv = VIRTUAL_ENV={envdir} 8setenv = VIRTUAL_ENV={envdir}
9deps = -r{toxinidir}/requirements.txt 9deps = -r{toxinidir}/requirements.txt
10 -r{toxinidir}/test-requirements.txt 10 -r{toxinidir}/test-requirements.txt
11commands = ostestr 11commands = py.test {toxinidir}/url_access_checker/tests
12
13[testenv:vde]
14whitelist_externals =
15 bash
16 python
17setenv =
18 {[testenv]setenv}
19 NET_CHECK_IFACE_1=tap11
20 NET_CHECK_IFACE_2=tap12
21commands =
22 bash -c "ip tuntap add dev tap11 mode tap"
23 bash -c "ip tuntap add dev tap12 mode tap"
24 bash -c "vde_switch -p '{toxinidir}/vde_network_checker.pid' -d -tap tap11 -tap tap12"
25 bash -c "ifconfig tap11 up"
26 bash -c "ifconfig tap12 up"
27 {[testenv]commands}
28 bash -c "kill -15 $(cat '{toxinidir}/vde_network_checker.pid')"
29 bash -c "ifconfig tap11 down"
30 bash -c "ifconfig tap12 down"
31 bash -c "ip link delete tap11"
32 bash -c "ip link delete tap12"
33 12
34[testenv:pep8] 13[testenv:pep8]
35commands = 14commands =