Skip to content

Commit

Permalink
read lldb output to get exit code for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chalcolith committed Aug 24, 2023
1 parent abe8524 commit 8032749
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ switch ($Command.ToLower())
if ($Uselldb -eq "yes")
{
Write-Output "$lldbcmd $lldbargs $outDir\libponyrt.tests.exe --gtest_shuffle"
& $lldbcmd $lldbargs $outDir\libponyrt.tests.exe --gtest_shuffle
$err = $LastExitCode
$lldboutput = & $lldbcmd $lldbargs $outDir\libponyrt.tests.exe --gtest_shuffle
Write-Output $lldboutput
$err = ($lldboutput | Select-String -Pattern 'exited with status = (\S+)').Matches[0].Groups[1].Value
}
else
{
Expand All @@ -280,8 +281,9 @@ switch ($Command.ToLower())
if ($Uselldb -eq "yes")
{
Write-Output "$lldbcmd $lldbargs $outDir\libponyc.tests.exe --gtest_shuffle"
& $lldbcmd $lldbargs $outDir\libponyc.tests.exe --gtest_shuffle
$err = $LastExitCode
$lldboutput = & $lldbcmd $lldbargs $outDir\libponyc.tests.exe --gtest_shuffle
Write-Output $lldboutput
$err = ($lldboutput | Select-String -Pattern 'exited with status = (\S+)').Matches[0].Groups[1].Value
}
else
{
Expand Down Expand Up @@ -340,8 +342,9 @@ switch ($Command.ToLower())
if ($Uselldb -eq "yes")
{
Write-Output "$lldbcmd $lldbargs $outDir\stdlib-debug.exe --sequential"
& $lldbcmd $lldbargs $outDir\stdlib-debug.exe --sequential
$err = $LastExitCode
$lldboutput = & $lldbcmd $lldbargs $outDir\stdlib-debug.exe --sequential
Write-Output $lldboutput
$err = ($lldboutput | Select-String -Pattern 'exited with status = (\S+)').Matches[0].Groups[1].Value
}
else
{
Expand Down Expand Up @@ -375,8 +378,9 @@ switch ($Command.ToLower())
if ($Uselldb -eq "yes")
{
Write-Output "$lldbcmd $lldbargs $outDir\stdlib-release.exe --sequential"
& $lldbcmd $lldbargs $outDir\stdlib-release.exe --sequential
$err = $LastExitCode
$lldboutput = & $lldbcmd $lldbargs $outDir\stdlib-release.exe --sequential
Write-Output $lldboutput
$err = ($lldboutput | Select-String -Pattern 'exited with status = (\S+)').Matches[0].Groups[1].Value
}
else
{
Expand Down

0 comments on commit 8032749

Please sign in to comment.