Skip to content

Commit 8d05216

Browse files
committed
[swift_snapshot_tool] Fatal error if the older assumed good fails or if the newer assumed bad succeeds.
Often times this happens since one forget to add --invert to invert the failure code in situations where the newer change succeeds and the older change fails... so I added that admonition to the error message.
1 parent 15db242 commit 8d05216

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/swift_snapshot_tool/Sources/swift_snapshot_tool/bisect_toolchains.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ struct BisectToolchains: AsyncParsableCommand {
119119
success = !success
120120
}
121121
if !success {
122-
log("[INFO] Oldest snapshot fails?! We assume that the oldest snapshot is known good!")
122+
log("[INFO] Oldest assumed good snapshot fails! Did you forget to pass --invert?")
123+
fatalError()
123124
} else {
124125
log("[INFO] Oldest snapshot passes test. Snapshot: \(tags[startIndex])")
125126
}
@@ -135,7 +136,8 @@ struct BisectToolchains: AsyncParsableCommand {
135136
success = !success
136137
}
137138
if !success {
138-
log("[INFO] Newest snapshot succeceds?! We assume that the newest snapshot is known bad!")
139+
log("[INFO] Newest assumed bad snapshot succeeds! Did you forget to pass --invert?")
140+
fatalError()
139141
} else {
140142
log("[INFO] Newest snapshot passes test. Snapshot: \(tags[endIndex])")
141143
}

0 commit comments

Comments
 (0)