ci: restore coverage computation (#32585)

* ci: restore coverage computation

* Mark "test_foreground_background" as xfail

* Mark "test_foreground_background_output" as xfail

* Make number of processes explicit, remove verbosity on linux

* Run coverage on just 3 Python jobs for linux

* Run coverage on just 3 Python jobs for linux

* Run coverage on just 2 Python jobs for linux

* Add back verbose, since before we didn't encounter the xdist internal error

* Reduce the workers to 2

* Try to use command line
This commit is contained in:
Massimiliano Culpo
2022-09-10 15:25:44 +02:00
committed by GitHub
parent b4a2b8d46c
commit 1427ddaa59
5 changed files with 38 additions and 19 deletions

View File

@@ -27,7 +27,9 @@ def test_create_db_tarball(tmpdir, database):
# get the first non-dotfile to avoid coverage files in the directory
files = os.listdir(os.getcwd())
tarball_name = next(f for f in files if not f.startswith("."))
tarball_name = next(
f for f in files if not f.startswith(".") and not f.startswith("tests")
)
# debug command made an archive
assert os.path.exists(tarball_name)

View File

@@ -341,6 +341,7 @@ def no_termios():
(mock_shell_tstp_tstp_cont_cont, no_termios),
],
)
@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist")
def test_foreground_background(test_fn, termios_on_or_off, tmpdir):
"""Functional tests for foregrounding and backgrounding a logged process.
@@ -460,6 +461,7 @@ def mock_shell_v_v_no_termios(proc, ctl, **kwargs):
(mock_shell_v_v_no_termios, no_termios),
],
)
@pytest.mark.xfail(reason="Fails almost consistently when run with coverage and xdist")
def test_foreground_background_output(test_fn, capfd, termios_on_or_off, tmpdir):
"""Tests hitting 'v' toggles output, and that force_echo works."""
if sys.version_info >= (3, 8) and sys.platform == "darwin" and termios_on_or_off == no_termios: