Revision 99036060 scripts/gnt-debug
b/scripts/gnt-debug | ||
---|---|---|
71 | 71 |
|
72 | 72 |
""" |
73 | 73 |
cl = cli.GetClient() |
74 |
fname = args[0] |
|
75 |
op_data = simplejson.loads(open(fname).read()) |
|
76 |
op_list = [opcodes.OpCode.LoadOpCode(val) for val in op_data] |
|
77 |
jid = cli.SendJob(op_list, cl=cl) |
|
78 |
ToStdout("Job id: %s", jid) |
|
79 |
cli.PollJob(jid, cl=cl) |
|
74 |
job_data = [] |
|
75 |
job_ids = [] |
|
76 |
for fname in args: |
|
77 |
op_data = simplejson.loads(open(fname).read()) |
|
78 |
op_list = [opcodes.OpCode.LoadOpCode(val) for val in op_data] |
|
79 |
job_data.append((fname, op_list)) |
|
80 |
for fname, op_list in job_data: |
|
81 |
jid = cli.SendJob(op_list, cl=cl) |
|
82 |
ToStdout("File '%s', job id: %s", fname, jid) |
|
83 |
job_ids.append(jid) |
|
84 |
for jid in job_ids: |
|
85 |
ToStdout("Waiting for job id %s", jid) |
|
86 |
cli.PollJob(jid, cl=cl) |
|
80 | 87 |
return 0 |
81 | 88 |
|
82 | 89 |
|
... | ... | |
139 | 146 |
help="Select nodes to sleep on"), |
140 | 147 |
], |
141 | 148 |
"[opts...] <duration>", "Executes a TestDelay OpCode"), |
142 |
'submit-job': (GenericOpCodes, ARGS_ONE,
|
|
149 |
'submit-job': (GenericOpCodes, ARGS_ATLEAST(1),
|
|
143 | 150 |
[DEBUG_OPT, |
144 | 151 |
], |
145 |
"<op_list_file>", "Submits a job built from a json-file"
|
|
146 |
" with a list of serialized opcodes"),
|
|
152 |
"<op_list_file...>", "Submits jobs built from json files"
|
|
153 |
" containing a list of serialized opcodes"),
|
|
147 | 154 |
'allocator': (TestAllocator, ARGS_ONE, |
148 | 155 |
[DEBUG_OPT, |
149 | 156 |
make_option("--dir", dest="direction", |
Also available in: Unified diff