Skip to content

Commit

Permalink
DM-47795: M1M3 check actuators, added status check of other test to a…
Browse files Browse the repository at this point in the history
…void prematurely raising a RuntimeError when testing both primary and secondary when the first one tested fails.
  • Loading branch information
kfanning committed Nov 25, 2024
1 parent 5050117 commit e90ef1b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions python/lsst/ts/observatory/control/maintel/mtcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,18 +1447,30 @@ async def _wait_bump_test_ok(
done = (primary_status == MTM1M3.BumpTest.PASSED if primary else True) and (
secondary_status == MTM1M3.BumpTest.PASSED if secondary else True
)
primary_testing = (
primary_status not in {MTM1M3.BumpTest.PASSED, MTM1M3.BumpTest.FAILED}
and primary
)
secondary_testing = (
secondary_status not in {MTM1M3.BumpTest.PASSED, MTM1M3.BumpTest.FAILED}
and secondary
)

if done:
self.log.info(
f"Bump test for actuator {actuator_id} completed: "
f"{primary_status!r}[{primary}], {secondary_status!r}[{secondary}]"
)
return
elif primary and primary_status == MTM1M3.BumpTest.FAILED:
elif (
primary and primary_status == MTM1M3.BumpTest.FAILED
) and not secondary_testing:
raise RuntimeError(
f"Primary bump test failed for actuator {actuator_id}."
)
elif secondary and secondary_status == MTM1M3.BumpTest.FAILED:
elif (
secondary and secondary_status == MTM1M3.BumpTest.FAILED
) and not primary_testing:
raise RuntimeError(
f"Secondary bump test failed for actuator {actuator_id}."
)
Expand Down

0 comments on commit e90ef1b

Please sign in to comment.