@ -68,7 +68,7 @@ $BinariesFolder = -Join($RootFolder, "\build\Debug\")
if ( $WorkFolder -eq " " ) {
if ( $WorkFolder -eq " " ) {
# If TEST_TMPDIR is set use it
# If TEST_TMPDIR is set use it
[string] $var = $Env:TEST_TMPDIR
[string] $var = $Env:TEST_TMPDIR
if ( $var -eq " " ) {
if ( $var -eq " " ) {
$WorkFolder = -Join ( $RootFolder , " \db_tests\ " )
$WorkFolder = -Join ( $RootFolder , " \db_tests\ " )
@ -93,7 +93,7 @@ $ExcludeCasesSet = New-Object System.Collections.Generic.HashSet[string]
if ( $ExcludeCases -ne " " ) {
if ( $ExcludeCases -ne " " ) {
Write-Host " ExcludeCases: $ ExcludeCases "
Write-Host " ExcludeCases: $ ExcludeCases "
$l = $ExcludeCases -split ' '
$l = $ExcludeCases -split ' '
ForEach ( $t in $l ) {
ForEach ( $t in $l ) {
$ExcludeCasesSet . Add ( $t ) | Out-Null
$ExcludeCasesSet . Add ( $t ) | Out-Null
}
}
}
}
@ -102,7 +102,7 @@ $ExcludeExesSet = New-Object System.Collections.Generic.HashSet[string]
if ( $ExcludeExes -ne " " ) {
if ( $ExcludeExes -ne " " ) {
Write-Host " ExcludeExe: $ ExcludeExes "
Write-Host " ExcludeExe: $ ExcludeExes "
$l = $ExcludeExes -split ' '
$l = $ExcludeExes -split ' '
ForEach ( $t in $l ) {
ForEach ( $t in $l ) {
$ExcludeExesSet . Add ( $t ) | Out-Null
$ExcludeExesSet . Add ( $t ) | Out-Null
}
}
}
}
@ -118,6 +118,10 @@ if($ExcludeExes -ne "") {
# MultiThreaded/MultiThreadedDBTest.
# MultiThreaded/MultiThreadedDBTest.
# MultiThreaded/0 # GetParam() = 0
# MultiThreaded/0 # GetParam() = 0
# MultiThreaded/1 # GetParam() = 1
# MultiThreaded/1 # GetParam() = 1
# RibbonTypeParamTest/0. # TypeParam = struct DefaultTypesAndSettings
# CompactnessAndBacktrackAndFpRate
# Extremes
# FindOccupancyForSuccessRate
#
#
# into this:
# into this:
#
#
@ -125,6 +129,9 @@ if($ExcludeExes -ne "") {
# DBTest.WriteEmptyBatch
# DBTest.WriteEmptyBatch
# MultiThreaded/MultiThreadedDBTest.MultiThreaded/0
# MultiThreaded/MultiThreadedDBTest.MultiThreaded/0
# MultiThreaded/MultiThreadedDBTest.MultiThreaded/1
# MultiThreaded/MultiThreadedDBTest.MultiThreaded/1
# RibbonTypeParamTest/0.CompactnessAndBacktrackAndFpRate
# RibbonTypeParamTest/0.Extremes
# RibbonTypeParamTest/0.FindOccupancyForSuccessRate
#
#
# Output into the parameter in a form TestName -> Log File Name
# Output into the parameter in a form TestName -> Log File Name
function ExtractTestCases ( [string] $GTestExe , $HashTable ) {
function ExtractTestCases ( [string] $GTestExe , $HashTable ) {
@ -138,6 +145,8 @@ function ExtractTestCases([string]$GTestExe, $HashTable) {
ForEach ( $l in $Tests ) {
ForEach ( $l in $Tests ) {
# remove trailing comment if any
$l = $l -replace '\s+\#.*' , ''
# Leading whitespace is fine
# Leading whitespace is fine
$l = $l -replace '^\s+' , ''
$l = $l -replace '^\s+' , ''
# Trailing dot is a test group but no whitespace
# Trailing dot is a test group but no whitespace
@ -146,8 +155,7 @@ function ExtractTestCases([string]$GTestExe, $HashTable) {
} else {
} else {
# Otherwise it is a test name, remove leading space
# Otherwise it is a test name, remove leading space
$test = $l
$test = $l
# remove trailing comment if any and create a log name
# create a log name
$test = $test -replace '\s+\#.*' , ''
$test = " $ Group $ test "
$test = " $ Group $ test "
if ( $ExcludeCasesSet . Contains ( $test ) ) {
if ( $ExcludeCasesSet . Contains ( $test ) ) {
@ -253,7 +261,7 @@ if($Run -ne "") {
$DiscoveredExe = @ ( )
$DiscoveredExe = @ ( )
dir -Path $search_path | ForEach-Object {
dir -Path $search_path | ForEach-Object {
$DiscoveredExe + = ( $_ . Name )
$DiscoveredExe + = ( $_ . Name )
}
}
# Remove exclusions
# Remove exclusions
@ -293,7 +301,7 @@ if($SuiteRun -ne "") {
$ListOfExe = @ ( )
$ListOfExe = @ ( )
dir -Path $search_path | ForEach-Object {
dir -Path $search_path | ForEach-Object {
$ListOfExe + = ( $_ . Name )
$ListOfExe + = ( $_ . Name )
}
}
# Exclude those in RunOnly from running as suites
# Exclude those in RunOnly from running as suites
@ -348,7 +356,7 @@ function RunJobs($Suites, $TestCmds, [int]$ConcurrencyVal)
# Wait for all to finish and get the results
# Wait for all to finish and get the results
while ( ( $JobToLog . Count -gt 0 ) -or
while ( ( $JobToLog . Count -gt 0 ) -or
( $TestCmds . Count -gt 0 ) -or
( $TestCmds . Count -gt 0 ) -or
( $Suites . Count -gt 0 ) ) {
( $Suites . Count -gt 0 ) ) {
# Make sure we have maximum concurrent jobs running if anything
# Make sure we have maximum concurrent jobs running if anything
@ -468,8 +476,8 @@ RunJobs -Suites $CasesToRun -TestCmds $TestExes -ConcurrencyVal $Concurrency
$EndDate = ( Get-Date )
$EndDate = ( Get-Date )
New-TimeSpan -Start $StartDate -End $EndDate |
New-TimeSpan -Start $StartDate -End $EndDate |
ForEach-Object {
ForEach-Object {
" Elapsed time: {0:g} " -f $_
" Elapsed time: {0:g} " -f $_
}
}
@ -484,4 +492,4 @@ if(!$script:success) {
exit 0
exit 0