feat(test)!: support integration tests#1230
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const std::string& obj : buildObjTargets) { | ||
| if (obj.ends_with("/main.o") || obj == "main.o") { | ||
| continue; | ||
| } | ||
| deps.insert(obj); | ||
| } | ||
| if (hasLibraryTarget) { | ||
| deps.insert(libName); | ||
| } |
There was a problem hiding this comment.
Avoid linking library twice for integration tests
Integration test binaries are assembled by adding every build object (except main.o) to deps and then, when a library target exists, unconditionally adding libName as well. The archive already contains the same objects, so linking both the individual objects and the archive will produce duplicate symbol errors for projects that define src/lib.*. Integration tests should link either the object files or the library archive, not both.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Will be addressed later.
Closes #993