Skip to content

Add functional test for binary with moved resources #3472

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

Conversation

ffried
Copy link
Contributor

@ffried ffried commented May 5, 2021

Add a functional test that produces a binary with resources, moves the binary and its resources and executes it.

Motivation:

Attempts to add the test that was described in this comment on #3463.
This would resolve https://bugs.swift.org/browse/SR-14592.

Modifications:

Add a functional test by adding a new Fixture and test method.

Result:

There's a test case that tests that binaries with resources can be moved to a different place and still find their resources (as long as they're placed next to the binary).

@ffried ffried force-pushed the tests/add_functional_moved_resources_test branch from fb4ba1d to ca789b2 Compare May 5, 2021 07:43
Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

Firstly, thank you so much for adding this test!

Comments inline. The major one is that it's better to move the bundle rather than copying, so that the one in the build directory can't accidentally be found. The the overall structure of the test here is good, I think!

Thanks again!

@ffried
Copy link
Contributor Author

ffried commented May 6, 2021

@abertelrud Thanks for the review! I've just pushed the changes I've made and replied to your comments inline.

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

This looks great to me. Thanks for taking this on!

@abertelrud
Copy link
Contributor

@swift-ci please smoke test

@ffried
Copy link
Contributor Author

ffried commented May 7, 2021

@abertelrud Looking at the Linux CI failures, I guess I need to build each product separately after all... 👀

@ffried ffried force-pushed the tests/add_functional_moved_resources_test branch from c9f1349 to 16320dc Compare May 7, 2021 05:49
@ffried
Copy link
Contributor Author

ffried commented May 7, 2021

@abertelrud Using --product works fine, thanks for the hint there! Could you give @swift-ci a nudge please? 🙂

@tomerd
Copy link
Contributor

tomerd commented May 7, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented May 7, 2021

@swift-ci please smoke test

@ffried
Copy link
Contributor Author

ffried commented May 7, 2021

Thanks @tomerd!
Looks much better now! 🙂

@abertelrud
Copy link
Contributor

Thanks, this looks great to me. All good to merge it?

@ffried
Copy link
Contributor Author

ffried commented May 8, 2021

All good from my side, yea. 👍

Btw. should I open a cherry pick PR against release/5.5 with this as well?

@tomerd tomerd merged commit 51b2ffd into swiftlang:main May 8, 2021
@tomerd
Copy link
Contributor

tomerd commented May 8, 2021

thanks @ffried no need in a 5.5 cherry pick imo as this is focused on a test and no functionality added

@ffried ffried deleted the tests/add_functional_moved_resources_test branch May 8, 2021 17:19
bitjammer pushed a commit to bitjammer/swift-package-manager that referenced this pull request Jul 23, 2021
* Add functional tests for binary with moved resources

* Remove .gitignore for resources fixtures

* Use local file system for file operations

* Build each product separately
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.

3 participants