#NEWLINE# def directory_setup( testfile , perf_module , configs ) : #NEWLINE# #INDENT# '\n  Sets up the output directories.\n\n  :param testfile: the main testfile used in run_test(); only used here for its file name\n  :returns: dict with keys ["report_name", "report_dir", "logs_dir"]\n  ' #NEWLINE# dir_info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# utils . makedirs ( runtime . get_reports_dir ( ) ) #NEWLINE# report_name = os . path . splitext ( os . path . basename ( testfile ) ) [ 0 ] #NEWLINE# date_time = time . strftime ( '_%Y%m%d_%H%M%S' , time . localtime ( runtime . get_init_time ( ) ) ) #NEWLINE# report_name += date_time #NEWLINE# dir_info [ 'report_name' ] = report_name #NEWLINE# results_dir = os . path . join ( runtime . get_reports_dir ( ) , report_name ) #NEWLINE# utils . makedirs ( results_dir ) #NEWLINE# dir_info [ 'results_dir' ] = results_dir #NEWLINE# if ( 'LOGS_DIRECTORY' in configs . mapping ) : #NEWLINE# #INDENT# logs_dir = configs . mapping . get ( 'LOGS_DIRECTORY' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logs_dir = perf_module . LOGS_DIRECTORY #NEWLINE# #UNINDENT# utils . makedirs ( logs_dir ) #NEWLINE# dir_info [ 'logs_dir' ] = logs_dir #NEWLINE# return dir_info