From 54628fccbf7861eca33342d41c2b55a03e813b3a Mon Sep 17 00:00:00 2001 From: David Mansolino Date: Thu, 16 May 2019 15:00:50 +0200 Subject: [PATCH 1/2] Macos Travis Test --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4f8c8c23d80..8984765a097 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ language: python python: - "2.7" - "3.7" +matrix: # macos can't be listed in 'os' as we need to set 'generic' as language (because travis doesn't support python on macos for now) + include: + - os: osx + language: generic cache: pip install: - pip install -r tests/sources/requirements.txt @@ -14,6 +18,10 @@ addons: apt: packages: - clang-format-5.0 + homebrew: + packages: + - clang-format + - python script: - python -m unittest discover -s tests/sources - python -m unittest discover -s docs/tests From a6bd2c36649bd11f8f1fdfc6ee52b2245f56029f Mon Sep 17 00:00:00 2001 From: David Mansolino Date: Thu, 16 May 2019 15:03:36 +0200 Subject: [PATCH 2/2] Update test_clang_format.py --- tests/sources/test_clang_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sources/test_clang_format.py b/tests/sources/test_clang_format.py index 7194dc6a15c..2707604fbcb 100755 --- a/tests/sources/test_clang_format.py +++ b/tests/sources/test_clang_format.py @@ -91,7 +91,7 @@ def setUp(self): def _runClangFormat(self, f): """Run clang format on 'f' file.""" clangFormatCommand = "clang-format" - if 'TRAVIS' in os.environ: + if 'TRAVIS' in os.environ and 'TRAVIS_OS_NAME' in os.environ and os.environ['TRAVIS_OS_NAME'] == 'linux': clangFormatCommand = "clang-format-5.0" return subprocess.check_output([clangFormatCommand, "-style=file", f])