-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split fips integration tests into two steps (#17038)
* Split fips integration tests into two steps The integration tests suite takes about 40 minutes. This is far too slow for reasonable feedback on a PR. This commit follows the pattern for the non-fips integration tests whereby the tests are split into two sections that can run in parallel across two steps. This should halve the feedback time. The logic for getting a list of specs files to run has been extracted to a shared shell script for use here and in the integration tests shell script. * Use shared function for splitting integration tests The logic for getting a list of specs to run has been extracted so that it can be shared across fips and non fips integration test modes. This commit updates the non fips integration tests to use the shared function. * fix typo in helper name (kebab case, not snake) * Escape $ so buildkite upload does not try to interpolate * Wrap integration tests in shell script to avoid BK interpolation * Move entrypoint for running integration tests inside docker
- Loading branch information
Showing
4 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# get_test_half returns either the first or second half of integration tests | ||
# Usage: get_test_half <half_number> | ||
# half_number: 0 for first half, 1 for second half | ||
get_test_half() { | ||
local half_number=$1 | ||
# Ensure only spec files go to stdout | ||
pushd qa/integration >/dev/null 2>&1 | ||
|
||
# Collect all spec files | ||
local glob1=(specs/*spec.rb) | ||
local glob2=(specs/**/*spec.rb) | ||
local all_specs=("${glob1[@]}" "${glob2[@]}") | ||
|
||
# Calculate the split point | ||
local split_point=$((${#all_specs[@]} / 2)) | ||
|
||
# Get the requested half (:: is "up to", : is "from") | ||
if [[ $half_number -eq 0 ]]; then | ||
local specs="${all_specs[@]::$split_point}" | ||
else | ||
local specs="${all_specs[@]:$split_point}" | ||
fi | ||
popd >/dev/null 2>&1 | ||
echo "$specs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# get_test_half returns either the first or second half of integration tests | ||
# Usage: get_test_half <half_number> | ||
# half_number: 0 for first half, 1 for second half | ||
|
||
half_number=$1 | ||
source ci/get-test-half.sh | ||
specs=$(get_test_half "$half_number") | ||
./gradlew --info --stacktrace -PrunTestsInFIPSMode=true runIntegrationTests -PrubyIntegrationSpecs="$specs" |