Patchwork D1873: hghave: add test for clang 6 and later

login
register
mail settings
Submitter phabricator
Date Jan. 17, 2018, 9:40 p.m.
Message ID <8248efb61e062a691caee911905261d2@localhost.localdomain>
Download mbox | patch
Permalink /patch/26829/
State Not Applicable
Headers show

Comments

phabricator - Jan. 17, 2018, 9:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG613410307864: hghave: add test for clang 6 and later (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1873?vs=4854&id=4859

REVISION DETAIL
  https://phab.mercurial-scm.org/D1873

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -700,3 +700,11 @@ 
         return True
     except ImportError:
         return False
+
+@check("clang-libfuzzer", "clang new enough to include libfuzzer")
+def has_clang_libfuzzer():
+    mat = matchoutput('clang --version', 'clang version (\d)')
+    if mat:
+        # libfuzzer is new in clang 6
+        return int(mat.group(1)) > 5
+    return False