Opt macOS out of automated testing entirely

I spent too much time to day fixing up macOS related issue,
when the wheel for it is not even built properly, so I decide
to solve it all together next time.
This commit is contained in:
Nguyễn Gia Phong 2020-04-24 20:11:49 +07:00
parent 2218d192cb
commit 5ce35416c7
3 changed files with 1 additions and 28 deletions

View File

@ -12,8 +12,7 @@ env:
- CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014
- CIBW_BEFORE_BUILD_LINUX=.ci/before-build-manylinux2014
- CIBW_BEFORE_BUILD_MACOS=.ci/before-build-macos
- CIBW_TEST_REQUIRES=tox
- CIBW_TEST_COMMAND_MACOS="tox -c /Users/travis/build/McSinyx/palace"
- CIBW_TEST_REQUIRES_LINUX=tox
- CIBW_TEST_COMMAND_LINUX="tox -c /project"
addons:

View File

@ -18,7 +18,6 @@
# along with palace. If not, see <https://www.gnu.org/licenses/>.
from os.path import abspath, dirname, join
from platform import system
from random import choices
from subprocess import PIPE, run, CalledProcessError
from sys import executable
@ -41,17 +40,12 @@ REVERB_PRESETS = choices(reverb_preset_names, k=5)
WAVEFORMS = ['sine', 'square', 'sawtooth',
'triangle', 'impulse', 'white-noise']
timeout = mark.timeout(timeout=5, method='signal')
osxfail = mark.xfail(system()=='Darwin', reason='Travis CI for macOS')
def capture(*argv):
"""Return the captured standard output of the given Python script."""
return run([executable, *argv], stdout=PIPE).stdout.decode()
@osxfail
@timeout
def test_event(aiff, flac, mp3, ogg, wav):
"""Test the event handling example."""
event = capture(EVENT, aiff, flac, mp3, ogg, wav)
@ -63,8 +57,6 @@ def test_event(aiff, flac, mp3, ogg, wav):
assert f'Playing {wav}' in event
@osxfail
@timeout
def test_hrtf(ogg):
"""Test the HRTF example."""
hrtf = capture(HRTF, ogg)
@ -79,8 +71,6 @@ def test_info():
run([executable, INFO, MADEUP_DEVICE], check=True)
@osxfail
@timeout
def test_latency(mp3):
"""Test the latency example."""
latency = capture(LATENCY, mp3)
@ -89,8 +79,6 @@ def test_latency(mp3):
assert 'Offset' in latency
@osxfail
@timeout
@mark.parametrize('preset', REVERB_PRESETS)
def test_reverb(preset, flac):
"""Test the reverb example."""
@ -100,8 +88,6 @@ def test_reverb(preset, flac):
assert f'Loading reverb preset {preset}' in reverb
@osxfail
@timeout
def test_stdec(aiff):
"""Test the stdec example."""
stdec = capture(STDEC, aiff)

View File

@ -17,7 +17,6 @@
# along with palace. If not, see <https://www.gnu.org/licenses/>.
import aifc
from platform import system
from unittest.mock import Mock
from uuid import uuid4
@ -25,9 +24,6 @@ from palace import (channel_configs, sample_types, decode,
Device, Context, Buffer, SourceGroup, MessageHandler)
from pytest import mark
timeout = mark.timeout(timeout=5, method='signal')
osxfail = mark.xfail(system()=='Darwin', reason='Travis CI for macOS')
def mock(message):
"""Return the MessageHandler corresponding to the given message."""
@ -40,8 +36,6 @@ def test_device_diconnected():
"""Test the handling of device disconnected message."""
@osxfail
@timeout
def test_source_stopped(wav):
"""Test the handling of source stopped message."""
with Device() as device, Context(device) as context, Buffer(wav) as buffer:
@ -52,8 +46,6 @@ def test_source_stopped(wav):
context.message_handler.source_stopped.assert_called_with(source)
@osxfail
@timeout
def test_source_force_stopped(ogg):
"""Test the handling of source force stopped message."""
with Device() as device, Context(device) as context:
@ -69,8 +61,6 @@ def test_source_force_stopped(ogg):
source.destroy()
@osxfail
@timeout
def test_buffer_loading(aiff):
"""Test the handling of buffer loading message."""
with Device() as device, Context(device) as context:
@ -85,8 +75,6 @@ def test_buffer_loading(aiff):
# TODO: verify data
@osxfail
@timeout
def test_resource_not_found(flac):
"""Test the handling of resource not found message."""
with Device() as device, Context(device) as context: