From 6c1295a0d8795d122670d44614d5eb4e37000fa5 Mon Sep 17 00:00:00 2001 From: Arthur <48595927+ArthurZucker@users.noreply.github.com> Date: Tue, 23 Apr 2024 08:05:42 +0200 Subject: [PATCH] show `-rs` to show skip reasons (#30318) --- .circleci/create_circleci_config.py | 4 ++-- .github/workflows/model_jobs.yml | 2 +- .github/workflows/push-important-models.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index 9a0c488c74f7a5..d29a18a5c34fdf 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -142,7 +142,7 @@ def to_dict(self): test_command = "" if self.command_timeout: test_command = f"timeout {self.command_timeout} " - test_command += f"python -m pytest --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags) + test_command += f"python -m pytest -rs --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags) if self.parallelism == 1: if self.tests_to_run is None: @@ -196,7 +196,7 @@ def to_dict(self): test_command = "" if self.timeout: test_command = f"timeout {self.timeout} " - test_command += f"python -m pytest -n {self.pytest_num_workers} " + " ".join(pytest_flags) + test_command += f"python -m pytest -rs -n {self.pytest_num_workers} " + " ".join(pytest_flags) test_command += " $(cat splitted_tests.txt)" if self.marker is not None: test_command += f" -m {self.marker}" diff --git a/.github/workflows/model_jobs.yml b/.github/workflows/model_jobs.yml index 978e5f617e3ae5..2ba0b917cad9dd 100644 --- a/.github/workflows/model_jobs.yml +++ b/.github/workflows/model_jobs.yml @@ -80,7 +80,7 @@ jobs: - name: Run all tests on GPU working-directory: /transformers - run: python3 -m pytest -v --make-reports=${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }} + run: python3 -m pytest -rs -v --make-reports=${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }} - name: Failure short reports if: ${{ failure() }} diff --git a/.github/workflows/push-important-models.yml b/.github/workflows/push-important-models.yml index 5a6aeec2bd60ce..2b90386dca2b57 100644 --- a/.github/workflows/push-important-models.yml +++ b/.github/workflows/push-important-models.yml @@ -86,7 +86,7 @@ jobs: - name: Run FA2 tests id: run_fa2_tests run: - pytest -m "flash_attn_test" --make-reports=${{ matrix.model-name }}_fa2_tests/ tests/${{ matrix.model-name }}/test_modeling_* + pytest -rs -m "flash_attn_test" --make-reports=${{ matrix.model-name }}_fa2_tests/ tests/${{ matrix.model-name }}/test_modeling_* - name: "Test suite reports artifacts: ${{ matrix.model-name }}_fa2_tests" if: ${{ always() }} @@ -108,7 +108,7 @@ jobs: id: run_integration_tests if: always() run: - pytest -k "IntegrationTest" --make-reports=tests_integration_${{ matrix.model-name }} tests/${{ matrix.model-name }}/test_modeling_* + pytest -rs -k "IntegrationTest" --make-reports=tests_integration_${{ matrix.model-name }} tests/${{ matrix.model-name }}/test_modeling_* - name: "Test suite reports artifacts: tests_integration_${{ matrix.model-name }}" if: ${{ always() }}