Don't fail flymake-tests if gcc
actually is Clang
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.
(cherry picked from commit b2167d9843
)
This commit is contained in:
parent
8db5f82d45
commit
5e66166714
1 changed files with 9 additions and 1 deletions
|
@ -140,9 +140,15 @@ SEVERITY-PREDICATE is used to setup
|
|||
(should (eq 'flymake-error (face-at-point)))))
|
||||
(delete-directory tempdir t))))
|
||||
|
||||
(defun flymake-tests--gcc-is-clang ()
|
||||
"Whether the `gcc' command actually runs the Clang compiler."
|
||||
(string-match "[Cc]lang version "
|
||||
(shell-command-to-string "gcc --version")))
|
||||
|
||||
(ert-deftest different-diagnostic-types ()
|
||||
"Test GCC warning via function predicate."
|
||||
(skip-unless (and (executable-find "gcc")
|
||||
(not (flymake-tests--gcc-is-clang))
|
||||
(version<=
|
||||
"5" (string-trim
|
||||
(shell-command-to-string "gcc -dumpversion")))
|
||||
|
@ -166,7 +172,9 @@ SEVERITY-PREDICATE is used to setup
|
|||
|
||||
(ert-deftest included-c-header-files ()
|
||||
"Test inclusion of .h header files."
|
||||
(skip-unless (and (executable-find "gcc") (executable-find "make")))
|
||||
(skip-unless (and (executable-find "gcc")
|
||||
(not (flymake-tests--gcc-is-clang))
|
||||
(executable-find "make")))
|
||||
(let ((flymake-wrap-around nil))
|
||||
(flymake-tests--with-flymake
|
||||
("some-problems.h")
|
||||
|
|
Loading…
Add table
Reference in a new issue