Browse Source

Remove testrepository and .testr.conf

This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository and .testr.conf
are unnecessary and should be removed.

This patch also switch from "testr" to "stestr" for coverage jobs.

[1] https://review.openstack.org/575430

Change-Id: Ide998f902197ff24e28e998daa8defda090fab3f
Vu Cong Tuan 9 months ago
parent
commit
077ea431ec
4 changed files with 7 additions and 11 deletions
  1. 0
    7
      .testr.conf
  2. 0
    1
      lower-constraints.txt
  3. 0
    1
      test-requirements.txt
  4. 7
    2
      tox.ini

+ 0
- 7
.testr.conf View File

@@ -1,7 +0,0 @@
1
-[DEFAULT]
2
-test_command=
3
-    ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./tests/unit} $LISTOPT $IDOPTION
4
-
5
-test_id_option=--load-list $IDFILE
6
-test_list_option=--list
7
-group_regex=.*(test_cert_setup)

+ 0
- 1
lower-constraints.txt View File

@@ -74,7 +74,6 @@ stestr==2.0.0
74 74
 stevedore==1.20.0
75 75
 tabulate==0.8.2
76 76
 tenacity==4.9.0
77
-testrepository==0.0.18
78 77
 testtools==2.3.0
79 78
 tooz==1.58.0
80 79
 traceback2==1.4.0

+ 0
- 1
test-requirements.txt View File

@@ -11,6 +11,5 @@ stestr>=2.0.0 # Apache-2.0
11 11
 # required to build documentation
12 12
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
13 13
 #oslosphinx>=4.7.0 # Apache-2.0
14
-testrepository>=0.0.18 # Apache-2.0/BSD
15 14
 # computes code coverage percentages
16 15
 coverage!=4.4,>=4.0 # Apache-2.0

+ 7
- 2
tox.ini View File

@@ -47,9 +47,14 @@ commands = {posargs}
47 47
 [testenv:cover]
48 48
 # Also do not run test_coverage_ext tests while gathering coverage as those
49 49
 # tests conflict with coverage.
50
+setenv =
51
+    PYTHON=coverage run --source monasca_transform --parallel-mode
50 52
 commands =
51
-  find monasca_transform -type f -name "*.pyc" -delete
52
-  python setup.py testr --coverage --testr-args='{posargs}'
53
+    find monasca_transform -type f -name "*.pyc" -delete
54
+    stestr run '{posargs}'
55
+    coverage combine
56
+    coverage html -d cover
57
+    coverage xml -o cover/coverage.xml
53 58
 
54 59
 [flake8]
55 60
 max-complexity = 30

Loading…
Cancel
Save