Skip to content

Add a lit test for Xcode project generation #68713

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 3 commits into from
Nov 3, 2023

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Sep 22, 2023

The test takes ~100s on my machine.

Changes to CMake code tend to break Xcode project generation every other month or so. Although these issues are often fixed in a matter of days and are not as big of a deal for seasoned contributors, Xcode is the editor of choice for many, if not most, newcomers, and I believe this makes un interested in promising a functional invocation with the Xcode version used in CI.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis AnthonyLatsis force-pushed the test-generate-xcode branch 3 times, most recently from bfe26fa to 5c0c642 Compare September 22, 2023 22:44
@AnthonyLatsis
Copy link
Collaborator Author

186.43s: Swift-validation(macosx-x86_64) :: BuildSystem/generate_xcode.test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. 3 minutes is really good. Let’s add this.

if not self.args._build_llvm:
build_targets = ['clean']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure why we used to add the clean target but it looks like we lost it. Is that intentional?

Copy link
Collaborator Author

@AnthonyLatsis AnthonyLatsis Sep 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither am I, but I doubt it makes a difference.

Is that intentional?

Yes, I changed the logic slightly to not run any build commands for LLVM when --build-llvm=0 (the "actually don’t build LLVM" option), so it no longer matters what build_targets is set to in this case. This behavior is consistent with how we handle other CMake products, and it allows the new test to not just succeed (a build command that was assembled for the Xcode generator will fail against a Ninja build directory due to incompatible adjustments to the options), but also run correctly (we don’t want to run any build commands against the symlinked LLVM build directory).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me 👍🏽

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis
Copy link
Collaborator Author

AnthonyLatsis commented Sep 23, 2023

Hm, it seems like none of the macOS PR testing jobs run long tests. I can only see select branch jobs running them. Do we keep the requirement?

@ahoppen
Copy link
Member

ahoppen commented Sep 25, 2023

Let’s make it a non-long test then, I’d say.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis AnthonyLatsis changed the title Add a 'lit' test for Xcode project generation Add a lit test for Xcode project generation Sep 26, 2023
@AnthonyLatsis
Copy link
Collaborator Author

@shahmishal ping

@shahmishal
Copy link
Member

@swift-ci smoke test

@AnthonyLatsis AnthonyLatsis merged commit da6dff3 into swiftlang:main Nov 3, 2023
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AnthonyLatsis AnthonyLatsis deleted the test-generate-xcode branch November 4, 2023 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants