Commit 964169a0 authored by Paul Rich's avatar Paul Rich
Browse files

updating tests post cleanup of print

parent e7e6ed1b
......@@ -50,11 +50,11 @@ test_argslist = [
{ "tc_name" : "env_option_2", "args" : """--env var1=val1:var2=val2 -t50 -n10 /bin/ls""", 'new_only':True},
{ "tc_name" : "env_option_3", "args" : """--env "var1=val1:var2=svar1\=sval1\:svar2\=sval2:var3=val3" -t50 -n10 -d /bin/ls""", 'new_only':True},
{ "tc_name" : "env_option_4", "args" : """--env var1=val1 --env "var2=svar1\=sval1\:svar2\=sval2" --env var3=val3 -t50 -n10 /bin/ls""", 'new_only':True},
{ "tc_name" : "script_1", "args" : """cobalt_script1.sh""", },
{ "tc_name" : "script_2", "args" : """-t 50 cobalt_script1.sh""", },
{ "tc_name" : "script_1", "args" : """cobalt_script1.sh""", 'new_only':True},
{ "tc_name" : "script_2", "args" : """-t 50 cobalt_script1.sh""", 'new_only':True},
{ "tc_name" : "script_3", "args" : """--mode vn cobalt_script1.sh""", },
{ "tc_name" : "script_4", "args" : """-d cobalt_script2.sh""", },
{ "tc_name" : "walltime_0", "args" : """-t0 -n 10 /bin/ls""", 'new_only':True},
{ "tc_name" : "walltime_0", "args" : """-t0 -n 10 /bin/ls""", 'new_only':True},
{ "tc_name" : "interactive_1", "args" : """-I -t50 -n 1 /bin/ls""", },
{ "tc_name" : "interactive_2", "args" : """-I -t50 -n 1 -i inputfile""", },
{ "tc_name" : "interactive_4", "args" : """-I -t50 -n 1 --mode script""", },
......
......@@ -10,8 +10,7 @@ def test_qsub_all_options_1():
args = """-v -A myproj --attrs=a=1:b=2 --cwd /tmp -d --debuglog=/tmp/d --dependencies=1:2:3 -e /tmp/e --env v1=1:v2=2 --geometry 198x198x198x198 -h -i /bin/ls -M myemal@gmail.com -n10 -o /tmp/o -O tmp --proccount 10 -qqueue --run_users user1:user2:user3 --run_project -t 10 --mode script --kernel kernel -K kopts /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = \
......@@ -231,8 +230,7 @@ def test_qsub_misc_1():
args = """--mode script -n 512 --env BG_COREDUMPDISABLED=1 --proccount 512 -t 30 -q testing /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -740,8 +738,7 @@ def test_qsub_invalid_geometry_2():
args = """--mode script -t50 -n10 --geometry 1x2x3x4 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -901,8 +898,7 @@ def test_qsub_invalid_geometry_3():
args = """--mode script -t50 -n10 --geometry 1x2x3x4 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1062,8 +1058,7 @@ def test_qsub_invalid_geometry_4():
args = """--mode script -t50 -n10 --geometry 48x48x48x48x2 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1260,8 +1255,7 @@ def test_qsub_invalid_geometry_6():
args = """--mode script -t50 -n10 --geometry 128x64x32x4 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1458,8 +1452,7 @@ def test_qsub_project_specified():
args = """-A who -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1619,8 +1612,7 @@ def test_qsub_Check_attrs_1():
args = """--attrs xxxx -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1780,8 +1772,7 @@ def test_qsub_Check_attrs_2():
args = """--attrs 1111 -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -1941,8 +1932,7 @@ def test_qsub_Check_attrs_3():
args = """--attrs xx=:yy -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2102,8 +2092,7 @@ def test_qsub_Check_attrs_4():
args = """--attrs xx=one:yy=1:zz=1one -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2263,8 +2252,7 @@ def test_qsub_cwd_option_1():
args = """--cwd /tmp/ -t10 -n 10 -e p /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2424,8 +2412,7 @@ def test_qsub_cwd_option_2():
args = """--cwd /tmp -t10 -n 10 -e p /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2622,8 +2609,7 @@ def test_qsub_cwd_option_4():
args = """--cwd /tmp/ -t10 -n 10 -e p -o x /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2785,8 +2771,7 @@ def test_qsub_cwd_option_5():
args = """--cwd /tmp -t10 -n 10 -e p -o x /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -2948,8 +2933,7 @@ def test_qsub_debuglog_option():
args = """-t10 -n 10 -e p -o x --debuglog y /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3150,8 +3134,7 @@ def test_qsub_inputfile_option_2():
args = """-i y -t10 -n 10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3311,8 +3294,7 @@ def test_qsub_email_option():
args = """-M g -t10 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3472,8 +3454,7 @@ def test_qsub_outputprefix():
args = """-O tmp -t10 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3674,8 +3655,7 @@ def test_qsub_mode_option_1():
args = """-t10 -n512 --proccount 1023 --mode vn /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3833,8 +3813,7 @@ def test_qsub_mode_option_2():
args = """-t10 -n512 --proccount 1023 --mode vn /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -3992,8 +3971,7 @@ def test_qsub_mode_option_3():
args = """--mode script -t50 -n10 --geometry 40x40x50x50 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -4190,8 +4168,7 @@ def test_qsub_preboot_option():
args = """--disable_preboot -t10 -n512 --proccount 1023 --mode vn /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -4349,8 +4326,7 @@ def test_qsub_env_option_1():
args = """--env var1=val1,var2=val2 -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -4510,8 +4486,7 @@ def test_qsub_env_option_2():
args = """--env var1=val1:var2=val2 -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -4671,8 +4646,7 @@ def test_qsub_env_option_3():
args = """--env "var1=val1:var2=svar1\=sval1\:svar2\=sval2:var3=val3" -t50 -n10 -d /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = \
......@@ -4855,8 +4829,7 @@ def test_qsub_env_option_4():
args = """--env var1=val1 --env "var2=svar1\=sval1\:svar2\=sval2" --env var3=val3 -t50 -n10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -5015,18 +4988,141 @@ def test_qsub_script_1():
args = """cobalt_script1.sh"""
cmdout = ''
cmdout = \
"""1
"""
cmderr = \
"""command /tmp/cobalt_script1.sh not found, or is not a file
cmderr = ''
stubout = \
"""
GET_IMPLEMENTATION
stubout = ''
ADD_JOBS
args:[]
args type: <type 'list'>
command:/tmp/cobalt_script1.sh
command type: <type 'str'>
cwd:/tmp
cwd type: <type 'str'>
envs:{'a': '1', 'c': '3', 'b': '2'}
envs type: <type 'dict'>
ion_kernel:default
ion_kernel type: <type 'str'>
jobid:*
jobid type: <type 'str'>
kernel:default
kernel type: <type 'str'>
mode:script
mode type: <type 'str'>
nodes:100
nodes type: <type 'int'>
outputdir:/tmp
outputdir type: <type 'str'>
path:/tmp
path type: <type 'str'>
procs:512
procs type: <type 'str'>
queue:default
queue type: <type 'str'>
run_project:False
run_project type: <type 'bool'>
script_preboot:True
script_preboot type: <type 'bool'>
submithost:foo.bar
submithost type: <type 'str'>
tag:job
tag type: <type 'str'>
ttysession:None
ttysession type: <type 'NoneType'>
umask:18
umask type: <type 'int'>
user:gooduser
user type: <type 'str'>
user_list:['gooduser']
user_list type: <type 'list'>
walltime:75
walltime type: <type 'str'>
VALIDATE_JOB
attrs:{}
attrs type: <type 'dict'>
cwd:/tmp
cwd type: <type 'str'>
debug:False
debug type: <type 'bool'>
debuglog:False
debuglog type: <type 'bool'>
dependencies:False
dependencies type: <type 'bool'>
disable_preboot:False
disable_preboot type: <type 'bool'>
env:a=1:c=3:b=2
env type: <type 'str'>
error:False
error type: <type 'bool'>
forcenoval:False
forcenoval type: <type 'bool'>
geometry:False
geometry type: <type 'bool'>
held:False
held type: <type 'bool'>
inputfile:False
inputfile type: <type 'bool'>
interactive:False
interactive type: <type 'bool'>
ion_kernel:default
ion_kernel type: <type 'str'>
ion_kerneloptions:False
ion_kerneloptions type: <type 'bool'>
jobname:False
jobname type: <type 'bool'>
kernel:default
kernel type: <type 'str'>
kerneloptions:False
kerneloptions type: <type 'bool'>
mode:script
mode type: <type 'str'>
nodecount:100
nodecount type: <type 'str'>
notify:False
notify type: <type 'bool'>
output:False
output type: <type 'bool'>
outputprefix:False
outputprefix type: <type 'bool'>
preemptable:False
preemptable type: <type 'bool'>
proccount:False
proccount type: <type 'bool'>
project:False
project type: <type 'bool'>
qsub_host:foo.bar
qsub_host type: <type 'str'>
queue:default
queue type: <type 'str'>
run_project:False
run_project type: <type 'bool'>
time:75
time type: <type 'str'>
umask:False
umask type: <type 'bool'>
user_list:False
user_list type: <type 'bool'>
verbose:False
verbose type: <type 'bool'>
version:False
version type: <type 'bool'>
"""
stubout_file = "stub.out"
expected_results = (
256, # Expected return status
0, # Expected return status
cmdout, # Expected command output
stubout, # Expected stub functions output
cmderr, # Expected command error output
......@@ -5052,18 +5148,141 @@ def test_qsub_script_2():
args = """-t 50 cobalt_script1.sh"""
cmdout = ''
cmdout = \
"""1
"""
cmderr = \
"""command /tmp/cobalt_script1.sh not found, or is not a file
cmderr = ''
stubout = \
"""
GET_IMPLEMENTATION
stubout = ''
ADD_JOBS
args:[]
args type: <type 'list'>
command:/tmp/cobalt_script1.sh
command type: <type 'str'>
cwd:/tmp
cwd type: <type 'str'>
envs:{'a': '1', 'c': '3', 'b': '2'}
envs type: <type 'dict'>
ion_kernel:default
ion_kernel type: <type 'str'>
jobid:*
jobid type: <type 'str'>
kernel:default
kernel type: <type 'str'>
mode:script
mode type: <type 'str'>
nodes:100
nodes type: <type 'int'>
outputdir:/tmp
outputdir type: <type 'str'>
path:/tmp
path type: <type 'str'>
procs:512
procs type: <type 'str'>
queue:default
queue type: <type 'str'>
run_project:False
run_project type: <type 'bool'>
script_preboot:True
script_preboot type: <type 'bool'>
submithost:foo.bar
submithost type: <type 'str'>
tag:job
tag type: <type 'str'>
ttysession:None
ttysession type: <type 'NoneType'>
umask:18
umask type: <type 'int'>
user:gooduser
user type: <type 'str'>
user_list:['gooduser']
user_list type: <type 'list'>
walltime:50
walltime type: <type 'str'>
VALIDATE_JOB
attrs:{}
attrs type: <type 'dict'>
cwd:/tmp
cwd type: <type 'str'>
debug:False
debug type: <type 'bool'>
debuglog:False
debuglog type: <type 'bool'>
dependencies:False
dependencies type: <type 'bool'>
disable_preboot:False
disable_preboot type: <type 'bool'>
env:a=1:c=3:b=2
env type: <type 'str'>
error:False
error type: <type 'bool'>
forcenoval:False
forcenoval type: <type 'bool'>
geometry:False
geometry type: <type 'bool'>
held:False
held type: <type 'bool'>
inputfile:False
inputfile type: <type 'bool'>
interactive:False
interactive type: <type 'bool'>
ion_kernel:default
ion_kernel type: <type 'str'>
ion_kerneloptions:False
ion_kerneloptions type: <type 'bool'>
jobname:False
jobname type: <type 'bool'>
kernel:default
kernel type: <type 'str'>
kerneloptions:False
kerneloptions type: <type 'bool'>
mode:script
mode type: <type 'str'>
nodecount:100
nodecount type: <type 'str'>
notify:False
notify type: <type 'bool'>
output:False
output type: <type 'bool'>
outputprefix:False
outputprefix type: <type 'bool'>
preemptable:False
preemptable type: <type 'bool'>
proccount:False
proccount type: <type 'bool'>
project:False
project type: <type 'bool'>
qsub_host:foo.bar
qsub_host type: <type 'str'>
queue:default
queue type: <type 'str'>
run_project:False
run_project type: <type 'bool'>
time:50
time type: <type 'str'>
umask:False
umask type: <type 'bool'>
user_list:False
user_list type: <type 'bool'>
verbose:False
verbose type: <type 'bool'>
version:False
version type: <type 'bool'>
"""
stubout_file = "stub.out"
expected_results = (
256, # Expected return status
0, # Expected return status
cmdout, # Expected command output
stubout, # Expected stub functions output
cmderr, # Expected command error output
......@@ -5092,7 +5311,7 @@ def test_qsub_script_3():
cmdout = ''
cmderr = \
"""command /tmp/cobalt_script1.sh not found, or is not a file
"""Mode already set to 'script' and trying to set it again to 'vn'
"""
stubout = ''
......@@ -5132,7 +5351,7 @@ def test_qsub_script_4():
"""
qsub.py -d cobalt_script2.sh
command /tmp/cobalt_script2.sh not found, or is not a file
Mode already set to 'script' and trying to set it again to 'vn'
"""
stubout = ''
......@@ -5167,8 +5386,7 @@ def test_qsub_walltime_0():
args = """-t0 -n 10 /bin/ls"""
cmdout = \
"""foo.bar
1
"""1
"""
cmderr = ''
......@@ -5437,8 +5655,7 @@ def test_qsub_interactive_5():
args = """-I -t50 -n 1"""
cmdout = \
"""foo.bar
Wait for job 1 to start...
"""Wait for job 1 to start...
Opening interactive session to /
Deleting interactive job 1
"""
......@@ -5621,8 +5838,7 @@ def test_qsub_interactive_6():
args = """--interactive -t50 -n 1"""
cmdout = \
"""foo.bar
Wait for job 1 to start...
"""Wait for job 1 to start...
Opening interactive session to /
Deleting interactive job 1
"""
......@@ -5805,8 +6021,7 @@ def test_qsub_interactive_7():
args = """--mode interactive -t50 -n 1"""
cmdout = \
"""foo.bar
Wait for job 1 to start...
"""Wait for job 1 to start...
Opening interactive session to /
Deleting interactive job 1
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment