Browse Source

Revert "Use common tools to run tests"

This reverts commit 5ae462d039.

Change-Id: I0db0aaf96e217a2fd3052c145843935ba7191c0e
Closes-bug: #1555692
tags/9.0.1
Sergey Kulanov 3 years ago
parent
commit
b8c1c94878
4 changed files with 27 additions and 29 deletions
  1. 0
    5
      .testr.conf
  2. 22
    0
      run_tests.sh
  3. 4
    2
      test-requirements.txt
  4. 1
    22
      tox.ini

+ 0
- 5
.testr.conf View File

@@ -1,5 +0,0 @@
1
-[DEFAULT]
2
-test_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
3
-test_id_option=--load-list $IDFILE
4
-test_list_option=--list
5
-test_run_concurrency=echo 1

+ 22
- 0
run_tests.sh View File

@@ -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
+
19
+set -e
20
+set -x
21
+
22
+tox -v

+ 4
- 2
test-requirements.txt View File

@@ -2,8 +2,10 @@
2 2
 # of appearance. Changing the order has an impact on the overall integration
3 3
 # process, which may cause wedges in the gate later.
4 4
 hacking<0.11,>=0.10.2 # Apache-2.0
5
-os-testr>=0.4.1 # Apache-2.0
6
-oslotest>=1.10.0 # Apache-2.0
7 5
 mock>=1.2 # BSD
8 6
 unittest2 # BSD
9 7
 requests-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.
11
+pytest

+ 1
- 22
tox.ini View File

@@ -8,28 +8,7 @@ usedevelop = True
8 8
 setenv = VIRTUAL_ENV={envdir}
9 9
 deps = -r{toxinidir}/requirements.txt
10 10
        -r{toxinidir}/test-requirements.txt
11
-commands = ostestr
12
-
13
-[testenv:vde]
14
-whitelist_externals =
15
-    bash
16
-    python
17
-setenv =
18
-    {[testenv]setenv}
19
-    NET_CHECK_IFACE_1=tap11
20
-    NET_CHECK_IFACE_2=tap12
21
-commands =
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"
11
+commands = py.test {toxinidir}/url_access_checker/tests
33 12
 
34 13
 [testenv:pep8]
35 14
 commands =

Loading…
Cancel
Save