Add ETW tracing to CI/CD test run (#1020)

* Add ETW tracing to CI/CD test run

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Add ETW tracing to CI/CD test run

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Add ETW tracing to CI/CD test run

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Fix yaml

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Fix yaml

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Limit etw to where it makes sense

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
This commit is contained in:
Alan Jowett 2022-04-26 14:37:48 -06:00 коммит произвёл GitHub
Родитель ece1044444
Коммит ecc4d2d701
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 20 добавлений и 0 удалений

3
.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

17
.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}}