From 392de0049a68f3a789e59b5b2f7f15d1f7a29b65 Mon Sep 17 00:00:00 2001 From: M0stafaRady Date: Thu, 17 Oct 2024 14:23:31 +0300 Subject: [PATCH] Add skip gl flag --- .github/scripts/get_tests_matrix.py | 10 ++++++---- .github/workflows/run_IP.yaml | 9 +++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/scripts/get_tests_matrix.py b/.github/scripts/get_tests_matrix.py index 1545192..7cc0bba 100644 --- a/.github/scripts/get_tests_matrix.py +++ b/.github/scripts/get_tests_matrix.py @@ -6,6 +6,7 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument("--tests", nargs="*") parser.add_argument("--buses", nargs="*") + parser.add_argument("--skip-gl") args = parser.parse_args() tests = args.tests buses = args.buses @@ -13,10 +14,11 @@ def main(): output_matrix = {"tests": []} for test in tests: output_matrix["tests"].append({"test": test, "tag": "RTL"}) - gl_tests = [] - for name in test.split(): - gl_tests.append(f"gl_{name}") - output_matrix["tests"].append({"test": " ".join(gl_tests), "tag": "GL"}) + if args.skip_gl.lower() != "yes": + gl_tests = [] + for name in test.split(): + gl_tests.append(f"gl_{name}") + output_matrix["tests"].append({"test": " ".join(gl_tests), "tag": "GL"}) output_matrix_with_buses = {"tests": []} for bus in buses: diff --git a/.github/workflows/run_IP.yaml b/.github/workflows/run_IP.yaml index 3ec5123..0534223 100644 --- a/.github/workflows/run_IP.yaml +++ b/.github/workflows/run_IP.yaml @@ -24,6 +24,11 @@ on: description: 'Bus Types' required: true type: string + skip-gl: + description: 'Skip GL Tests' + required: false + type: string + default: no jobs: Setup-Work-Space: runs-on: ubuntu-latest @@ -97,8 +102,8 @@ jobs: - name: Set Tests Matrix id: set-tests-matrix run: | - python3 ${{ env.EF_UVM_PATH }}/.github/scripts/get_tests_matrix.py --tests ${{ inputs.test-names }} --buses ${{ inputs.buses }} - echo "tests=$(python3 ${{ env.EF_UVM_PATH }}/.github/scripts/get_tests_matrix.py --tests ${{ inputs.test-names }} --buses ${{ inputs.buses }})" >> "$GITHUB_OUTPUT" + python3 ${{ env.EF_UVM_PATH }}/.github/scripts/get_tests_matrix.py --tests ${{ inputs.test-names }} --buses ${{ inputs.buses }} --skip-gl ${{ inputs.skip-gl }} + echo "tests=$(python3 ${{ env.EF_UVM_PATH }}/.github/scripts/get_tests_matrix.py --tests ${{ inputs.test-names }} --buses ${{ inputs.buses }}) --skip-gl ${{ inputs.skip-gl }}" >> "$GITHUB_OUTPUT" Run-IP: needs: [Setup-Work-Space, Prepare-Tests-Matrix]