1010@rfm .simple_test
1111class ParaViewCheck (rfm .RunOnlyRegressionTest ):
1212 def __init__ (self ):
13- super ().__init__ ()
1413 self .valid_systems = ['daint:gpu' , 'daint:mc' , 'dom:gpu' , 'dom:mc' ]
1514 self .valid_prog_environs = ['PrgEnv-gnu' ]
1615 self .num_tasks = 12
@@ -24,26 +23,15 @@ def __init__(self):
2423 self .maintainers = ['JF' ]
2524 self .tags = {'scs' , 'production' }
2625
27- def setup (self , partition , environ , ** job_opts ):
28- if partition .fullname == 'daint:mc' :
29- self .sanity_patterns = sn .assert_found ('Vendor: VMware, Inc.' ,
30- self .stdout )
31- self .sanity_patterns = sn .assert_found ('Renderer: llvmpipe' ,
32- self .stdout )
33- elif partition .fullname == 'daint:gpu' :
34- self .sanity_patterns = sn .assert_found (
35- 'Vendor: NVIDIA Corporation' , self .stdout )
36- self .sanity_patterns = sn .assert_found ('Renderer: Tesla P100' ,
37- self .stdout )
38- elif partition .fullname == 'dom:gpu' :
39- self .sanity_patterns = sn .assert_found (
40- 'Vendor: NVIDIA Corporation' , self .stdout )
41- self .sanity_patterns = sn .assert_found ('Renderer: Tesla P100' ,
42- self .stdout )
43- elif partition .fullname == 'dom:mc' :
44- self .sanity_patterns = sn .assert_found ('Vendor: VMware, Inc.' ,
45- self .stdout )
46- self .sanity_patterns = sn .assert_found ('Renderer: llvmpipe' ,
47- self .stdout )
48-
49- super ().setup (partition , environ , ** job_opts )
26+ @rfm .run_before ('sanity' )
27+ def set_sanity (self ):
28+ if self .current_partition .name == 'mc' :
29+ self .sanity_patterns = sn .all ([
30+ sn .assert_found ('Vendor: VMware, Inc.' , self .stdout ),
31+ sn .assert_found ('Renderer: llvmpipe' , self .stdout )
32+ ])
33+ elif self .current_partition .name == 'gpu' :
34+ self .sanity_patterns = sn .all ([
35+ sn .assert_found ('Vendor: NVIDIA Corporation' , self .stdout ),
36+ sn .assert_found ('Renderer: Tesla P100' , self .stdout )
37+ ])
0 commit comments