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