Skip to content

Commit 65274f4

Browse files
Andy StokelyAndy Stokely
authored andcommitted
Add support for windowed alarms in MPAS timekeeping
This commit adds active windows to recurring alarms. If users do not provide a start or stop time, they default to the clock start and stop, so existing behavior is unchanged. New helpers simplify the logic and are validated indirectly through behavior-level tests, allowing future refactoring without breaking the suite. A new test fixture and 16-case suite verify alarm behavior across boundaries, resets, anchors, and direction changes, documenting the alarm ringing contract and ensuring safe future development of MPAS timekeeping.
1 parent 324573f commit 65274f4

File tree

4 files changed

+650
-10
lines changed

4 files changed

+650
-10
lines changed

src/core_test/mpas_test_core.F

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,18 @@ function test_core_run(domain) result(iErr)!{{{
242242
end if
243243
call mpas_log_write('')
244244

245+
!
246+
! Test functionality of alarms with user-defined active windows
247+
!
248+
call mpas_log_write('')
249+
call mpas_log_write('Testing mpas_window_alarms:')
250+
iErr = mpas_window_alarm_tests(domain)
251+
if (iErr == 0) then
252+
call mpas_log_write('* mpas_window_alarm tests - all tests passed: SUCCESS')
253+
else
254+
call mpas_log_write('* mpas_window_alarm tests - $i failed tests: FAILURE', intArgs=[iErr])
255+
end if
256+
245257
deallocate(threadErrs)
246258

247259
end function test_core_run!}}}

0 commit comments

Comments
 (0)