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
fix: Correct test #11573
fix: Correct test #11573
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a new failing test (it could start from a copy & paste of this one, then doing the changes), instead of modifying the existing one. But in general we don't change green passing tests, unless there were bugs in the test themselves, are result of other minor unrelated changes (changes in the stdout), or things like that.
Then also please have a look to the comments, I'd say there are some inconsistencies in the definition of the folder locations.
@@ -474,40 +474,41 @@ class Pkg(ConanFile): | |||
version = "0.1" | |||
|
|||
def export(self): | |||
git = Git(self, os.path.dirname(self.recipe_folder)) | |||
git = Git(self, self.recipe_folder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But your git repo is not the folder in which the conanfile.py
lives, it is the parent folder. So the os.path.dirname()
is necessary to use the Git repo folder.
url, commit = git.get_url_and_commit() | ||
# We store the current url and commit in conandata.yml | ||
update_conandata(self, {"sources": {"commit": commit, "url": url}}) | ||
self.output.info("URL: {}".format(url)) | ||
self.output.info("COMMIT: {}".format(commit)) | ||
|
||
def layout(self): | ||
pass # self.folders.source = "source" | ||
self.folders.source = "project" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if not the source
folder would be .
, not project
(as project
only happens if the repo folder is the parent one)
This PR seems related too: #11556 |
Hi @gabyx This was assigned for 1.51, but we didn't get any response, so I am moving it to next iteration 1.52. Please check the above comments and let us know. |
@memsharded: Thanks, jeah I did not have time yet but I hope I can move the test. |
Hi @gabyx This PR has been stale for a few months now, we have been moving it from release to release, I hope it is not an issue anymore, so I am closing it, many thanks for contributing! |
Changelog: (Bugfix): Fix the test
TestConanFileSubfolder
which should actually fail.Issue: #11275
This test should be written like this, and will fail because the bug is not yet fixed.
(if its a bug)
develop
branch, documenting this one.