@@ -330,6 +330,37 @@ def test_moab(db, io_loop):
330
330
spawner_kwargs = spawner_kwargs )
331
331
332
332
333
+ def test_pbs (db , io_loop ):
334
+ spawner_kwargs = {
335
+ 'req_nprocs' : '4' ,
336
+ 'req_memory' : '10256' ,
337
+ 'req_options' : 'some_option_asdf' ,
338
+ 'req_host' : 'some_pbs_admin_node' ,
339
+ 'req_runtime' : '08:00:00' ,
340
+ }
341
+ batch_script_re_list = [
342
+ re .compile (r'singleuser_command' ),
343
+ re .compile (r'select=1' ),
344
+ re .compile (r'ncpus=4' ),
345
+ re .compile (r'mem=10256' ),
346
+ re .compile (r'walltime=08:00:00' ),
347
+ re .compile (r'@some_pbs_admin_node' ),
348
+ re .compile (r'^#PBS some_option_asdf' , re .M ),
349
+ ]
350
+ script = [
351
+ (re .compile (r'sudo.*qsub' ), str (testjob )),
352
+ (re .compile (r'sudo.*qstat' ), 'job_state = Q' .format (testhost )), # pending
353
+ (re .compile (r'sudo.*qstat' ), 'job_state = R\n exec_host = {}/2*1' .format (testhost )), # running
354
+ (re .compile (r'sudo.*qstat' ), 'job_state = R\n exec_host = {}/2*1' .format (testhost )), # running
355
+ (re .compile (r'sudo.*qdel' ), 'STOP' ),
356
+ (re .compile (r'sudo.*qstat' ), '' ),
357
+ ]
358
+ from .. import PBSSpawner
359
+ run_spawner_script (db , io_loop , PBSSpawner , script ,
360
+ batch_script_re_list = batch_script_re_list ,
361
+ spawner_kwargs = spawner_kwargs )
362
+
363
+
333
364
def test_slurm (db , io_loop ):
334
365
spawner_kwargs = {
335
366
'req_runtime' : '3-05:10:10' ,
0 commit comments