From ecc4d2d701e1070e626ddab38327d2b8a7eadfac Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Tue, 26 Apr 2022 14:37:48 -0600 Subject: [PATCH] Add ETW tracing to CI/CD test run (#1020) * Add ETW tracing to CI/CD test run Signed-off-by: Alan Jowett * Add ETW tracing to CI/CD test run Signed-off-by: Alan Jowett * Add ETW tracing to CI/CD test run Signed-off-by: Alan Jowett * Fix yaml Signed-off-by: Alan Jowett * Fix yaml Signed-off-by: Alan Jowett * Limit etw to where it makes sense Signed-off-by: Alan Jowett Co-authored-by: Alan Jowett --- .github/workflows/cicd.yml | 3 +++ .github/workflows/reusable-test.yml | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a38946ee2..83bece734 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -70,6 +70,7 @@ jobs: environment: windows-2019 code_coverage: true gather_dumps: true + capture_etw: true # Run the fuzzing tests in GitHub. fuzzing: @@ -95,6 +96,7 @@ jobs: environment: windows-2019 code_coverage: true gather_dumps: true + capture_etw: true # Run Cilium regression tests in GitHub. cilium_tests: @@ -151,3 +153,4 @@ jobs: environment: windows-2019 code_coverage: false gather_dumps: true + capture_etw: true diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index a6ea5f923..5eecca2d9 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -42,6 +42,9 @@ on: post_test: required: false type: string + capture_etw: + required: false + type: boolean permissions: checks: read # Required by fountainhead/action-wait-for-check to wait for another GitHub check to complete. @@ -120,6 +123,14 @@ jobs: name: ${{inputs.build_artifact}} ${{matrix.configurations}} path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}} + - name: Start ETW tracing + id: start_etw_tracing + if: inputs.capture_etw == true + shell: cmd + run: | + mkdir ${{github.workspace}}\${{env.BUILD_PLATFORM}}\${{env.BUILD_CONFIGURATION}}\TestLogs + wpr.exe -start ${{github.workspace}}\${{env.BUILD_PLATFORM}}\${{env.BUILD_CONFIGURATION}}\ebpfforwindows.wprp -filemode + - name: Run test with Code Coverage if: inputs.code_coverage == true id: run_test_with_code_coverage @@ -210,6 +221,12 @@ jobs: if ($${{ steps.test.upload_code_coverage_report_4!='failure' }}) { exit 0 } exit 1 + - name: Stop ETW tracing + id: stop_etw_tracing + if: inputs.capture_etw == true + shell: cmd + run: wpr.exe -stop ${{github.workspace}}\${{env.BUILD_PLATFORM}}\${{env.BUILD_CONFIGURATION}}\TestLogs\ebpfforwindows.etl + - name: Check for crash dumps if: inputs.gather_dumps == true working-directory: c:/dumps/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}