|
@@ -325,21 +325,35 @@ def unittest_finalise(ut_folder):
|
325
|
325
|
|
326
|
326
|
def unittest_publish(ut_folder):
|
327
|
327
|
config = imp.load_source('', jsonlog.get_ut_config(ut_folder))
|
328
|
|
- #
|
329
|
|
- output.print_header('Copy unittest files to library')
|
330
|
|
- target_folder = os.path.join(config.lib_path, '_testresults_')
|
331
|
|
- output.print_action('Copying Unittest Files to %s' % target_folder)
|
332
|
|
- if not os.path.exists(target_folder):
|
333
|
|
- output.print_info('Creating folder %s' % target_folder)
|
334
|
|
- fstools.mkdir(target_folder)
|
|
328
|
+ output.print_header('Checking testrun state')
|
|
329
|
+ output.print_action('Release State...')
|
|
330
|
+ rs = jsonlog.get_ut_release_state(ut_folder)
|
|
331
|
+ output.print_info(rs)
|
|
332
|
+ output.print_action('Testcase Integrity...')
|
|
333
|
+ tci = jsonlog.get_ut_testcase_integrity(ut_folder)
|
|
334
|
+ output.print_info(tci)
|
|
335
|
+ output.print_action('Source Integrity...')
|
|
336
|
+ sri = jsonlog.get_ut_src_integrity(ut_folder)
|
|
337
|
+ output.print_info(sri)
|
|
338
|
+
|
|
339
|
+ if rs == jsonlog.STATUS_RELEASED and tci == jsonlog.STATUS_CLEAN and sri == jsonlog.STATUS_CLEAN:
|
|
340
|
+ output.print_header('Copy unittest files to library')
|
|
341
|
+ target_folder = os.path.join(config.lib_path, '_testresults_')
|
|
342
|
+ output.print_action('Copying Unittest Files to %s' % target_folder)
|
|
343
|
+ if not os.path.exists(target_folder):
|
|
344
|
+ output.print_info('Creating folder %s' % target_folder)
|
|
345
|
+ fstools.mkdir(target_folder)
|
|
346
|
+ else:
|
|
347
|
+ for fn in os.listdir(target_folder):
|
|
348
|
+ remove_file(os.path.join(target_folder, fn))
|
|
349
|
+ for fn in REPORT_FILES:
|
|
350
|
+ src = testresults_filename(ut_folder, fn)
|
|
351
|
+ dst = os.path.join(target_folder, fn)
|
|
352
|
+ output.print_info('copying %s -> %s' % (src, dst))
|
|
353
|
+ shutil.copyfile(src, dst)
|
335
|
354
|
else:
|
336
|
|
- for fn in os.listdir(target_folder):
|
337
|
|
- remove_file(os.path.join(target_folder, fn))
|
338
|
|
- for fn in REPORT_FILES:
|
339
|
|
- src = testresults_filename(ut_folder, fn)
|
340
|
|
- dst = os.path.join(target_folder, fn)
|
341
|
|
- output.print_info('copying %s -> %s' % (src, dst))
|
342
|
|
- shutil.copyfile(src, dst)
|
|
355
|
+ output.print_action('Proceed Conditions...')
|
|
356
|
+ output.print_info(output.STATUS_FAILED)
|
343
|
357
|
|
344
|
358
|
|
345
|
359
|
def unittest_status(ut_folder):
|