Skip to content

Commit

Permalink
Add logs before outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Jan 14, 2024
1 parent c447ab8 commit 683fb60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Fault/Entries/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -526,20 +526,24 @@ func main(arguments: [String]) -> Int32 {
throw "Could not create utf8 string."
}
try File.open(jsonOutput, mode: .write) {
print("Writing generated test vectors in Fault JSON format to \(jsonOutput)")
try $0.print(string)
}

try File.open(svfOutput, mode: .write) {
print("Writing generated test vectors in SVF format to \(svfOutput)")
try $0.print(svfString)
}

if let faultPointOutput = faultPointFilePath.value {
print("Writing YAML file of fault points to \(faultPointOutput)")
try File.open(faultPointOutput, mode: .write) {
try $0.write(string: YAMLEncoder().encode(faultPoints.sorted()))
}
}

if let coverageMetaFilePath = coverageMetaFilePath.value {
print("Writing YAML file of final coverage metadata to \(coverageMetaFilePath)")
try File.open(coverageMetaFilePath, mode: .write) {
try $0.write(string: YAMLEncoder().encode(result.coverageMeta))
}
Expand Down

0 comments on commit 683fb60

Please sign in to comment.