diff --git a/noxfile.py b/noxfile.py index 9a7afa93bdc..b3dbbfbfe7c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1743,18 +1743,18 @@ def test_pkgs_onedir(session): chunks = { "install": ["pkg/tests/"], "upgrade": [ - "pkg/tests/upgrade/test_salt_upgrade.py::test_salt_upgrade", "--upgrade", "--no-uninstall", + "pkg/tests/upgrade/", ], "upgrade-classic": [ - "pkg/tests/upgrade/test_salt_upgrade.py::test_salt_upgrade", "--upgrade", "--no-uninstall", + "pkg/tests/upgrade/", ], "download-pkgs": [ "--download-pkgs", - "pkg/tests/download/test_pkg_download.py", + "pkg/tests/download/", ], } @@ -1802,6 +1802,8 @@ def test_pkgs_onedir(session): pytest_args = ( cmd_args[:] + [ + "-c", + str(REPO_ROOT / "pkg-tests-pytest.ini"), f"--junitxml=artifacts/xml-unittests-output/{junit_report_filename}.xml", f"--log-file=artifacts/logs/{runtests_log_filename}.log", ] @@ -1813,6 +1815,8 @@ def test_pkgs_onedir(session): pytest_args = ( cmd_args[:] + [ + "-c", + str(REPO_ROOT / "pkg-tests-pytest.ini"), "--no-install", f"--junitxml=artifacts/xml-unittests-output/{junit_report_filename}.xml", f"--log-file=artifacts/logs/{runtests_log_filename}.log", diff --git a/pkg-tests-pytest.ini b/pkg-tests-pytest.ini new file mode 100644 index 00000000000..390c029f863 --- /dev/null +++ b/pkg-tests-pytest.ini @@ -0,0 +1,10 @@ +[pytest] +log_date_format=%H:%M:%S +log_cli_format=%(asctime)s,%(msecs)03.0f [%(name)-5s:%(lineno)-4d][%(levelname)-8s][%(processName)s(%(process)s)] %(message)s +log_file_format=%(asctime)s,%(msecs)03d [%(name)-17s:%(lineno)-4d][%(levelname)-8s][%(processName)s(%(process)d)] %(message)s +norecursedirs=templates tests/ +testpaths=pkg/tests +python_files=test_*.py +python_classes=Test* +python_functions = test_* +junit_family=xunit2