setting up some tests...

This commit is contained in:
ed committed 2026-10-04 18:10:34 -04:00
1 parent 1a60fd54fc
commit 4140e7e237
4 files changed
+202

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ args:
parser_bounds
lexer_failures
parse_body_messages
dogfood_parse
clang
msvc : By default this project builds with clang, specifying msvc will build with MSVC.
debug
+27
View File
@@ -79,6 +79,7 @@ Push-Location $path_root
[bool] $parser_bounds = $false
[bool] $lexer_failures = $false
[bool] $parse_body_messages = $false
[bool] $dogfood_parse = $false
[array] $vendors = @( "clang", "msvc" )
@@ -101,6 +102,7 @@ if ( $args ) { $args | ForEach-Object {
"parser_bounds" { $parser_bounds = $true }
"lexer_failures" { $lexer_failures = $true }
"parse_body_messages" { $parse_body_messages = $true }
"dogfood_parse" { $dogfood_parse = $true }
}
}}
#endregion Arguments
@@ -140,6 +142,7 @@ $cannot_build = $cannot_build -and $test -eq $false
$cannot_build = $cannot_build -and $parser_bounds -eq $false
$cannot_build = $cannot_build -and $lexer_failures -eq $false
$cannot_build = $cannot_build -and $parse_body_messages -eq $false
$cannot_build = $cannot_build -and $dogfood_parse -eq $false
if ( $cannot_build ) {
Stop-stage "No build target specified"
}
@@ -522,6 +525,30 @@ if ($parse_body_messages)
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $executable
invoke-stageTool -stage "parse_body_messages" -compiled $result -executable $executable -path_work $path_probe
}
if ($dogfood_parse)
{
$path_probe = join-path $path_test dogfood_parse
$path_build = join-path $path_probe build
if ( -not(Test-Path($path_build) )) {
new-item -ItemType Directory -Path $path_build | Out-Null
}
$includes = @( $path_base )
$unit = join-path $path_probe "test.cpp"
$executable = join-path $path_build "dogfood_parse.exe"
$compiler_args = @()
$compiler_args += ( $flag_define + 'GEN_TIME' )
$compiler_args += $flag_cpp17
$linker_args = @(
$flag_link_win_subsystem_console
)
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $executable
invoke-stageTool -stage "dogfood_parse" -compiled $result -executable $executable -path_work $path_probe
}
#endregion Building
pop-location # $path_root
+4
View File
@@ -22,6 +22,7 @@ $path_test_gen = Join-Path $path_test gen
$path_parser_bounds_build = Join-Path $path_test "parser_bounds\build"
$path_lexer_failures_build = Join-Path $path_test "lexer_failures\build"
$path_parse_body_messages_build = Join-Path $path_test "parse_body_messages\build"
$path_dogfood_parse_build = Join-Path $path_test "dogfood_parse\build"
$path_x64 = Join-Path $path_root x64
$path_release = Join-Path $path_root release
@@ -70,6 +71,9 @@ if ( Test-Path $path_lexer_failures_build ) {
if ( Test-Path $path_parse_body_messages_build ) {
Remove-Item $path_parse_body_messages_build -Recurse -Verbose
}
if ( Test-Path $path_dogfood_parse_build ) {
Remove-Item $path_dogfood_parse_build -Recurse -Verbose
}
if ( Test-Path $path_x64) {
Remove-Item $path_x64 -Recurse -Verbose
}