STYLESHEET_GLOBAL = "jobs_global_report.xsl"
STYLESHEET_BOARD = "jobs_board_report.xsl"
+DAYS_SEPARATOR = ","
+CSV_DELIMITER = ";"
+
parser = src.options.Options()
parser.add_option('n', 'name', 'string', 'jobs_cfg',
self.remote_log_files.append(local_path)
except Exception as e:
self.err += _("Unable to get %s log file from remote: %s" %
- (job_path_remote, str(e)))
+ (str(job_path_remote),
+ str(e)))
def has_failed(self):
'''Returns True if the job has failed.
for board in list(self.d_input_boards.keys()):
if board not in self.d_xml_board_files:
self.add_xml_board(board)
+ root_node = self.d_xml_board_files[board].xmlroot
+ src.xmlManager.append_node_attrib(root_node,
+ {"input_file" : self.file_boards})
# Loop over all jobs in order to get the lines and columns for each
# xml file
# loop over each csv file and read its content
l_read = []
with open(self.file_boards, 'r') as f:
- reader = csv.reader(f,delimiter=';')
+ reader = csv.reader(f,delimiter=CSV_DELIMITER)
for row in reader:
l_read.append(row)
# get the delimiter for the boards (empty line)
for i, square in enumerate(line[1:]):
if square=='':
continue
- days = square.split(',')
+ days = square.split(DAYS_SEPARATOR)
days = [int(day) for day in days]
if today in days:
if row not in rows:
" files :\n")), 4)
logger.write("%s\n" % gui.xml_global_file.logFile, 4)
for board in gui.d_xml_board_files.keys():
- logger.write("%s\n" % gui.d_xml_board_files[board].logFile, 4)
+ file_path = gui.d_xml_board_files[board].logFile
+ file_name = os.path.basename(file_path)
+ logger.write("%s\n" % file_path, 4)
+ logger.add_link(file_name, "board", 0, board)
logger.write("\n", 4)