2b99813d54
Historically, we ignored the test results as we don't have the manpower to investigate the failures on various architectures. Since most of the test pass, I've added a 1% failure tolerance on everything except x86_64, so we do no longer need to ignore the results. This makes it easier to spat that it's no longer a couple test that fails on some random architecture but rather a more severe problem. In the process I had to disable test_decomp on ppc64le, because it segfaults.
29 lines
947 B
Diff
29 lines
947 B
Diff
diff --git a/scipy/conftest.py b/scipy/conftest.py
|
|
index b0edcdd..f5c3c0b 100644
|
|
--- a/scipy/conftest.py
|
|
+++ b/scipy/conftest.py
|
|
@@ -3,6 +3,7 @@ from __future__ import division, absolute_import, print_function
|
|
|
|
import os
|
|
import pytest
|
|
+import _pytest
|
|
import warnings
|
|
|
|
from scipy._lib._fpumode import get_fpu_mode
|
|
@@ -33,3 +34,15 @@ def check_fpu_mode(request):
|
|
warnings.warn("FPU mode changed from {0:#x} to {1:#x} during "
|
|
"the test".format(old_mode, new_mode),
|
|
category=FPUModeChangeWarning, stacklevel=0)
|
|
+
|
|
+
|
|
+ACCEPTABLE_FAILURE_RATE = int(os.environ.get('ACCEPTABLE_FAILURE_RATE', 0))
|
|
+
|
|
+
|
|
+@pytest.hookimpl()
|
|
+def pytest_sessionfinish(session, exitstatus):
|
|
+ if exitstatus != _pytest.main.EXIT_TESTSFAILED:
|
|
+ return
|
|
+ failure_rate = (100.0 * session.testsfailed) / session.testscollected
|
|
+ if failure_rate <= ACCEPTABLE_FAILURE_RATE:
|
|
+ session.exitstatus = 0
|