Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion reframe/core/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from reframe.core.backends import register_scheduler
from reframe.core.exceptions import (SpawnedProcessError,
JobBlockedError,
JobSchedulerError)
JobSchedulerError,
SkipTestError)
from reframe.utility import nodelist_abbrev, seconds_to_hms


Expand Down Expand Up @@ -545,6 +546,12 @@ def poll(self, *jobs):
job._state = ','.join(m.group('state') for m in jobarr_info)

if slurm_state_completed(job.state):
# If the job has hit its DEADLINE, skip the test
if job.state == 'DEADLINE':
job._exception = SkipTestError(
f'the associated job {job.jobid} has expired'
)

# Since Slurm exitcodes are positive take the maximum one
job._exitcode = max(
int(m.group('exitcode')) for m in jobarr_info
Expand Down
Loading