Skip to content

Update BuildToolTests.testBuildCompleteMessage #3496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 13, 2021

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented May 13, 2021

Motivation:
The build output on Linux has changed. Causing self hosted Linux test to fail (example):

21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' started at 2021-05-13 04:29:06.495
21:29:49
/home/buildnode/jenkins/workspace/swift-package-manager-self-hosted-Linux-smoke-test/branch-main/swiftpm/Tests/CommandsTests/BuildToolTests.swift:256: error: BuildToolTests.testBuildCompleteMessage : XCTAssertTrue failed - [1/4] Compiling Bar Bar.swift
21:29:49 [3/6] Merging module Bar
21:29:49 [5/7] Wrapping AST for Bar for debugging
21:29:49 [6/9] Compiling Foo Foo.swift
21:29:49 [7/9] Compiling Foo main.swift
21:29:49 [9/11] Merging module Foo
21:29:49 [11/12] Wrapping AST for Foo for debugging
21:29:49 [12/12] Linking Foo
21:29:49 [12/12] Build complete!
21:29:49
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' failed (5.24 seconds)

Modification:
Update expected output in BuildToolTests.testBuildCompleteMessage.

Motivation:
The build output on Linux for Swift >= 5.5 has changed. Causing self hosted Linux test to fail ([example](https://ci.swift.org/job/swift-package-manager-self-hosted-Linux-smoke-test/2051/)):

```
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' started at 2021-05-13 04:29:06.495
21:29:49
/home/buildnode/jenkins/workspace/swift-package-manager-self-hosted-Linux-smoke-test/branch-main/swiftpm/Tests/CommandsTests/BuildToolTests.swift:256: error: BuildToolTests.testBuildCompleteMessage : XCTAssertTrue failed - [1/4] Compiling Bar Bar.swift
21:29:49 [3/6] Merging module Bar
21:29:49 [5/7] Wrapping AST for Bar for debugging
21:29:49 [6/9] Compiling Foo Foo.swift
21:29:49 [7/9] Compiling Foo main.swift
21:29:49 [9/11] Merging module Foo
21:29:49 [11/12] Wrapping AST for Foo for debugging
21:29:49 [12/12] Linking Foo
21:29:49 [12/12] Build complete!
21:29:49
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' failed (5.24 seconds)
```

Modification:
Update expected output in `BuildToolTests.testBuildCompleteMessage`.
@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented May 13, 2021

@yim-lee potentially we can just replace this with a regex as the x/x part is not important. wdyt?

e.g.

XCTAssertMatch(result.stdout, .regex("\\[[0-9]+\\/[0-9]+\\] Build complete!"))

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

potentially we can just replace this with a regex as the x/x part is not important. wdyt?

Sure. I don't know if the actual number might indicate when there is a problem though?

As in, is the fact that the number has changed from 8 to 12 an indication of a problem?

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

With d9135e5, Linux self hosted passes but Linux smoke test fails.

Taking my change out and running with the original code (9366d3e) Linux self hosted fails, which confirms the code changes in #3495 aren't causing the failure.

@tomerd
Copy link
Contributor

tomerd commented May 13, 2021

As in, is the fact that the number has changed from 8 to 12 an indication of a problem?

it just means the driver/compiler computed more steps which is fine. I think a regex would be better / more future facing

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test macOS

@yim-lee yim-lee merged commit ec94b77 into swiftlang:main May 13, 2021
@yim-lee yim-lee deleted the update-buildtooltest branch May 13, 2021 23:15
bitjammer pushed a commit to bitjammer/swift-package-manager that referenced this pull request Jul 23, 2021
Motivation:
The build output on Linux for Swift >= 5.5 has changed. Causing self hosted Linux test to fail ([example](https://ci.swift.org/job/swift-package-manager-self-hosted-Linux-smoke-test/2051/)):

```
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' started at 2021-05-13 04:29:06.495
21:29:49
/home/buildnode/jenkins/workspace/swift-package-manager-self-hosted-Linux-smoke-test/branch-main/swiftpm/Tests/CommandsTests/BuildToolTests.swift:256: error: BuildToolTests.testBuildCompleteMessage : XCTAssertTrue failed - [1/4] Compiling Bar Bar.swift
21:29:49 [3/6] Merging module Bar
21:29:49 [5/7] Wrapping AST for Bar for debugging
21:29:49 [6/9] Compiling Foo Foo.swift
21:29:49 [7/9] Compiling Foo main.swift
21:29:49 [9/11] Merging module Foo
21:29:49 [11/12] Wrapping AST for Foo for debugging
21:29:49 [12/12] Linking Foo
21:29:49 [12/12] Build complete!
21:29:49
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' failed (5.24 seconds)
```

Modification:
Update expected output in `BuildToolTests.testBuildCompleteMessage`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants