Skip to content

Commit 54b44c8

Browse files
Merge pull request #461 from omichel/enhancement-macos-travis
Macos Travis Test
2 parents 3c707d5 + a6bd2c3 commit 54b44c8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ language: python
66
python:
77
- "2.7"
88
- "3.7"
9+
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)
10+
include:
11+
- os: osx
12+
language: generic
913
cache: pip
1014
install:
1115
- pip install -r tests/sources/requirements.txt
@@ -14,6 +18,10 @@ addons:
1418
apt:
1519
packages:
1620
- clang-format-5.0
21+
homebrew:
22+
packages:
23+
- clang-format
24+
- python
1725
script:
1826
- python -m unittest discover -s tests/sources
1927
- python -m unittest discover -s docs/tests

tests/sources/test_clang_format.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def setUp(self):
9191
def _runClangFormat(self, f):
9292
"""Run clang format on 'f' file."""
9393
clangFormatCommand = "clang-format"
94-
if 'TRAVIS' in os.environ:
94+
if 'TRAVIS' in os.environ and 'TRAVIS_OS_NAME' in os.environ and os.environ['TRAVIS_OS_NAME'] == 'linux':
9595
clangFormatCommand = "clang-format-5.0"
9696
return subprocess.check_output([clangFormatCommand, "-style=file", f])
9797

0 commit comments

Comments
 (0)