Extract test cases correctly in run_ci_db_test.ps1 script (#7989)

Summary:
Extract test cases correctly in run_ci_db_test.ps1 script.

There are some new test group that are ended with # comments. Previously in the script when trying to extract test groups and test cases, the regex rule did not apply to this case so the concatenation of some test group and test case failed, see examples in comments.

Also removed useless trailing whitespaces in the script.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7989

Reviewed By: jay-zhuang

Differential Revision: D26615909

Pulled By: ajkr

fbshipit-source-id: 8e68d599994f17d6fefde0daa925c3018179521a
main
sherriiiliu 4 years ago committed by Facebook GitHub Bot
parent 46cf5fbfdd
commit f91fd0c944
  1. 12
      build_tools/run_ci_db_test.ps1

@ -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)) {

Loading…
Cancel
Save