Skip to content

Commit 14cb915

Browse files
author
Vasileios Karakasis
committed
Update test syntax and move tests into slurm.py
1 parent ff33e20 commit 14cb915

File tree

2 files changed

+33
-41
lines changed

2 files changed

+33
-41
lines changed

cscs-checks/system/slurm/slurm.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,36 @@ def reference_meminfo(self):
257257
'pilatus:mc': 250,
258258
}
259259
return reference_meminfo[self.current_partition.fullname]
260+
261+
262+
@rfm.simple_test
263+
class slurm_response_check(rfm.RunOnlyRegressionTest):
264+
command = parameter(['squeue', 'sacct'])
265+
descr = 'Slurm command test'
266+
valid_systems = ['daint:login', 'dom:login']
267+
valid_prog_environs = ['builtin']
268+
num_tasks = 1
269+
num_tasks_per_node = 1
270+
reference = {
271+
'squeue': {
272+
'real_time': (0.02, None, 0.1, 's')
273+
},
274+
'sacct': {
275+
'real_time': (0.1, None, 0.1, 's')
276+
}
277+
}
278+
executable = 'time -p'
279+
tags = {'diagnostic', 'health'}
280+
maintainers = ['CB', 'VH']
281+
282+
@rfm.run_before('run')
283+
def set_exec_opts(self):
284+
self.executable_opts = [self.command]
285+
286+
@rfm.run_before('sanity')
287+
def set_sanity(self):
288+
self.sanity_patterns = sn.assert_eq(self.job.exitcode, 0)
289+
self.perf_patterns = {
290+
'real_time': sn.extractsingle(r'real (?P<real_time>\S+)',
291+
self.stderr, 'real_time', float)
292+
}

cscs-checks/system/slurm/slurm_check.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)