Add support for db_test2 for dev and CI runs
This commit is contained in:
parent
3996770d0b
commit
e7cc49cbdf
@ -9,7 +9,7 @@ Param(
|
|||||||
[string]$WorkFolder = "", # Direct tests to use that folder
|
[string]$WorkFolder = "", # Direct tests to use that folder
|
||||||
[int]$Limit = -1, # -1 means run all otherwise limit for testing purposes
|
[int]$Limit = -1, # -1 means run all otherwise limit for testing purposes
|
||||||
[string]$Exclude = "", # Expect a comma separated list, no spaces
|
[string]$Exclude = "", # Expect a comma separated list, no spaces
|
||||||
[string]$Run = "db_test", # Run db_test|tests|testname1,testname2...
|
[string]$Run = "db_test", # Run db_test|db_test2|tests|testname1,testname2...
|
||||||
# Number of async tasks that would run concurrently. Recommend a number below 64.
|
# Number of async tasks that would run concurrently. Recommend a number below 64.
|
||||||
# However, CPU utlization really depends on the storage media. Recommend ram based disk.
|
# However, CPU utlization really depends on the storage media. Recommend ram based disk.
|
||||||
# a value of 1 will run everything serially
|
# a value of 1 will run everything serially
|
||||||
@ -46,15 +46,25 @@ if($WorkFolder -eq "") {
|
|||||||
$Env:TEST_TMPDIR = $WorkFolder
|
$Env:TEST_TMPDIR = $WorkFolder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Output "Root: $RootFolder, WorkFolder: $WorkFolder"
|
||||||
|
|
||||||
# Use JEMALLOC executables
|
# Use JEMALLOC executables
|
||||||
|
if($Run -ceq "db_test" -or
|
||||||
|
$Run -ceq "db_test2" ) {
|
||||||
|
|
||||||
|
$file_name = $Run
|
||||||
|
|
||||||
if($EnableJE) {
|
if($EnableJE) {
|
||||||
$db_test = -Join ($BinariesFolder, "db_test_je.exe")
|
$file_name += "_je"
|
||||||
} else {
|
|
||||||
$db_test = -Join ($BinariesFolder, "db_test.exe")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output "Root: $RootFolder, WorkFolder: $WorkFolder"
|
$file_name += ".exe"
|
||||||
|
|
||||||
|
$db_test = -Join ($BinariesFolder, $file_name)
|
||||||
|
|
||||||
Write-Output "Binaries: $BinariesFolder db_test: $db_test"
|
Write-Output "Binaries: $BinariesFolder db_test: $db_test"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#Exclusions that we do not want to run
|
#Exclusions that we do not want to run
|
||||||
$ExcludeTests = New-Object System.Collections.Generic.HashSet[string]
|
$ExcludeTests = New-Object System.Collections.Generic.HashSet[string]
|
||||||
@ -153,7 +163,8 @@ function Discover-TestBinaries([string]$Pattern, $HashTable) {
|
|||||||
|
|
||||||
$TestsToRun = [ordered]@{}
|
$TestsToRun = [ordered]@{}
|
||||||
|
|
||||||
if($Run -ceq "db_test") {
|
if($Run -ceq "db_test" -or
|
||||||
|
$Run -ceq "db_test2") {
|
||||||
Normalize-DbTests -HashTable $TestsToRun
|
Normalize-DbTests -HashTable $TestsToRun
|
||||||
} elseif($Run -ceq "tests") {
|
} elseif($Run -ceq "tests") {
|
||||||
if($EnableJE) {
|
if($EnableJE) {
|
||||||
@ -225,7 +236,8 @@ function RunJobs($TestToLog, [int]$ConcurrencyVal, [bool]$AddForRerun)
|
|||||||
Write-Host "Starting $k"
|
Write-Host "Starting $k"
|
||||||
$log_path = ($TestToLog.$k)
|
$log_path = ($TestToLog.$k)
|
||||||
|
|
||||||
if($Run -ceq "db_test") {
|
if($Run -ceq "db_test" -or
|
||||||
|
$Run -ceq "db_test2") {
|
||||||
$job = Start-Job -Name $k -ScriptBlock $InvokeTestCase -ArgumentList @($db_test,$k,$log_path)
|
$job = Start-Job -Name $k -ScriptBlock $InvokeTestCase -ArgumentList @($db_test,$k,$log_path)
|
||||||
} else {
|
} else {
|
||||||
[string]$Exe = -Join ($BinariesFolder, $k)
|
[string]$Exe = -Join ($BinariesFolder, $k)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user