提交 e3802531 编写于 作者: I Islam AbdelRahman

Merge pull request #1050 from yuslepukhin/support_db_test2

Add support for db_test2 for dev and CI runs
...@@ -9,7 +9,7 @@ Param( ...@@ -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 "") { ...@@ -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($EnableJE) { if($Run -ceq "db_test" -or
$db_test = -Join ($BinariesFolder, "db_test_je.exe") $Run -ceq "db_test2" ) {
} else {
$db_test = -Join ($BinariesFolder, "db_test.exe") $file_name = $Run
if($EnableJE) {
$file_name += "_je"
}
$file_name += ".exe"
$db_test = -Join ($BinariesFolder, $file_name)
Write-Output "Binaries: $BinariesFolder db_test: $db_test"
} }
Write-Output "Root: $RootFolder, WorkFolder: $WorkFolder"
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) { ...@@ -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) ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册