[3.1] re-enable Windows testing (#19034)

If anyone's been wondering why we've had so few Windows failures lately,
this is why.
This commit is contained in:
Gary Verhaegen 2024-04-18 14:25:28 +02:00 committed by GitHub
parent fc56e399d8
commit 52c63cdfde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,39 +78,37 @@ function Has-Run-All-Tests-Trailer {
$run_all_tests -eq "true"
}
if ($env:SKIP_TESTS -ceq "False") {
# Generate mapping from shortened scala-test names on Windows to long names on Linux and MacOS.
./ci/remap-scala-test-short-names.ps1 `
| Out-File -Encoding UTF8 -NoNewline scala-test-suite-name-map.json
# Generate mapping from shortened scala-test names on Windows to long names on Linux and MacOS.
./ci/remap-scala-test-short-names.ps1 `
| Out-File -Encoding UTF8 -NoNewline scala-test-suite-name-map.json
$FEWER_TESTS_FILTER = "-main-only"
$FEWER_TESTS_FILTER = "-main-only"
$tag_filter = "-dev-canton-test"
switch ($env:TEST_MODE) {
'main' {
Write-Output "Running all tests because TEST_MODE is 'main'"
}
'pr' {
if (Has-Run-All-Tests-Trailer) {
Write-Output "ignoring 'pr' test mode because the commit message features 'run-all-tests: true'"
} else {
Write-Output "Running fewer tests because TEST_MODE is 'pr'"
$tag_filter = "$tag_filter,$FEWER_TESTS_FILTER"
}
}
Default {
Write-Output "<< unknown test mode: $env:TEST_MODE)"
throw ("Was given an unknown test mode: $env:TEST_MODE")
}
$tag_filter = "-dev-canton-test"
switch ($env:TEST_MODE) {
'main' {
Write-Output "Running all tests because TEST_MODE is 'main'"
}
'pr' {
if (Has-Run-All-Tests-Trailer) {
Write-Output "ignoring 'pr' test mode because the commit message features 'run-all-tests: true'"
} else {
Write-Output "Running fewer tests because TEST_MODE is 'pr'"
$tag_filter = "$tag_filter,$FEWER_TESTS_FILTER"
}
Write-Output "Running bazel test with the following tag filters: $tag_filter"
bazel test //... `
`-`-build_tag_filters "$tag_filter" `
`-`-test_tag_filters "$tag_filter" `
`-`-profile test-profile.json `
`-`-experimental_profile_include_target_label `
`-`-build_event_json_file test-events.json `
`-`-build_event_publish_all_actions `
}
Default {
Write-Output "<< unknown test mode: $env:TEST_MODE)"
throw ("Was given an unknown test mode: $env:TEST_MODE")
}
}
Write-Output "Running bazel test with the following tag filters: $tag_filter"
bazel test //... `
`-`-build_tag_filters "$tag_filter" `
`-`-test_tag_filters "$tag_filter" `
`-`-profile test-profile.json `
`-`-experimental_profile_include_target_label `
`-`-build_event_json_file test-events.json `
`-`-build_event_publish_all_actions `