Skip to content

Commit f246732

Browse files
committed
triger on pull_request
1 parent 1201202 commit f246732

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/os-blas-test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: OS/BLAS test matrix
22

3-
on: push
3+
on: pull_request
44

55
jobs:
66
build-pip:

control/tests/flatsys_test.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import scipy as sp
1414
import re
1515
import warnings
16+
import os
17+
import platform
1618

1719
import control as ct
1820
import control.flatsys as fs
@@ -201,9 +203,26 @@ def test_kinematic_car_ocp(
201203
minimize_kwargs={'method': method},
202204
)
203205
xd, ud = traj_ocp.eval(timepts)
206+
204207
if not traj_ocp.success:
205-
# If unsuccessful, make sure the error is just about precision
206-
assert re.match(".*precision loss.*", traj_ocp.message) is not None
208+
# Known failure cases
209+
if re.match(".*precision loss.*", traj_ocp.message):
210+
pytest.xfail("precision loss in some configurations")
211+
212+
elif re.match("Iteration limit.*", traj_ocp.message) and \
213+
re.match("ubuntu-3.* Generic", os.getenv('JOBNAME')) and \
214+
np.__version__ == '1.24.0':
215+
pytest.xfail("gh820: iteration limit exceeded")
216+
217+
else:
218+
# Dump out information to allow creation of an exception
219+
print("Platform: ", platform.platform())
220+
print("Python: ", platform.python_version())
221+
np.show_config()
222+
print("JOBNAME: ", os.getenv('JOBNAME'))
223+
224+
pytest.fail(
225+
"unknown failure; view output to identify configuration")
207226

208227
# Make sure the constraints are satisfied
209228
if input_constraints:

0 commit comments

Comments
 (0)