diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-01-02 13:00:13 +0100 |
---|---|---|
committer | Robert Pluim <rpluim@gmail.com> | 2022-01-12 09:08:33 +0100 |
commit | 5e66166714f1a06e0312338c2507ae497a36f73a (patch) | |
tree | 075953fea7b256b8c55a608925bdd26ee88f34d8 /test/lisp | |
parent | 8db5f82d452797ec4530c959aac3cc2d19dd795a (diff) | |
download | emacs-5e66166714f1a06e0312338c2507ae497a36f73a.tar.gz emacs-5e66166714f1a06e0312338c2507ae497a36f73a.tar.bz2 emacs-5e66166714f1a06e0312338c2507ae497a36f73a.zip |
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 b2167d98432a78442522b7564e22f47d75a98b6f)
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index 2eb4004f10d..45cabf2efba 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el @@ -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") |