@@ -147,6 +147,7 @@ def expand_templates(desc_array):
147147 for k , v in own .items ():
148148 desc_array [i ][k ] = v
149149 del desc_array [i ]['id' ]
150+ desc_array [i ]['_seq' ] = '.%d' % (i + 1 )
150151 return desc_array
151152
152153def prepare_desc (desc , basedir , name , path ):
@@ -157,7 +158,10 @@ def prepare_desc(desc, basedir, name, path):
157158 desc ['_base-dir' ] = basedir
158159 desc ['_json-file' ] = name
159160 desc ['_json-path' ] = path
160- desc ['_test-name' ] = basedir + os .sep + name [:- 5 ]
161+ if not '_seq' in desc :
162+ desc ['_seq' ] = ''
163+ desc ['_test-name' ] = basedir + os .sep + name [:- 5 ] + desc ['_seq' ]
164+
161165 #
162166 # If no target provided never update
163167 if 'target' not in desc :
@@ -338,19 +342,16 @@ def prepare_run_opts(desc):
338342 opts += ['-f' , desc ['format' ]]
339343 if 'option' in desc :
340344 opts += desc ['option' ].split (" " )
345+ outfile = desc ['_test-name' ] + '.out'
341346 for t in desc ['target' ]:
342347 if 'output' in t :
343- if 'option' in t :
344- opts += t ['option' ].split (" " )
345- else :
346- opts += ['-o' ]
347348 outfile = desc ['_base-dir' ] + os .sep + t ['output' ]
348- opts += [outfile , '-L+' , '-l' , outfile + '.lst' ]
349- if 'stdout' in t or 'stderr' in t :
350- if 'option' in t :
351- opts += t ['option' ].split (" " )
349+ if 'option' in t :
350+ opts += t ['option' ].split (" " )
351+ opts += ['-o' , outfile , '-L+' , '-l' , outfile + '.lst' ]
352352 if 'source' in desc :
353353 opts += [desc ['_base-dir' ] + os .sep + desc ['source' ]]
354+
354355 return opts
355356
356357def exec_nasm (desc ):
@@ -436,7 +437,7 @@ def test_run(desc):
436437 if f :
437438 out_data = f_pat .sub (f_sub , out_data , 0 )
438439 if cmp_std (match , match_data , 'stdout' , out_data ) == False :
439- return test_fail (desc ['_test-name' ], "Stdout mismatch" )
440+ return test_fail (desc ['_test-name' ], "stdout mismatch" )
440441 else :
441442 stdout = ""
442443 elif 'stderr' in t :
@@ -449,17 +450,17 @@ def test_run(desc):
449450 if f :
450451 out_data = f_pat .sub (f_sub , out_data , 0 )
451452 if cmp_std (match , match_data , 'stderr' , out_data ) == False :
452- return test_fail (desc ['_test-name' ], "Stderr mismatch" )
453+ return test_fail (desc ['_test-name' ], "stderr mismatch" )
453454 else :
454455 stderr = ""
455456
456457 if stdout != "" :
457458 show_std ("stdout" , stdout )
458- return test_fail (desc ['_test-name' ], "Stdout is not empty" )
459+ return test_fail (desc ['_test-name' ], "stdout is not empty" )
459460
460461 if stderr != "" :
461462 show_std ("stderr" , stderr )
462- return test_fail (desc ['_test-name' ], "Stderr is not empty" )
463+ return test_fail (desc ['_test-name' ], "stderr is not empty" )
463464
464465 return test_pass (desc ['_test-name' ])
465466
0 commit comments