Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 46 lines (41 sloc) 1.131 kB
31c4609 added rpbs.rb script for easier working with qsub
Ben J Woodcroft authored
1 # To change this template, choose Tools | Templates
2 # and open the template in the editor.
3
4 $:.unshift File.join(File.dirname(__FILE__),'..','lib')
5
6 require 'test/unit'
7 require 'rpbs'
8
9 class RpbsTest < Test::Unit::TestCase
10 def test_default
11 expected = <<DATA
12 !/bin/bash
13 #PBS -S /bin/bash
14 #PBS -M b.woodcroft@pgrad.unimelb.edu.au
15 #PBS -n MyJob
16 #PBS -l nodes=1
17 #PBS -l walltime=24:00:00
18 #PBS -m ae
19 # Changes directory to your execution directory (Leave as is)
20 cd $PBS_O_WORKDIR
21 # Actual command to run is below
22 one
23 DATA
24 assert_equal expected.split("\n").sort.join("\n"), Pbs.get_pbs_script('one').split("\n").sort.join("\n")
25 end
26
27 def test_change_email
28 expected = <<DATA
29 !/bin/bash
30 #PBS -S /bin/bash
31 #PBS -M yeh right
32 #PBS -n MyJob
33 #PBS -l nodes=1
34 #PBS -l walltime=24:00:00
35 #PBS -m ae
36 # Changes directory to your execution directory (Leave as is)
37 cd $PBS_O_WORKDIR
38 # Actual command to run is below
39 one
40 DATA
41 puts Pbs.get_pbs_script('one', {:email => 'yeh right'})
42 assert_equal expected.split("\n").sort.join("\n"),
43 Pbs.get_pbs_script('one', {:email => 'yeh right'}).split("\n").sort.join("\n")
44 end
45 end
Something went wrong with that request. Please try again.