mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-17 01:21:06 +08:00
Sync Copilot context
This commit is contained in:
@@ -64,6 +64,9 @@ Ignore `LocalDebuggerCommandArgumentsHistory` in `*.vcxproj.user`.
|
||||
- When all test cases pass, the last several lines of `Execute.log` should be in the following pattern; otherwise it has crashed at the last shown test case:
|
||||
- "Passed test files: X/X"
|
||||
- "Passed test cases: Y/Y"
|
||||
- On Windows Debug builds, memory leak detection runs after test cases finish. If memory leaks are found, the leak dump is appended at the end of `Execute.log` after the test summary.
|
||||
- Passing test cases are necessary but not sufficient for success: memory leaks reported after the summary must always be fixed.
|
||||
- Treat memory leak fixes as required work, especially after all test cases pass and the remaining failure signal is only the appended leak dump.
|
||||
- DO NOT delete the log file by yourself.
|
||||
|
||||
## Linux Specific
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Build.log
|
||||
Build.log.unfinished
|
||||
Execute.log
|
||||
Execute.log.unfinished
|
||||
Execute.log.unfinished
|
||||
Execute.log.memoryleaks
|
||||
|
||||
@@ -34,7 +34,8 @@ if ($Mode -eq "UnitTest") {
|
||||
# Remove log files
|
||||
$logFile = "$PSScriptRoot\Execute.log"
|
||||
$logFileUnfinished = "$logFile.unfinished"
|
||||
Remove-Item -Path $logFile, $logFileUnfinished -Force -ErrorAction SilentlyContinue
|
||||
$logFileMemoryLeaks = "$logFile.memoryleaks"
|
||||
Remove-Item -Path $logFile, $logFileUnfinished, $logFileMemoryLeaks -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Ensure the executable name does not have the .exe extension
|
||||
@@ -47,7 +48,7 @@ $executableName = $Executable + ".exe"
|
||||
$solutionFolder = GetSolutionDir
|
||||
|
||||
# Find the file with the latest modification time
|
||||
if ($Configuration -eq $null) {
|
||||
if ([string]::IsNullOrEmpty($Configuration)) {
|
||||
$latestFile = GetLatestModifiedExecutable $solutionFolder $executableName
|
||||
} else {
|
||||
$latestFile = GetSpecifiedExecutable $solutionFolder $executableName $Configuration $Platform
|
||||
@@ -59,9 +60,13 @@ $debugArgs = GetDebugArgs $solutionFolder $latestFile $Executable
|
||||
|
||||
# Execute the selected executable with debug arguments and save output to log file
|
||||
if ($Mode -eq "UnitTest") {
|
||||
$commandLine = "`"$($latestFile.Path)`" /C $debugArgs"
|
||||
$commandLine = "`"$($latestFile.Path)`" /C /DebugOutput:`"$logFileMemoryLeaks`" $debugArgs"
|
||||
& { $commandLine; & cmd.exe /S /C $commandLine 2>&1 } | Tee-Object -FilePath $logFileUnfinished
|
||||
if ((Test-Path $logFileMemoryLeaks) -and ((Get-Item $logFileMemoryLeaks).Length -gt 0)) {
|
||||
Get-Content -Path $logFileMemoryLeaks | Add-Content -Path $logFileUnfinished
|
||||
}
|
||||
Rename-Item -Path $logFileUnfinished -NewName $logFile -Force
|
||||
Remove-Item -Path $logFileUnfinished, $logFileMemoryLeaks -Force -ErrorAction SilentlyContinue
|
||||
} else {
|
||||
$commandLine = "`"$($latestFile.Path)`" $debugArgs"
|
||||
& { $commandLine; & cmd.exe /S /C $commandLine 2>&1 }
|
||||
|
||||
Reference in New Issue
Block a user