Merge pull request #21138 from edx/nedbat/master-wtw
Who-tests-what, rebased onto master, with make upgrade
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# .coveragerc for edx-platform
|
||||
[run]
|
||||
data_file = reports/.coverage
|
||||
data_file = reports/${TEST_SUITE}.coverage
|
||||
source =
|
||||
cms
|
||||
common/djangoapps
|
||||
|
||||
@@ -4,6 +4,7 @@ A class used for defining and running test suites
|
||||
"""
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -93,6 +94,8 @@ class TestSuite(object):
|
||||
sys.stdout.write(msg)
|
||||
sys.stdout.flush()
|
||||
|
||||
if 'TEST_SUITE' not in os.environ:
|
||||
os.environ['TEST_SUITE'] = self.root.replace("/", "_")
|
||||
kwargs = {'shell': True, 'cwd': None}
|
||||
process = None
|
||||
|
||||
|
||||
@@ -72,3 +72,6 @@ ruamel.ordereddict; python_version == "2.7"
|
||||
|
||||
# 1.16.1 requires djangorestframework>=3.8
|
||||
drf-yasg==1.16
|
||||
|
||||
# 2.0.0 is a dummy package, because faulthandler has been incorporated into pytest 5.0
|
||||
pytest-faulthandler<2.0.0
|
||||
|
||||
@@ -30,7 +30,7 @@ asn1crypto==0.24.0
|
||||
attrs==17.4.0
|
||||
babel==1.3
|
||||
backports.functools-lru-cache==1.5 # via soupsieve
|
||||
beautifulsoup4==4.7.1 # via pynliner
|
||||
beautifulsoup4==4.8.0 # via pynliner
|
||||
billiard==3.3.0.23 # via celery
|
||||
bleach==2.1.4
|
||||
boto3==1.4.8
|
||||
@@ -105,7 +105,7 @@ edx-django-oauth2-provider==1.3.5
|
||||
edx-django-release-util==0.3.1
|
||||
edx-django-sites-extensions==2.3.1
|
||||
edx-django-utils==2.0.0
|
||||
edx-drf-extensions==2.3.5
|
||||
edx-drf-extensions==2.3.6
|
||||
edx-enterprise==1.7.3
|
||||
edx-i18n-tools==0.4.8
|
||||
edx-milestones==0.2.3
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
|
||||
-c ../constraints.txt
|
||||
|
||||
coverage==4.4 # Code coverage testing for Python
|
||||
coverage==5.0a6 # Code coverage testing for Python
|
||||
diff-cover==0.9.8 # Automatically find diff lines that need test coverage
|
||||
six==1.11.0 # Pinned because diff-cover needs it, but later transifex-client says ==1.11.0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
coverage==4.4
|
||||
coverage==5.0a6
|
||||
diff-cover==0.9.8
|
||||
inflect==2.1.0 # via jinja2-pluralize
|
||||
jinja2-pluralize==0.3.0 # via diff-cover
|
||||
|
||||
@@ -36,7 +36,7 @@ atomicwrites==1.3.0
|
||||
attrs==17.4.0
|
||||
babel==1.3
|
||||
backports.functools-lru-cache==1.5
|
||||
beautifulsoup4==4.7.1
|
||||
beautifulsoup4==4.8.0
|
||||
before-after==1.0.1
|
||||
billiard==3.3.0.23
|
||||
bleach==2.1.4
|
||||
@@ -59,7 +59,8 @@ configparser==3.7.4
|
||||
contextlib2==0.5.5
|
||||
coreapi==2.3.3
|
||||
coreschema==0.0.4
|
||||
coverage==4.4
|
||||
coverage==5.0a6
|
||||
git+https://github.com/nedbat/coverage_pytest_plugin.git@29de030251471e200ff255eb9e549218cd60e872#egg=coverage_pytest_plugin==0.0
|
||||
git+https://github.com/edx/crowdsourcehinter.git@518605f0a95190949fe77bd39158450639e2e1dc#egg=crowdsourcehinter-xblock==0.1
|
||||
cryptography==2.7
|
||||
cssselect==1.0.3
|
||||
@@ -124,7 +125,7 @@ edx-django-oauth2-provider==1.3.5
|
||||
edx-django-release-util==0.3.1
|
||||
edx-django-sites-extensions==2.3.1
|
||||
edx-django-utils==2.0.0
|
||||
edx-drf-extensions==2.3.5
|
||||
edx-drf-extensions==2.3.6
|
||||
edx-enterprise==1.7.3
|
||||
edx-i18n-tools==0.4.8
|
||||
edx-lint==1.3.0
|
||||
@@ -150,6 +151,7 @@ event-tracking==0.2.9
|
||||
execnet==1.6.0
|
||||
factory_boy==2.8.1
|
||||
faker==2.0.0
|
||||
faulthandler==3.1
|
||||
feedparser==5.1.3
|
||||
filelock==3.0.12
|
||||
firebase-token-generator==1.3.2
|
||||
@@ -256,8 +258,9 @@ pyquery==1.4.0
|
||||
pysqlite==2.8.3 ; python_version == "2.7"
|
||||
pysrt==1.1.1
|
||||
pytest-attrib==0.1.3
|
||||
pytest-cov==2.7.1
|
||||
git+https://github.com/nedbat/pytest-cov.git@nedbat/cov5-combine#egg=pytest-cov==0.0
|
||||
pytest-django==3.5.1
|
||||
pytest-faulthandler==1.6.0
|
||||
pytest-forked==1.0.2
|
||||
pytest-randomly==1.2.3
|
||||
pytest-xdist==1.29.0
|
||||
@@ -319,6 +322,7 @@ transifex-client==0.13.6
|
||||
typing==3.7.4
|
||||
unicodecsv==0.14.1
|
||||
unidecode==1.1.1
|
||||
unidiff==0.5.5
|
||||
uritemplate==3.0.0
|
||||
urllib3==1.23
|
||||
user-util==0.1.5
|
||||
|
||||
@@ -37,7 +37,9 @@ pyquery # jQuery-like API for retrieving fragments of HTML and
|
||||
pysqlite # DB-API 2.0 interface for SQLite 3.x (used as the relational database for most tests)
|
||||
pytest # Testing framework
|
||||
pytest-attrib # Select tests based on attributes
|
||||
pytest-cov # pytest plugin for measuring code coverage.
|
||||
git+https://github.com/nedbat/pytest-cov.git@nedbat/cov5-combine#egg=pytest-cov==0.0
|
||||
git+https://github.com/nedbat/coverage_pytest_plugin.git@29de030251471e200ff255eb9e549218cd60e872#egg=coverage_pytest_plugin==0.0
|
||||
pytest-faulthandler # Report on serious crashes
|
||||
pytest-django # Django support for pytest
|
||||
pytest-randomly # pytest plugin to randomly order tests
|
||||
pytest-xdist # Parallel execution of tests on multiple CPU cores or hosts
|
||||
@@ -48,3 +50,5 @@ testfixtures # Provides a LogCapture utility used by several tests
|
||||
tox # virtualenv management for tests
|
||||
tox-battery # Makes tox aware of requirements file changes
|
||||
transifex-client # Command-line interface for the Transifex localization service
|
||||
unidiff # Required by coverage_pytest_plugin
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ atomicwrites==1.3.0 # via pytest
|
||||
attrs==17.4.0
|
||||
babel==1.3
|
||||
backports.functools-lru-cache==1.5
|
||||
beautifulsoup4==4.7.1
|
||||
beautifulsoup4==4.8.0
|
||||
before-after==1.0.1
|
||||
billiard==3.3.0.23
|
||||
bleach==2.1.4
|
||||
@@ -57,7 +57,8 @@ configparser==3.7.4 # via entrypoints, flake8, importlib-metadata, pylint
|
||||
contextlib2==0.5.5 # via importlib-metadata
|
||||
coreapi==2.3.3
|
||||
coreschema==0.0.4
|
||||
coverage==4.4
|
||||
coverage==5.0a6
|
||||
git+https://github.com/nedbat/coverage_pytest_plugin.git@29de030251471e200ff255eb9e549218cd60e872#egg=coverage_pytest_plugin==0.0
|
||||
git+https://github.com/edx/crowdsourcehinter.git@518605f0a95190949fe77bd39158450639e2e1dc#egg=crowdsourcehinter-xblock==0.1
|
||||
cryptography==2.7
|
||||
cssselect==1.0.3
|
||||
@@ -120,7 +121,7 @@ edx-django-oauth2-provider==1.3.5
|
||||
edx-django-release-util==0.3.1
|
||||
edx-django-sites-extensions==2.3.1
|
||||
edx-django-utils==2.0.0
|
||||
edx-drf-extensions==2.3.5
|
||||
edx-drf-extensions==2.3.6
|
||||
edx-enterprise==1.7.3
|
||||
edx-i18n-tools==0.4.8
|
||||
edx-lint==1.3.0
|
||||
@@ -145,6 +146,7 @@ event-tracking==0.2.9
|
||||
execnet==1.6.0 # via pytest-xdist
|
||||
factory_boy==2.8.1
|
||||
faker==2.0.0 # via factory-boy
|
||||
faulthandler==3.1 # via pytest-faulthandler
|
||||
feedparser==5.1.3
|
||||
filelock==3.0.12 # via tox
|
||||
firebase-token-generator==1.3.2
|
||||
@@ -247,8 +249,9 @@ pyquery==1.4.0
|
||||
pysqlite==2.8.3 ; python_version == "2.7"
|
||||
pysrt==1.1.1
|
||||
pytest-attrib==0.1.3
|
||||
pytest-cov==2.7.1
|
||||
git+https://github.com/nedbat/pytest-cov.git@nedbat/cov5-combine#egg=pytest-cov==0.0
|
||||
pytest-django==3.5.1
|
||||
pytest-faulthandler==1.6.0
|
||||
pytest-forked==1.0.2 # via pytest-xdist
|
||||
pytest-randomly==1.2.3
|
||||
pytest-xdist==1.29.0
|
||||
@@ -306,6 +309,7 @@ transifex-client==0.13.6
|
||||
typing==3.7.4 # via flake8
|
||||
unicodecsv==0.14.1
|
||||
unidecode==1.1.1 # via python-slugify
|
||||
unidiff==0.5.5
|
||||
uritemplate==3.0.0
|
||||
urllib3==1.23
|
||||
user-util==0.1.5
|
||||
|
||||
@@ -56,15 +56,15 @@ case "${TEST_SUITE}" in
|
||||
case "$SHARD" in
|
||||
"all")
|
||||
paver test_system -s lms --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.log
|
||||
mv reports/.coverage reports/.coverage.lms
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.lms
|
||||
;;
|
||||
[1-9])
|
||||
paver test_system -s lms --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.${SHARD}.log
|
||||
mv reports/.coverage reports/.coverage.lms.${SHARD}
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.lms.${SHARD}
|
||||
;;
|
||||
10|"noshard")
|
||||
paver test_system -s lms --disable_capture --eval-attr="shard>=$SHARD or not shard" ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.10.log
|
||||
mv reports/.coverage reports/.coverage.lms.10
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.lms.10
|
||||
;;
|
||||
*)
|
||||
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
|
||||
@@ -81,15 +81,15 @@ case "${TEST_SUITE}" in
|
||||
case "$SHARD" in
|
||||
"all")
|
||||
paver test_system -s cms --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> cms-tests.log
|
||||
mv reports/.coverage reports/.coverage.cms
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.cms
|
||||
;;
|
||||
1)
|
||||
paver test_system -s cms --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> cms-tests.${SHARD}.log
|
||||
mv reports/.coverage reports/.coverage.cms.${SHARD}
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.cms.${SHARD}
|
||||
;;
|
||||
2|"noshard")
|
||||
paver test_system -s cms --disable_capture --eval-attr="shard>=$SHARD or not shard" ${PAVER_ARGS} 2> cms-tests.2.log
|
||||
mv reports/.coverage reports/.coverage.cms.2
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.cms.2
|
||||
;;
|
||||
*)
|
||||
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
|
||||
@@ -106,15 +106,15 @@ case "${TEST_SUITE}" in
|
||||
case "$SHARD" in
|
||||
"all")
|
||||
paver test_lib --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> common-tests.log
|
||||
mv reports/.coverage reports/.coverage.commonlib
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib
|
||||
;;
|
||||
[1-2])
|
||||
paver test_lib -l common/lib/xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log
|
||||
mv reports/.coverage reports/.coverage.commonlib.${SHARD}
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.${SHARD}
|
||||
;;
|
||||
3|"noshard")
|
||||
paver test_lib --disable_capture --eval-attr="shard>=$SHARD or not shard" ${PAVER_ARGS} 2> common-tests.3.log
|
||||
mv reports/.coverage reports/.coverage.commonlib.3
|
||||
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.3
|
||||
;;
|
||||
*)
|
||||
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
|
||||
|
||||
Reference in New Issue
Block a user