This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit e8bc15f60a7280cbe44503eea133dadb85affb17 Author: Shad Storhaug <[email protected]> AuthorDate: Tue Aug 25 00:53:21 2020 +0700 azure-pipelines.yml: Added option to disable asserts when running tests --- azure-pipelines.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2632b46..2c00b49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,6 +36,7 @@ name: 'vNext$(rev:.r)' # Format for build number (will be overridden) # Testing variables # RunTests: 'true' (Optional - set to 'false' to disable test jobs - useful for debugging. If not provided, tests will be run.) +# AssertsEnabled: 'true' (Optional - set to 'false' to run tests without asserts, which is less thorough. This can speed up testing and verify the application will run without asserts.) # IsNightly: 'false' (Optional - set to 'true' to run additional tests for the nightly build) # IsWeekly: 'false' (Optional - set to 'true' to run additional tests for the weekly build) # RunSlowTests: 'true' (Optional - set to 'false' to skip slow tests to make testing time shorter) @@ -143,6 +144,7 @@ stages: - pwsh: | # Generate a lucene.testsettings.json file for use with the test framework + $assert = if ($Env:AssertsEnabled -ne 'false') { 'true' } else { 'false' } $nightly = if ($Env:IsNightly -eq 'true') { 'true' } else { 'false' } $weekly = if ($Env:IsWeekly -eq 'true') { 'true' } else { 'false' } $slow = if ($Env:RunSlowTests -ne 'false') { 'true' } else { 'false' } @@ -153,18 +155,21 @@ stages: $directory = if ($Env:Directory -eq $null) { 'random' } else { $Env:Directory } $verbose = if ($Env:Verbose -eq 'true') { 'true' } else { 'false' } $multiplier = if ($Env:Multiplier -eq $null) { '1' } else { $Env:Multiplier } - $fileText = "{`n`t""tests"":`n`t{`n`t`t" + - """nightly"": ""$nightly"",`n`t`t" + - """weekly"": ""$weekly"",`n`t`t" + - """slow"": ""$slow"",`n`t`t" + - """awaitsfix"": ""$awaitsFix"",`n`t`t" + - """codec"": ""$codec"",`n`t`t" + - """docvaluesformat"": ""$docValuesFormat"",`n`t`t" + - """postingsformat"": ""$postingsFormat"",`n`t`t" + - """directory"": ""$directory"",`n`t`t" + - """verbose"": ""$verbose"",`n`t`t" + - """multiplier"": ""$multiplier""`n`t" + - "}`n}" + $fileText = "{`n`t" + + """assert"": ""$assert"",`n`t" + + """tests"": {`n`t`t" + + """nightly"": ""$nightly"",`n`t`t" + + """weekly"": ""$weekly"",`n`t`t" + + """slow"": ""$slow"",`n`t`t" + + """awaitsfix"": ""$awaitsFix"",`n`t`t" + + """codec"": ""$codec"",`n`t`t" + + """docvaluesformat"": ""$docValuesFormat"",`n`t`t" + + """postingsformat"": ""$postingsFormat"",`n`t`t" + + """directory"": ""$directory"",`n`t`t" + + """verbose"": ""$verbose"",`n`t`t" + + """multiplier"": ""$multiplier""`n`t" + + "}`n" + + "}" Out-File -filePath "$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)" -encoding UTF8 -inputObject $fileText displayName: 'Persist Test Settings to lucene.testsettings.json' condition: and(succeeded(), ne(variables['RunTests'], 'false'))
