From 003273844feb4f0cb9725b1508f72b538db7d485 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 10 Sep 2026 23:56:54 +0200 Subject: [PATCH] Skip the test if its associated Slurm job has expired Signed-off-by: Vasileios Karakasis --- reframe/core/schedulers/slurm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index 5892a936f..c25cb4089 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -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 @@ -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