-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add E2E Split Server to Drone, support parrallel testing in Drone (#9940
) * Fix SE old test name * E2E: support multiple VMs at once in CI with time prefix * Add local binary support to split server test, add to drone CI * Cleanup old VMs in drone Signed-off-by: Derek Nola <[email protected]>
- Loading branch information
Showing
21 changed files
with
165 additions
and
41 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
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
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
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
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,35 @@ | ||
#!/bin/bash | ||
|
||
# Clean up any VMS that are older than 2 hours. | ||
# | ||
# We embed the time in the VM name, so we can easily filter them out. | ||
|
||
# Get the current time in seconds since the epoch | ||
current_time=$(date +%s) | ||
|
||
# Get the list of VMs | ||
vms=$(virsh list --name --all) | ||
time_regex="_([0-9]+)_(server|agent)" | ||
# Cleanup running VMs, happens if a previous test panics | ||
for vm in $vms; do | ||
if [[ $vm =~ $time_regex ]]; then | ||
vm_time="${BASH_REMATCH[1]}" | ||
age=$((current_time - vm_time)) | ||
if [ $age -gt 7200 ]; then | ||
virsh destroy $vm | ||
virsh undefine $vm --remove-all-storage | ||
fi | ||
fi | ||
done | ||
|
||
# Cleanup inactive domains, happens if previous test is canceled | ||
vms=$(virsh list --name --inactive) | ||
for vm in $vms; do | ||
if [[ $vm =~ $time_regex ]]; then | ||
vm_time="${BASH_REMATCH[1]}" | ||
age=$((current_time - vm_time)) | ||
if [ $age -gt 7200 ]; then | ||
virsh undefine $vm --remove-all-storage | ||
fi | ||
fi | ||
done |
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
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
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
Oops, something went wrong.