-
Notifications
You must be signed in to change notification settings - Fork 449
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
C Plugin: Expand GCC data & only shellout to gcc if Xcode is installed on macOS #944
Conversation
If darwin is found: 1. shell out to /usr/bin/xcode-select -p 2a. If it returns an exit code other than 0, assume xcode command line tools are not installed and do not run these commands. 2b. If it returns an exit code of 0, run the commands. Signed-off-by: Erik Gomez <[email protected]>
Signed-off-by: Erik Gomez <[email protected]>
Signed-off-by: Erik Gomez <[email protected]>
Signed-off-by: Erik Gomez <[email protected]>
Signed-off-by: Erik Gomez <[email protected]>
cl / devenv are windows only so avoid checking those on *nix HP UX things should only get checked on HPUX
We’re only collecting this data on Windows now so don’t bother checking if we’re on Windows again
CC is clang on Darwin and the output is different so this just fails every time. We *should* add clang checks at some point though.
None of the values were being populated with the refactoring. Also gcc hadn’t been collecting anything for a while. This gives us real data for gcc: "c": { "gcc": { "configured_with": "--prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1", "description": "Apple LLVM version 8.0.0 (clang-800.0.42.1)", "version": "8.0.0", "target": "x86_64-apple-darwin16.3.0", "thread_model": "posix" } },
Add specs for checking that xcode exists on darwin Remove the odd double glibc mess Don't do ruby logic in the expects. That defeats the entire purpose of the specs if we're doing the same faulty logic. Just include the expected string Signed-off-by: Tim Smith <[email protected]>
Awesome job @tas50. Looks like the CI is failing, but not due to the PR. I don't want to speak for too many people, but both @natewalck and I would love to see this merged into the next chef release. |
Signed-off-by: Tim Smith <[email protected]>
collect_gcc | ||
collect_glibc | ||
collect_xlc | ||
collect_cc |
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.
collect_cc
is pretty badly named here, and is solaris specific.
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.
Fixed
@c = Mash.new | ||
collect_gcc | ||
collect_glibc | ||
collect_xlc |
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.
believe this is AIX specific.
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.
Fixed
Signed-off-by: Tim Smith <[email protected]>
Builds on the work that @erikng did in #941
Additions:
Rework the specs to be per platform and remove some the guards that existed for *nix plugins on Windows
Add more useful fields to the gcc data
Use the same logging format everywhere
Add specs for the xcode change and rework other specs to run per platform