Fix `--coverage option of run_tests.sh`

for pytest-based tests.

Also:
- do not create a giant XML coverage report file
- update other dependencies using `make update-dependencies`.

Introduced in commit 1152a19fd2 .
This commit is contained in:
Nicola Soranzo
2019-06-13 12:45:36 +01:00
parent 2fdc1c53ca
commit 6013419adc
4 changed files with 10 additions and 16 deletions
@@ -15,6 +15,7 @@ mock = "*"
NoseHTML = "*"
pygithub3 = {version = "*", markers = "python_version < '3'"}
pytest = "*"
pytest-cov = "*"
pytest-html = "*"
pytest-pythonpath = "*"
pytest-postgresql = "*"
@@ -10,13 +10,14 @@ chardet==3.0.4
commonmark==0.9.0
configparser==3.7.4 ; python_version < '3.2'
contextlib2==0.5.5 ; python_version < '3.5'
coverage==4.5.3
docutils==0.14
funcsigs==1.0.2 ; python_version < '3.3'
future==0.17.1
gunicorn==19.9.0
idna==2.8
imagesize==1.1.0
importlib-metadata==0.17
importlib-metadata==0.18
jinja2==2.10.1
lxml==4.3.4
markdown==2.6.11
@@ -31,16 +32,17 @@ pathlib2==2.3.2 ; python_version < '3'
pathtools==0.1.2
pluggy==0.12.0
port-for==0.4
psutil==5.6.2
psutil==5.6.3
py==1.8.0
pygithub3==0.5.1 ; python_version < '3'
pygments==2.4.2
pyparsing==2.4.0
pytest-cov==2.7.1
pytest-html==1.20.0
pytest-metadata==1.8.0
pytest-postgresql==1.4.1
pytest-pythonpath==0.7.3
pytest==4.6.2
pytest==4.6.3
pytz==2019.1
pyyaml==5.1.1
recommonmark==0.5.0
@@ -29,7 +29,7 @@ bleach==3.1.0
boltons==19.1.0
boto3==1.9.114
boto==2.49.0
botocore==1.12.165
botocore==1.12.167
bx-python==0.8.2
bz2file==0.98 ; python_version < '3.3'
cachecontrol==0.11.7
@@ -118,7 +118,7 @@ pathlib2==2.3.2 ; python_version < '3'
pbr==5.2.1
prettytable==0.7.2
prov==1.5.1
psutil==5.6.2
psutil==5.6.3
pulsar-galaxy-lib==0.12.1
pyasn1-modules==0.2.5
pyasn1==0.4.5
+2 -11
View File
@@ -374,7 +374,6 @@ do
api_script="./test/api"
shift 1
fi
coverage_file="api_coverage.xml"
;;
-selenium|--selenium)
GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml"
@@ -428,7 +427,6 @@ do
marker="-m tool"
test_script="pytest"
report_file="run_framework_tests.html"
coverage_file="framework_coverage.xml"
framework_test=1;
shift 1
;;
@@ -437,7 +435,6 @@ do
marker="-m tool"
test_script="pytest"
report_file="run_framework_tests.html"
coverage_file="main_tools_coverage.xml"
framework_test=1;
shift 1
;;
@@ -445,7 +442,6 @@ do
marker="-m data_manager"
test_script="pytest"
report_file="run_data_managers_tests.html"
coverage_file="data_managers_coverage.xml"
data_managers_test=1;
shift 1
;;
@@ -454,7 +450,6 @@ do
marker="-m tool"
test_script="pytest"
report_file="run_migrated_tests.html"
coverage_file="migrated_coverage.xml"
migrated_test=1;
shift
;;
@@ -463,7 +458,6 @@ do
marker="-m tool"
test_script="pytest"
report_file="run_installed_tests.html"
coverage_file="installed_coverage.xml"
installed_test=1;
shift
;;
@@ -503,7 +497,6 @@ do
# Must have coverage installed (try `which coverage`) - only valid with --unit
# for now. Would be great to get this to work with functional tests though.
coverage_arg="--with-coverage"
NOSE_WITH_COVERAGE=true
shift
;;
--debug)
@@ -523,7 +516,6 @@ do
unit_extra="$unit_extra lib test/unit"
shift 1
fi
coverage_file="unit_coverage.xml"
;;
-i|-integration|--integration)
GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml"
@@ -535,7 +527,6 @@ do
else
integration_extra="./test/integration"
shift 1
coverage_file="integration_coverage.xml"
fi
;;
--no_cleanup)
@@ -645,8 +636,8 @@ else
fi
export GALAXY_TEST_TOOL_CONF
if [ "$test_script" = 'pytest' ]; then
if [ "$coverage_arg" = "--with_coverage" ]; then
coverage_arg="--cov-report term --cov-report xml:cov-unit.xml --cov=lib"
if [ "$coverage_arg" = '--with-coverage' ]; then
coverage_arg="--cov-report term --cov=lib"
fi
"$test_script" -v --html "$report_file" $coverage_arg $xunit_args $extra_args "$@"
else