Skip to content

Commit

Permalink
Merge pull request cyberbotics#461 from omichel/enhancement-macos-travis
Browse files Browse the repository at this point in the history
Macos Travis Test
  • Loading branch information
DavidMansolino authored May 16, 2019
2 parents 3c707d5 + a6bd2c3 commit 54b44c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion tests/sources/test_clang_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 54b44c8

Please sign in to comment.