Skip to content
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: uname shouldn't use -o flag, which is GNU extention #4311

Merged
merged 1 commit into from Jan 17, 2019

Conversation

Projects
None yet
4 participants
@SSE4
Copy link
Contributor

commented Jan 15, 2019

closes #4310

Changelog: Fix: uname shouldn't use -o flag, which is GNU extention
Docs: omit

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

- uname shouldn't use -o flag, which is GNU extention and not always …
…available

Signed-off-by: SSE4 <tomskside@gmail.com>

@ghost ghost assigned SSE4 Jan 15, 2019

@ghost ghost added the stage: review label Jan 15, 2019

@jgsogo
Copy link
Member

left a comment

... it is failing and we are never using the output from the -o command. Totally agree to remove it.

I would love to see some unittest associated to these functions (.uname and .detect_windows_subsystem) in conans/test/unittests/client/tools/oss/os_info/test_uname.py and conans/test/unittests/client/tools/oss/os_info/test_detect_windows_subsystem.py. Of course there will be a lot of mocking in there related to the function subprocess.check_output but I see too many if/else without simple tests.

(If you need help with the mocks, tell me)

Thanks!

@SSE4

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2019

@jgsogo #4313 has unit tests for these two functions which cover this case as well, I doubt it makes much sense to repeat them here

@jgsogo

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

Yes, sorry, I get to that PR after having a look at this one.

@jgsogo

jgsogo approved these changes Jan 16, 2019

Copy link
Member

left a comment

LGTM!

@lasote lasote added this to the 1.12 milestone Jan 17, 2019

@lasote lasote merged commit 0744fcd into conan-io:develop Jan 17, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Jan 17, 2019

@lasote

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

When docs are not needed, the comment in the body should be "Docs: omit". It is automated in the release process to generate the changelog linking the documentation. I already changed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.