Factor out function to check for clang in tests
This also stops a flymake test from failing on my machine. * lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): New function factored out from ... * test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang): * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): ... here. * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types) (included-c-header-files): * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): Use above new function.
This commit is contained in:
parent
d464454f45
commit
9a56b4e686
3 changed files with 13 additions and 15 deletions
|
@ -475,6 +475,14 @@ The same keyword arguments are supported as in
|
|||
:directory t
|
||||
,@body))
|
||||
|
||||
(defun ert-gcc-is-clang-p ()
|
||||
"Return non-nil if the `gcc' command actually runs the Clang compiler."
|
||||
;; Some macOS machines run llvm when you type gcc. (!)
|
||||
;; We can't even check if it's a symlink; it's a binary placed in
|
||||
;; "/usr/bin/gcc". So we need to check the output.
|
||||
(string-match "Apple \\(LLVM\\|[Cc]lang\\)\\|Xcode\\.app"
|
||||
(shell-command-to-string "gcc --version")))
|
||||
|
||||
(provide 'ert-x)
|
||||
|
||||
;;; ert-x.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue