-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for schduled kernel mode multi-threaded stress tests in g…
…h ci/cd (#2670) Co-authored-by: Dhiren Vispute <[email protected]>
- Loading branch information
Showing
8 changed files
with
128 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright (c) Microsoft Corporation | ||
# SPDX-License-Identifier: MIT | ||
|
||
param ([parameter(Mandatory=$false)][string] $Target = "TEST_VM", | ||
[parameter(Mandatory=$false)][string] $LogFileName = "TestLog.log", | ||
[parameter(Mandatory=$false)][string] $WorkingDirectory = $pwd.ToString(), | ||
[parameter(Mandatory=$false)][string] $TestExecutionJsonFileName = "test_execution.json", | ||
[parameter(Mandatory=$false)][string] $SelfHostedRunnerName) | ||
|
||
Push-Location $WorkingDirectory | ||
|
||
$TestVMCredential = Get-StoredCredential -Target $Target -ErrorAction Stop | ||
|
||
# Load other utility modules. | ||
Import-Module .\common.psm1 -Force -ArgumentList ($LogFileName) -WarningAction SilentlyContinue | ||
Import-Module .\config_test_vm.psm1 -Force -ArgumentList ($TestVMCredential.UserName, $TestVMCredential.Password, $WorkingDirectory, $LogFileName) -WarningAction SilentlyContinue | ||
|
||
# Read the test execution json. | ||
$TestExecutionConfig = Get-Content ("{0}\{1}" -f $PSScriptRoot, $TestExecutionJsonFileName) | ConvertFrom-Json | ||
$VMList = $TestExecutionConfig.VMMap.$SelfHostedRunnerName | ||
|
||
# Delete old log files if any. | ||
Remove-Item "$env:TEMP\$LogFileName" -ErrorAction SilentlyContinue | ||
foreach($VM in $VMList) { | ||
$VMName = $VM.Name | ||
Remove-Item $env:TEMP\$LogFileName -ErrorAction SilentlyContinue | ||
} | ||
Remove-Item ".\TestLogs" -Recurse -Confirm:$false -ErrorAction SilentlyContinue | ||
|
||
# Get all VMs to ready state. | ||
Initialize-AllVMs -VMList $VMList -ErrorAction Stop | ||
|
||
# Export build artifacts to the test VMs. | ||
Export-BuildArtifactsToVMs -VMList $VMList -ErrorAction Stop | ||
|
||
# Install eBPF Components on the test VM. | ||
foreach($VM in $VMList) { | ||
$VMName = $VM.Name | ||
Install-eBPFComponentsOnVM -VMName $VMname -ErrorAction Stop | ||
} | ||
|
||
Pop-Location |
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