Skip to content

Commit 6cb86f7

Browse files
committed
Add temporary logging but down't fail the test for a hard-to-reproduce test failure in testTestsCanLinkAgainstExecutable in CI.
1 parent 332d9b0 commit 6cb86f7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/FunctionalTests/MiscellaneousTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,19 @@ class MiscellaneousTestCase: XCTestCase {
566566
XCTAssertMatch(stdout, .contains("Hello, world"))
567567
XCTAssertMatch(stdout, .contains("Hello, planet"))
568568
} catch {
569+
#if os(macOS) && arch(arm64)
570+
// Add some logging but ignore the failure for an environment being investigated.
571+
let (stdout, stderr) = try executeSwiftTest(prefix, extraArgs: ["-v"])
572+
print("testTestsCanLinkAgainstExecutable failed")
573+
print("ENV:\n")
574+
for (k, v) in ProcessEnv.vars.sorted(by: { $0.key < $1.key }) {
575+
print(" \(k)=\(v)")
576+
}
577+
print("STDOUT:\n\(stdout)")
578+
print("STDERR:\n\(stderr)")
579+
#else
569580
XCTFail("\(error)")
581+
#endif
570582
}
571583
}
572584
}

0 commit comments

Comments
 (0)