From d80788c389db2279b02820427e9838a09a31296a Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 12 Mar 2026 09:44:25 +0100 Subject: [PATCH 1/3] Add CodeCov to ci-scripts repository. Signed-off-by: Petr "Stone" Hracek --- .github/workflows/python-daily-tests.yml | 8 ++++++- .../workflows/python-ocp-generator-tests.yml | 8 ++++++- .gitignore | 2 ++ codecov.yml | 17 +++++++++++++ daily_tests/pytest.ini | 3 --- daily_tests/tests/integration/__init__.py | 1 + .../test_integration_placeholder.py | 9 +++++++ daily_tests/tox.ini | 7 ------ .../ocp_stream_generator/stream_generator.py | 6 ++++- ocp-stream-generator/pytest.ini | 3 --- ocp-stream-generator/tests/__init__.py | 0 .../tests/test_imagestream_file.py | 2 +- .../tests/test_json_builder.py | 24 +++++++++---------- .../tests/test_yaml_loader.py | 4 ++-- ocp-stream-generator/tox.ini | 3 ++- tox.ini | 20 ++++++++++++++++ 16 files changed, 85 insertions(+), 32 deletions(-) create mode 100644 codecov.yml delete mode 100644 daily_tests/pytest.ini create mode 100644 daily_tests/tests/integration/__init__.py create mode 100644 daily_tests/tests/integration/test_integration_placeholder.py delete mode 100644 daily_tests/tox.ini delete mode 100644 ocp-stream-generator/pytest.ini create mode 100644 ocp-stream-generator/tests/__init__.py create mode 100644 tox.ini diff --git a/.github/workflows/python-daily-tests.yml b/.github/workflows/python-daily-tests.yml index e5df009..596e5a2 100644 --- a/.github/workflows/python-daily-tests.yml +++ b/.github/workflows/python-daily-tests.yml @@ -20,4 +20,10 @@ jobs: with: tox_env: ${{ matrix.tox_env }} workdir: "daily_tests/" -... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: daily-tests-unit + files: daily_tests/coverage.xml + fail_ci_if_error: false diff --git a/.github/workflows/python-ocp-generator-tests.yml b/.github/workflows/python-ocp-generator-tests.yml index 17905a8..855eabf 100644 --- a/.github/workflows/python-ocp-generator-tests.yml +++ b/.github/workflows/python-ocp-generator-tests.yml @@ -20,4 +20,10 @@ jobs: with: tox_env: ${{ matrix.tox_env }} workdir: "ocp-stream-generator/" -... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: ocp-stream-generator-unit + files: ocp-stream-generator/coverage.xml + fail_ci_if_error: false diff --git a/.gitignore b/.gitignore index ae49b59..8fb8523 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.coverage +coverage.xml .mypy_cache .idea .vscode diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..61dc696 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,17 @@ +codecov: + require_ci_to_pass: yes + +coverage: + precision: 2 + round: down + range: "50...100" + +flags: + daily-tests-unit: + carryforward: true + ocp-stream-generator-unit: + carryforward: true + +comment: + layout: "reach,diff,flags,files" + behavior: default diff --git a/daily_tests/pytest.ini b/daily_tests/pytest.ini deleted file mode 100644 index c7b23ec..0000000 --- a/daily_tests/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -pythonpath = . -testpaths = tests diff --git a/daily_tests/tests/integration/__init__.py b/daily_tests/tests/integration/__init__.py new file mode 100644 index 0000000..cc22b80 --- /dev/null +++ b/daily_tests/tests/integration/__init__.py @@ -0,0 +1 @@ +# Integration tests for daily_tests package diff --git a/daily_tests/tests/integration/test_integration_placeholder.py b/daily_tests/tests/integration/test_integration_placeholder.py new file mode 100644 index 0000000..bde117e --- /dev/null +++ b/daily_tests/tests/integration/test_integration_placeholder.py @@ -0,0 +1,9 @@ +"""Placeholder for integration tests. Add real integration tests here.""" + +import pytest + + +@pytest.mark.integration +def test_integration_placeholder(): + """Placeholder test until real integration tests are added.""" + pass diff --git a/daily_tests/tox.ini b/daily_tests/tox.ini deleted file mode 100644 index 21c0f1b..0000000 --- a/daily_tests/tox.ini +++ /dev/null @@ -1,7 +0,0 @@ -[testenv] -commands = python3 -m pytest --color=yes -v -deps = - pytest - PyYAML - requests - xmltodict diff --git a/ocp-stream-generator/ocp_stream_generator/stream_generator.py b/ocp-stream-generator/ocp_stream_generator/stream_generator.py index 5fbce65..37b8d3d 100755 --- a/ocp-stream-generator/ocp_stream_generator/stream_generator.py +++ b/ocp-stream-generator/ocp_stream_generator/stream_generator.py @@ -26,7 +26,11 @@ import yaml import json import sys -from distribution_data import abbreviations, images, latest_description +from ocp_stream_generator.distribution_data import ( + abbreviations, + images, + latest_description, +) class YamlLoader: diff --git a/ocp-stream-generator/pytest.ini b/ocp-stream-generator/pytest.ini deleted file mode 100644 index eb48dbf..0000000 --- a/ocp-stream-generator/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -pythonpath = ocp_stream_generator -testpaths = tests diff --git a/ocp-stream-generator/tests/__init__.py b/ocp-stream-generator/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ocp-stream-generator/tests/test_imagestream_file.py b/ocp-stream-generator/tests/test_imagestream_file.py index e9630aa..62ef67d 100644 --- a/ocp-stream-generator/tests/test_imagestream_file.py +++ b/ocp-stream-generator/tests/test_imagestream_file.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -from stream_generator import ImagestreamFile +from ocp_stream_generator.stream_generator import ImagestreamFile def test_create_isf(): diff --git a/ocp-stream-generator/tests/test_json_builder.py b/ocp-stream-generator/tests/test_json_builder.py index 2b1d4fb..8900702 100644 --- a/ocp-stream-generator/tests/test_json_builder.py +++ b/ocp-stream-generator/tests/test_json_builder.py @@ -1,18 +1,18 @@ #!/usr/bin/env python3 import json import re -from stream_generator import JsonBuilder -from stream_generator import Tag -from stream_generator import LatestTag -from stream_generator import CustomTag -from stream_generator import ImagestreamFile -from data.data_json_builder import add_tag_result -from data.data_json_builder import add_tag_latest_result -from data.data_json_builder import add_tag_custom_result -from data.data_json_builder import create_annotation_result -from data.data_json_builder import create_annotation_latest_result -from data.data_json_builder import create_header_result -from data.data_json_builder import generate_json_result +from ocp_stream_generator.stream_generator import JsonBuilder +from ocp_stream_generator.stream_generator import Tag +from ocp_stream_generator.stream_generator import LatestTag +from ocp_stream_generator.stream_generator import CustomTag +from ocp_stream_generator.stream_generator import ImagestreamFile +from tests.data.data_json_builder import add_tag_result +from tests.data.data_json_builder import add_tag_latest_result +from tests.data.data_json_builder import add_tag_custom_result +from tests.data.data_json_builder import create_annotation_result +from tests.data.data_json_builder import create_annotation_latest_result +from tests.data.data_json_builder import create_header_result +from tests.data.data_json_builder import generate_json_result builder = JsonBuilder() diff --git a/ocp-stream-generator/tests/test_yaml_loader.py b/ocp-stream-generator/tests/test_yaml_loader.py index ae6ff4c..dc38c6c 100644 --- a/ocp-stream-generator/tests/test_yaml_loader.py +++ b/ocp-stream-generator/tests/test_yaml_loader.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -from stream_generator import YamlLoader -from data.data_yaml_loader import load_yaml_result +from ocp_stream_generator.stream_generator import YamlLoader +from tests.data.data_yaml_loader import load_yaml_result def test_load_yaml(): diff --git a/ocp-stream-generator/tox.ini b/ocp-stream-generator/tox.ini index 9366ad0..cfbcbd7 100644 --- a/ocp-stream-generator/tox.ini +++ b/ocp-stream-generator/tox.ini @@ -1,5 +1,6 @@ [testenv] -commands = python3 -m pytest --color=yes -v +commands = python3 -m pytest --color=yes -v --cov=ocp_stream_generator --cov-report=xml:coverage.xml deps = pytest + pytest-cov PyYAML diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..c9ab15c --- /dev/null +++ b/tox.ini @@ -0,0 +1,20 @@ +[tox] +envlist = daily_tests, ocp-stream-generator + +[testenv:daily_tests] +changedir = daily_tests +commands = python3 -m pytest -m "not integration" --color=yes -v --cov=. --cov-report=xml:coverage.xml +deps = + pytest + pytest-cov + PyYAML + requests + xmltodict + +[testenv:ocp-stream-generator] +changedir = ocp-stream-generator +commands = python3 -m pytest --color=yes -v --cov=ocp_stream_generator --cov-report=xml:coverage.xml +deps = + pytest + pytest-cov + PyYAML From 7543a3f439afa46d609006dd6bc6fa01c97e92da Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 12 Mar 2026 09:48:58 +0100 Subject: [PATCH 2/3] Update .gitignore similar like in container-ci-suite Signed-off-by: Petr "Stone" Hracek --- .gitignore | 13 +++++++++++-- daily_tests/tests/integration/__init__.py | 1 - .../integration/test_integration_placeholder.py | 9 --------- tox.ini | 3 +-- 4 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 daily_tests/tests/integration/__init__.py delete mode 100644 daily_tests/tests/integration/test_integration_placeholder.py diff --git a/.gitignore b/.gitignore index 8fb8523..db18d27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,15 @@ -.coverage -coverage.xml .mypy_cache .idea .vscode __pycache__ + + +# Unit tests / coverage reports +.tox/ +.coverage +.coverage.* +.cache +coverage.xml +coverage-unit.xml +coverage-integration.xml +.pytest_cache/ diff --git a/daily_tests/tests/integration/__init__.py b/daily_tests/tests/integration/__init__.py deleted file mode 100644 index cc22b80..0000000 --- a/daily_tests/tests/integration/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Integration tests for daily_tests package diff --git a/daily_tests/tests/integration/test_integration_placeholder.py b/daily_tests/tests/integration/test_integration_placeholder.py deleted file mode 100644 index bde117e..0000000 --- a/daily_tests/tests/integration/test_integration_placeholder.py +++ /dev/null @@ -1,9 +0,0 @@ -"""Placeholder for integration tests. Add real integration tests here.""" - -import pytest - - -@pytest.mark.integration -def test_integration_placeholder(): - """Placeholder test until real integration tests are added.""" - pass diff --git a/tox.ini b/tox.ini index c9ab15c..f28ef23 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,7 @@ envlist = daily_tests, ocp-stream-generator [testenv:daily_tests] -changedir = daily_tests -commands = python3 -m pytest -m "not integration" --color=yes -v --cov=. --cov-report=xml:coverage.xml +commands = python3 -m pytest --color=yes -v --cov=daily_tests --cov-report=xml:coverage.xml deps = pytest pytest-cov From c7b21f7ad72d4cefb77e497b6e70106816c98f74 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 12 Mar 2026 10:20:18 +0100 Subject: [PATCH 3/3] Move project daily_tests to daily-tests directory so as ocp-stream-generator have the same directory structure Signed-off-by: Petr "Stone" Hracek --- .github/workflows/python-daily-tests.yml | 4 +- .../daily_tests/__init__.py | 0 .../daily_tests}/daily_grades.py | 0 .../daily_tests}/daily_helm_charts.sh | 0 .../daily_nightly_tests_report.py | 0 .../daily_nightly_tests_report.sh | 0 .../daily_tests}/daily_scl_tests.sh | 0 .../daily_tests}/download_logs.py | 0 .../daily_tests}/sclorg_sanity_tests.py | 0 .../daily_tests}/show_logs.py | 0 .../daily_tests}/show_logs.sh | 0 daily-tests/tests/__init__.py | 0 .../tests/no_logs_in_results.txt | 0 .../tests/results.xml | 0 .../tests/test_daily_grades.py | 0 .../tests/test_show_logs.py | 2 +- .../tests/test_tf_log_downloader.py | 60 +++++++++++++------ .../tests/tmt_log_output | 0 daily-tests/tox.ini | 11 ++++ run_nightly_tests.sh | 2 +- tox.ini | 5 +- 21 files changed, 60 insertions(+), 24 deletions(-) rename daily_tests/__init_.py => daily-tests/daily_tests/__init__.py (100%) rename {daily_tests => daily-tests/daily_tests}/daily_grades.py (100%) rename {daily_tests => daily-tests/daily_tests}/daily_helm_charts.sh (100%) rename {daily_tests => daily-tests/daily_tests}/daily_nightly_tests_report.py (100%) rename {daily_tests => daily-tests/daily_tests}/daily_nightly_tests_report.sh (100%) rename {daily_tests => daily-tests/daily_tests}/daily_scl_tests.sh (100%) rename {daily_tests => daily-tests/daily_tests}/download_logs.py (100%) rename {daily_tests => daily-tests/daily_tests}/sclorg_sanity_tests.py (100%) rename {daily_tests => daily-tests/daily_tests}/show_logs.py (100%) rename {daily_tests => daily-tests/daily_tests}/show_logs.sh (100%) create mode 100644 daily-tests/tests/__init__.py rename {daily_tests => daily-tests}/tests/no_logs_in_results.txt (100%) rename {daily_tests => daily-tests}/tests/results.xml (100%) rename {daily_tests => daily-tests}/tests/test_daily_grades.py (100%) rename {daily_tests => daily-tests}/tests/test_show_logs.py (98%) rename {daily_tests => daily-tests}/tests/test_tf_log_downloader.py (86%) rename {daily_tests => daily-tests}/tests/tmt_log_output (100%) create mode 100644 daily-tests/tox.ini diff --git a/.github/workflows/python-daily-tests.yml b/.github/workflows/python-daily-tests.yml index 596e5a2..3147630 100644 --- a/.github/workflows/python-daily-tests.yml +++ b/.github/workflows/python-daily-tests.yml @@ -19,11 +19,11 @@ jobs: - uses: fedora-python/tox-github-action@main with: tox_env: ${{ matrix.tox_env }} - workdir: "daily_tests/" + workdir: "daily-tests/" - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} flags: daily-tests-unit - files: daily_tests/coverage.xml + files: daily-tests/coverage.xml fail_ci_if_error: false diff --git a/daily_tests/__init_.py b/daily-tests/daily_tests/__init__.py similarity index 100% rename from daily_tests/__init_.py rename to daily-tests/daily_tests/__init__.py diff --git a/daily_tests/daily_grades.py b/daily-tests/daily_tests/daily_grades.py similarity index 100% rename from daily_tests/daily_grades.py rename to daily-tests/daily_tests/daily_grades.py diff --git a/daily_tests/daily_helm_charts.sh b/daily-tests/daily_tests/daily_helm_charts.sh similarity index 100% rename from daily_tests/daily_helm_charts.sh rename to daily-tests/daily_tests/daily_helm_charts.sh diff --git a/daily_tests/daily_nightly_tests_report.py b/daily-tests/daily_tests/daily_nightly_tests_report.py similarity index 100% rename from daily_tests/daily_nightly_tests_report.py rename to daily-tests/daily_tests/daily_nightly_tests_report.py diff --git a/daily_tests/daily_nightly_tests_report.sh b/daily-tests/daily_tests/daily_nightly_tests_report.sh similarity index 100% rename from daily_tests/daily_nightly_tests_report.sh rename to daily-tests/daily_tests/daily_nightly_tests_report.sh diff --git a/daily_tests/daily_scl_tests.sh b/daily-tests/daily_tests/daily_scl_tests.sh similarity index 100% rename from daily_tests/daily_scl_tests.sh rename to daily-tests/daily_tests/daily_scl_tests.sh diff --git a/daily_tests/download_logs.py b/daily-tests/daily_tests/download_logs.py similarity index 100% rename from daily_tests/download_logs.py rename to daily-tests/daily_tests/download_logs.py diff --git a/daily_tests/sclorg_sanity_tests.py b/daily-tests/daily_tests/sclorg_sanity_tests.py similarity index 100% rename from daily_tests/sclorg_sanity_tests.py rename to daily-tests/daily_tests/sclorg_sanity_tests.py diff --git a/daily_tests/show_logs.py b/daily-tests/daily_tests/show_logs.py similarity index 100% rename from daily_tests/show_logs.py rename to daily-tests/daily_tests/show_logs.py diff --git a/daily_tests/show_logs.sh b/daily-tests/daily_tests/show_logs.sh similarity index 100% rename from daily_tests/show_logs.sh rename to daily-tests/daily_tests/show_logs.sh diff --git a/daily-tests/tests/__init__.py b/daily-tests/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/daily_tests/tests/no_logs_in_results.txt b/daily-tests/tests/no_logs_in_results.txt similarity index 100% rename from daily_tests/tests/no_logs_in_results.txt rename to daily-tests/tests/no_logs_in_results.txt diff --git a/daily_tests/tests/results.xml b/daily-tests/tests/results.xml similarity index 100% rename from daily_tests/tests/results.xml rename to daily-tests/tests/results.xml diff --git a/daily_tests/tests/test_daily_grades.py b/daily-tests/tests/test_daily_grades.py similarity index 100% rename from daily_tests/tests/test_daily_grades.py rename to daily-tests/tests/test_daily_grades.py diff --git a/daily_tests/tests/test_show_logs.py b/daily-tests/tests/test_show_logs.py similarity index 98% rename from daily_tests/tests/test_show_logs.py rename to daily-tests/tests/test_show_logs.py index c32f048..b9de120 100644 --- a/daily_tests/tests/test_show_logs.py +++ b/daily-tests/tests/test_show_logs.py @@ -7,7 +7,7 @@ import pytest -import show_logs +from daily_tests import show_logs TEST_DIR = Path(__file__).parent.absolute() sys.path.append(str(TEST_DIR)) diff --git a/daily_tests/tests/test_tf_log_downloader.py b/daily-tests/tests/test_tf_log_downloader.py similarity index 86% rename from daily_tests/tests/test_tf_log_downloader.py rename to daily-tests/tests/test_tf_log_downloader.py index ad40037..9bafe0d 100644 --- a/daily_tests/tests/test_tf_log_downloader.py +++ b/daily-tests/tests/test_tf_log_downloader.py @@ -1,11 +1,12 @@ # pylint: disable=import-error,redefined-outer-name import sys +import pytest + from pathlib import Path from unittest.mock import MagicMock, patch -import pytest +from daily_tests import download_logs -import download_logs TEST_DIR = Path(__file__).parent.absolute() sys.path.insert(0, str(TEST_DIR.parent)) @@ -94,7 +95,9 @@ def test_download_log_success(self, downloader, tmp_path): mock_response.status_code = 200 mock_response.content = b"log content" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): result = downloader.download_log("http://example.com/log.txt", "log.txt") assert result is True @@ -107,7 +110,9 @@ def test_download_log_success_failed_dir(self, downloader, tmp_path): mock_response.status_code = 200 mock_response.content = b"failed log" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): result = downloader.download_log( "http://example.com/fail.log", "fail.log", is_failed=True ) @@ -120,8 +125,10 @@ def test_download_log_failure_after_retries(self, downloader, tmp_path, capsys): mock_response = MagicMock() mock_response.status_code = 404 - with patch("download_logs.requests.get", return_value=mock_response): - with patch("download_logs.time.sleep"): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): + with patch("daily_tests.download_logs.time.sleep"): result = downloader.download_log( "http://example.com/missing.log", "missing.log" ) @@ -163,7 +170,9 @@ def test_download_tmt_logs_downloads_logs_and_sets_data_link( mock_response.status_code = 200 mock_response.content = b"log content" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): downloader.download_tmt_logs() assert downloader.data_dir_url_link == "http://example.com/data" @@ -208,7 +217,9 @@ def test_download_container_logs_success(self, downloader, tmp_path): mock_response.text = "data dir" mock_response.content = b"log" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): result = downloader.download_container_logs() assert result is True @@ -222,7 +233,9 @@ def test_download_container_logs_failed_directory(self, downloader, tmp_path): mock_response.text = "results" mock_response.content = b"log" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): result = downloader.download_container_logs(is_failed=True) assert result is True @@ -232,7 +245,9 @@ def test_download_container_logs_http_error(self, downloader, capsys): mock_response = MagicMock() mock_response.status_code = 404 - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): result = downloader.download_container_logs() assert result is False @@ -248,9 +263,12 @@ def test_get_xml_report_public_url_for_fedora(self, downloader, capsys): mock_response.status_code = 200 mock_response.content = b"" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): with patch( - "download_logs.xmltodict.parse", return_value={"testsuites": {}} + "daily_tests.download_logs.xmltodict.parse", + return_value={"testsuites": {}}, ): result = downloader.get_xml_report() @@ -270,9 +288,12 @@ def test_get_xml_report_public_url_for_c9s( mock_response.status_code = 200 mock_response.content = b"" - with patch("download_logs.requests.get", return_value=mock_response): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): with patch( - "download_logs.xmltodict.parse", return_value={"testsuites": {}} + "daily_tests.download_logs.xmltodict.parse", + return_value={"testsuites": {}}, ): result = downloader.get_xml_report() @@ -291,10 +312,11 @@ def test_get_xml_report_private_url_for_rhel( mock_response.content = b"" with patch( - "download_logs.requests.get", return_value=mock_response + "daily_tests.download_logs.requests.get", return_value=mock_response ) as mock_get: with patch( - "download_logs.xmltodict.parse", return_value={"testsuites": {}} + "daily_tests.download_logs.xmltodict.parse", + return_value={"testsuites": {}}, ): result = downloader.get_xml_report() @@ -306,8 +328,10 @@ def test_get_xml_report_failure_after_retries(self, downloader, capsys): mock_response = MagicMock() mock_response.status_code = 500 - with patch("download_logs.requests.get", return_value=mock_response): - with patch("download_logs.time.sleep"): + with patch( + "daily_tests.download_logs.requests.get", return_value=mock_response + ): + with patch("daily_tests.download_logs.time.sleep"): result = downloader.get_xml_report() assert result is False diff --git a/daily_tests/tests/tmt_log_output b/daily-tests/tests/tmt_log_output similarity index 100% rename from daily_tests/tests/tmt_log_output rename to daily-tests/tests/tmt_log_output diff --git a/daily-tests/tox.ini b/daily-tests/tox.ini new file mode 100644 index 0000000..b89117b --- /dev/null +++ b/daily-tests/tox.ini @@ -0,0 +1,11 @@ +[tox] +package = skip + +[testenv] +commands = python3 -m pytest --color=yes -v --cov=daily_tests --cov-report=xml:coverage.xml +deps = + pytest + pytest-cov + PyYAML + requests + xmltodict diff --git a/run_nightly_tests.sh b/run_nightly_tests.sh index dd7115d..50f2b88 100755 --- a/run_nightly_tests.sh +++ b/run_nightly_tests.sh @@ -111,7 +111,7 @@ function run_tests() { touch "${DAILY_REPORTS_TESTS_DIR}/tmt_failed" fi cp "${LOG_FILE}" "${DAILY_REPORTS_TESTS_DIR}/testing_farm_${TARGET}_${TESTS}.txt" - python3 /root/ci-scripts/daily_tests/download_logs.py "${LOG_FILE}" "${TARGET}" "${TESTS}" + python3 /root/ci-scripts/daily-tests/daily_tests/download_logs.py "${LOG_FILE}" "${TARGET}" "${TESTS}" } if [[ "$TESTS" != "test" ]] && [[ "$TESTS" != "test-pytest" ]] && [[ "$TESTS" != "test-upstream" ]] && [[ "$TESTS" != "test-openshift-pytest" ]] && [[ "$TESTS" != "test-openshift-4" ]]; then diff --git a/tox.ini b/tox.ini index f28ef23..2ffdeaf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = daily_tests, ocp-stream-generator +envlist = daily-tests, ocp-stream-generator -[testenv:daily_tests] +[testenv:daily-tests] +changedir = daily-tests commands = python3 -m pytest --color=yes -v --cov=daily_tests --cov-report=xml:coverage.xml deps = pytest