Skip to content

Commit 4b47909

Browse files
committed
Tests: remove some debugging code
Remove a number of cases where we would print the command line or using `-v` on commands which are being executed which results in a significant amount of output in the test run.
1 parent f6d8591 commit 4b47909

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

Tests/SwiftDriverTests/CachingBuildTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ final class CachingBuildTests: XCTestCase {
203203
try super.setUpWithError()
204204

205205
// If the toolchain doesn't support caching, skip directly.
206-
let driver = try Driver(args: ["swiftc", "-v"])
206+
let driver = try Driver(args: ["swiftc"])
207207
#if os(Windows)
208208
throw XCTSkip("caching not supported on windows")
209209
#else
@@ -240,7 +240,7 @@ final class CachingBuildTests: XCTestCase {
240240
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
241241
"-I", stdlibPath.nativePathString(escaped: true),
242242
"-I", shimsPath.nativePathString(escaped: true),
243-
"-explicit-module-build", "-v",
243+
"-explicit-module-build",
244244
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
245245
"-import-objc-header", bridgingHeaderpath.nativePathString(escaped: true),
246246
main.nativePathString(escaped: true)] + sdkArgumentsForTesting)
@@ -630,7 +630,7 @@ final class CachingBuildTests: XCTestCase {
630630
var driver = try Driver(args: ["swiftc",
631631
"-I", cHeadersPath.nativePathString(escaped: true),
632632
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
633-
"-explicit-module-build", "-v", "-Rcache-compile-job",
633+
"-explicit-module-build", "-Rcache-compile-job",
634634
"-module-cache-path", moduleCachePath.nativePathString(escaped: true),
635635
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
636636
"-working-directory", path.nativePathString(escaped: true),
@@ -899,7 +899,7 @@ final class CachingBuildTests: XCTestCase {
899899
var driver = try Driver(args: ["swiftc",
900900
"-I", cHeadersPath.nativePathString(escaped: true),
901901
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
902-
"/tmp/Foo.o", "-v", "-g",
902+
"/tmp/Foo.o", "-g",
903903
"-explicit-module-build",
904904
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
905905
"-working-directory", path.nativePathString(escaped: true),
@@ -966,7 +966,7 @@ final class CachingBuildTests: XCTestCase {
966966
var driver = try Driver(args: ["swiftc",
967967
"-I", cHeadersPath.nativePathString(escaped: true),
968968
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
969-
"-explicit-module-build", "-v", "-Rcache-compile-job", "-incremental",
969+
"-explicit-module-build", "-Rcache-compile-job", "-incremental",
970970
"-module-cache-path", moduleCachePath.nativePathString(escaped: true),
971971
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
972972
"-import-objc-header", bridgingHeaderpath.nativePathString(escaped: true),
@@ -1006,7 +1006,7 @@ final class CachingBuildTests: XCTestCase {
10061006
func testCASManagement() throws {
10071007
try withTemporaryDirectory { path in
10081008
let casPath = path.appending(component: "cas")
1009-
let driver = try Driver(args: ["swiftc", "-v"])
1009+
let driver = try Driver(args: ["swiftc"])
10101010
let scanLibPath = try XCTUnwrap(driver.getSwiftScanLibPath())
10111011
try dependencyOracle.verifyOrCreateScannerInstance(swiftScanLibPath: scanLibPath)
10121012
let cas = try dependencyOracle.getOrCreateCAS(pluginPath: nil, onDiskPath: casPath, pluginOptions: [])

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,7 +3337,7 @@ final class SwiftDriverTests: XCTestCase {
33373337
let plannedJobs = try driver1.planBuild().removingAutolinkExtractJobs()
33383338
XCTAssertEqual(plannedJobs.count, 2)
33393339
XCTAssertEqual(plannedJobs[0].kind, .compile)
3340-
print(plannedJobs[0].commandLine.joinedUnresolvedArguments)
3340+
33413341
let outFileMap = try XCTUnwrap(plannedJobs[0].commandLine.supplementaryOutputFilemap)
33423342
XCTAssertEqual(outFileMap.entries.values.first?.keys.first, fileType)
33433343
}
@@ -4463,7 +4463,6 @@ final class SwiftDriverTests: XCTestCase {
44634463
}
44644464
var driver = try Driver(args: args)
44654465
let plannedJobs = try driver.planBuild()
4466-
print(plannedJobs[1].commandLine)
44674466

44684467
XCTAssertEqual(plannedJobs.count, 2)
44694468
XCTAssertEqual(plannedJobs[0].kind, .compile)
@@ -4485,7 +4484,6 @@ final class SwiftDriverTests: XCTestCase {
44854484
// don't use '-lld-allow-duplicate-weak'
44864485
var driver = try Driver(args: ["swiftc", "-profile-generate", "-use-ld=link", "-target", "x86_64-unknown-windows-msvc", "test.swift"])
44874486
let plannedJobs = try driver.planBuild()
4488-
print(plannedJobs[1].commandLine)
44894487

44904488
XCTAssertEqual(plannedJobs.count, 2)
44914489
XCTAssertEqual(plannedJobs[0].kind, .compile)
@@ -4505,7 +4503,6 @@ final class SwiftDriverTests: XCTestCase {
45054503
// If we're not building for profiling, don't add '-lld-allow-duplicate-weak'.
45064504
var driver = try Driver(args: ["swiftc", "-use-ld=lld", "-target", "x86_64-unknown-windows-msvc", "test.swift"])
45074505
let plannedJobs = try driver.planBuild()
4508-
print(plannedJobs[1].commandLine)
45094506

45104507
XCTAssertEqual(plannedJobs.count, 2)
45114508
XCTAssertEqual(plannedJobs[0].kind, .compile)

0 commit comments

Comments
 (0)