Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 5a78423

Browse files
atetuboujhasse
authored andcommitted
Add OSX build on travis (ninja-build#1502)
Also make test script works for OSX script command.
1 parent cfd74e5 commit 5a78423

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.travis.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
matrix:
2+
include:
3+
- os: linux
4+
compiler: gcc
5+
- os: linux
6+
compiler: clang
7+
- os: osx
18
sudo: false
29
language: cpp
3-
compiler:
4-
- gcc
5-
- clang
610
script:
711
- ./configure.py --bootstrap
812
- ./ninja all

misc/output_test.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import os
9+
import platform
910
import subprocess
1011
import sys
1112
import tempfile
@@ -26,6 +27,9 @@ def run(build_ninja, flags='', pipe=False, env=default_env):
2627
try:
2728
if pipe:
2829
output = subprocess.check_output([ninja_cmd], shell=True, env=env)
30+
elif platform.system() == 'Darwin':
31+
output = subprocess.check_output(['script', '-q', '/dev/null', 'bash', '-c', ninja_cmd],
32+
env=env)
2933
else:
3034
output = subprocess.check_output(['script', '-qfec', ninja_cmd, '/dev/null'],
3135
env=env)
@@ -43,7 +47,7 @@ class Output(unittest.TestCase):
4347
def test_issue_1418(self):
4448
self.assertEqual(run(
4549
'''rule echo
46-
command = sleep 0.$delay && echo $out
50+
command = sleep $delay && echo $out
4751
description = echo $out
4852
4953
build a: echo

0 commit comments

Comments
 (0)