diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8f3f61f4d3c..22d0c6a126a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -388,7 +388,7 @@ jobs: PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }} run: | source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 -m "solvers and not flaky_linux" + pytest ${PYTEST_ARGUMENTS} --timeout=600 -m solvers - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 @@ -553,7 +553,7 @@ jobs: timeout_minutes: 120 command: | source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=600 -m "general and not flaky_linux" + pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=600 -m general - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 @@ -1288,7 +1288,7 @@ jobs: timeout_minutes: 120 command: | source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 -m "extensions and not flaky_linux" + pytest ${PYTEST_ARGUMENTS} --timeout=600 -m extensions - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 if: steps.changes.outputs.run_tests == 'true' @@ -1545,91 +1545,6 @@ jobs: name: pytest-emit-windows path: junit/test-results.xml - # ================================================================================================= - # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - # ================================================================================================= - - system-tests-flaky-linux: - name: Test flaky (linux) - if: github.event.pull_request.draft == false - needs: [integration-tests] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - persist-credentials: false - fetch-depth: 0 - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 - - - name: Setup Python - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: ${{ env.TESTS_VERSION }} - - - name: Set up uv - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - with: - enable-cache: false - prune-cache: true - - - name: Create virtual environment - run: uv venv .venv - - - name: Upgrade wheel and setuptools - run: | - source .venv/bin/activate - uv pip install -U wheel setuptools - - - - - name: Install pyaedt and tests dependencies - run: | - source .venv/bin/activate - uv pip install .[tests] - - - - - name: Remove Ansys processes (if any) - shell: bash - run: | - for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do - echo "Killing PID $pid" - kill -9 "$pid" - done - - - - name: Run tests marked with 'flaky' - env: - ANSYSEM: ${{ env.ANSYSEM_ROOT252 }} - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 -m flaky_linux - - - - - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 - with: - name: codecov-system-flaky-tests-linux - files: ./coverage.xml - flags: linux_system_flaky - - - name: Upload pytest test results - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: pytest-flaky-linux - path: junit/test-results.xml - package: name: Package library needs: [system-tests-solvers-windows, @@ -1646,7 +1561,6 @@ jobs: system-tests-extensions-linux, system-tests-filter-windows, system-tests-emit-windows, - system-tests-flaky-linux, doc-build] runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/manual_draft.yml b/.github/workflows/manual_draft.yml index a93a76cbae8..93c3e7f6f0b 100644 --- a/.github/workflows/manual_draft.yml +++ b/.github/workflows/manual_draft.yml @@ -59,13 +59,6 @@ on: options: - 'yes' - 'no' - test-flaky-linux: - description: "Testing Flaky (Linux)" - type: choice - default: 'no' - options: - - 'yes' - - 'no' test-emit-windows: description: "Testing Emit (Windows)" default: 'no' @@ -636,7 +629,7 @@ jobs: command: | export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m "extensions and not flaky_linux" + pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m extensions - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: @@ -651,80 +644,6 @@ jobs: path: junit/test-results.xml if: ${{ always() }} - system-tests-flaky-linux: - name: Test flaky (linux) - if: github.event.inputs.test-flaky-linux == 'yes' - - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - persist-credentials: false - - - name: Setup Python - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - env: - ANSYSEM: ${{ env.ANSYSEM_ROOT252 }} - run: | - python -m venv .venv - source .venv/bin/activate - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - env: - ANSYSEM: ${{ env.ANSYSEM_ROOT252 }} - run: | - source .venv/bin/activate - pip install .[tests] - - - name: "Install X Virtual Frame Buffer" - run: | - sudo apt-get update - sudo apt-get install -y xvfb - - - name: Remove Ansys processes (if any) - shell: bash - run: | - for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do - echo "Killing PID $pid" - kill -9 "$pid" - done - - - name: Run tests marked with 'flaky' - env: - ANSYSEM: ${{ env.ANSYSEM_ROOT252 }} - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - source .venv/bin/activate - xvfb-run pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m flaky_linux - - - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 - with: - name: codecov-system-flaky-tests-linux - files: ./coverage.xml - flags: linux_system_flaky - - - name: Upload pytest test results - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: pytest-flaky-linux - path: junit/test-results.xml - if: ${{ always() }} system-tests-emit-windows: name: Test EMIT (windows) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index c391057b830..283ce72555c 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -159,7 +159,7 @@ jobs: command: | export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m "extensions and not flaky_linux" + pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m extensions - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: @@ -316,79 +316,3 @@ jobs: with: name: pytest-emit-windows path: junit/test-results.xml - - # ================================================================================================= - # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - # ================================================================================================= - - system-tests-flaky-linux: - name: Test flaky (linux) - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - persist-credentials: false - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 - - - name: Setup Python - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Set up uv - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - with: - enable-cache: false - prune-cache: true - - - name: Create virtual environment - run: uv venv .venv - - - name: Upgrade wheel and setuptools - run: | - source .venv/bin/activate - uv pip install -U wheel setuptools - - - name: Install pyaedt and tests dependencies - run: | - source .venv/bin/activate - uv pip install .[tests] - - - name: Remove Ansys processes (if any) - shell: bash - run: | - for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do - echo "Killing PID $pid" - kill -9 "$pid" - done - - - name: Run tests marked with 'flaky' - env: - ANSYSEM: ${{ env.ANSYSEM_ROOT252 }} - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m flaky_linux - - - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 - with: - name: codecov-system-flaky-tests-linux - files: ./coverage.xml - flags: linux_system_flaky - - - name: Upload pytest test results - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: pytest-flaky-linux - path: junit/test-results.xml diff --git a/doc/changelog.d/7068.maintenance.md b/doc/changelog.d/7068.maintenance.md new file mode 100644 index 00000000000..fcd2c790028 --- /dev/null +++ b/doc/changelog.d/7068.maintenance.md @@ -0,0 +1 @@ +Delete flaky tests diff --git a/pyproject.toml b/pyproject.toml index dd8f1600e53..434937a08f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -275,8 +275,6 @@ markers = [ "extensions: mark a test as related to extensions.", "filter_solutions: mark a test as related to filter solutions.", "emit: mark a test as related to EMIT features.", - "flaky_linux: mark a test as flaky on Linux systems.", - "flaky_windows: mark a test as flaky on Windows systems.", "avoid_ansys_load: mark a test that should avoid LD_LIBRARY_PATH modifications.", ] filterwarnings = [ diff --git a/tests/system/extensions/test_export_layout.py b/tests/system/extensions/test_export_layout.py index cd87aa8e2ed..91c711874e6 100644 --- a/tests/system/extensions/test_export_layout.py +++ b/tests/system/extensions/test_export_layout.py @@ -46,7 +46,6 @@ def cleanup_files(*files): export_file.unlink() -@pytest.mark.flaky_linux @pytest.mark.skipif(is_linux, reason="Lead to Python fatal error on Linux machines.") def test_export_layout_all_options(add_app_example, test_tmp_dir): """Test successful execution of export layout with all options enabled.""" @@ -90,7 +89,6 @@ def test_export_layout_all_options(add_app_example, test_tmp_dir): assert isinstance(config_data, dict) -@pytest.mark.flaky_linux @pytest.mark.skipif(is_linux, reason="Lead to Python fatal error on Linux machines.") def test_export_layout_ipc_only(add_app_example, test_tmp_dir): """Test export layout with only IPC2581 option enabled.""" @@ -158,7 +156,6 @@ def test_export_layout_bom_only(add_app_example, test_tmp_dir): assert bom_file.stat().st_size > 0 -@pytest.mark.flaky_linux @pytest.mark.skipif(is_linux, reason="Lead to Python fatal error on Linux machines.") def test_export_layout_config_only(add_app_example, test_tmp_dir): """Test export layout with only configuration option enabled.""" @@ -197,7 +194,6 @@ def test_export_layout_config_only(add_app_example, test_tmp_dir): assert isinstance(config_data, dict) -@pytest.mark.flaky_linux @pytest.mark.skipif(is_linux, reason="Lead to Python fatal error on Linux machines.") def test_export_layout_no_options(add_app_example, test_tmp_dir): """Test export layout with all options disabled.""" diff --git a/tests/system/extensions/test_post_layout_design.py b/tests/system/extensions/test_post_layout_design.py index 9313a10d821..9ef19cac5c1 100644 --- a/tests/system/extensions/test_post_layout_design.py +++ b/tests/system/extensions/test_post_layout_design.py @@ -146,7 +146,6 @@ def test_layout_design_toolkit_unknown_action(add_app_example): h3d.close_project(save=False) -@pytest.mark.flaky_linux def test_layout_design_toolkit_microvia(add_app_example): """Test microvia creation with conical shape.""" h3d = add_app_example( diff --git a/tests/system/extensions/test_via_clustering.py b/tests/system/extensions/test_via_clustering.py index a67a30eccb0..0b4906e379e 100644 --- a/tests/system/extensions/test_via_clustering.py +++ b/tests/system/extensions/test_via_clustering.py @@ -35,7 +35,6 @@ from tests import TESTS_EXTENSIONS_PATH -@pytest.mark.flaky_linux def test_via_clustering_main_function(test_tmp_dir): """Test the main function of the Via Clustering extension.""" # Copy test model to scratch directory diff --git a/tests/system/solvers/sequential/test_circuit_netlist.py b/tests/system/solvers/sequential/test_circuit_netlist.py index 817c0c47aed..ee14f087a6f 100644 --- a/tests/system/solvers/sequential/test_circuit_netlist.py +++ b/tests/system/solvers/sequential/test_circuit_netlist.py @@ -41,7 +41,6 @@ def netlist_test(add_app_example): app.close_project(save=False) -@pytest.mark.flaky_linux def test_post(netlist_test): if NON_GRAPHICAL: assert len(netlist_test.post.plots) == 0 @@ -49,7 +48,6 @@ def test_post(netlist_test): assert len(netlist_test.post.plots) == 1 -@pytest.mark.flaky_linux def test_browse_log_file(netlist_test, test_tmp_dir): assert not netlist_test.browse_log_file() netlist_test.analyze()