diff --git a/Gui/python/TestHandler.py b/Gui/python/TestHandler.py index d479d39b..e815d2ad 100644 --- a/Gui/python/TestHandler.py +++ b/Gui/python/TestHandler.py @@ -1297,7 +1297,7 @@ def copyMostRecentRootFile(self, RunNumber, base_dir, output_dir, test): name = name.replace("Threshold", "Thr") # Construct the search pattern for files - search_pattern = f"{base_dir}/Run{RunNumber}_{name}.root" + search_pattern = f"{base_dir}/Run{RunNumber}_{name}_Board*.root" logger.debug(f"Looking for {search_pattern}") # Find all matching files @@ -1323,11 +1323,12 @@ def copyMostRecentRootFile(self, RunNumber, base_dir, output_dir, test): # When using multiple FC7s root files will get overwritten so need to attach # what fc7 the test was run on to file name fc7_in_use: str = base_dir.split("/")[-1].replace(".", "_") - file_name: str = latest_file.split("/")[-1] - logger.debug( - f"Copying {latest_file} to {output_dir}/{fc7_in_use}_{file_name}" - ) - os.system(f"cp {latest_file} {output_dir}/{fc7_in_use}_{file_name}") + for file in matching_files: + file_name: str = file.split("/")[-1] + logger.debug( + f"Copying {file} to {output_dir}/{fc7_in_use}_{file_name}" + ) + os.system(f"cp {file} {output_dir}/{fc7_in_use}_{file_name}") def saveTest(self, processIndex: int, process: QProcess): logger.debug("Inside saveTest") diff --git a/Gui/python/TestValidator.py b/Gui/python/TestValidator.py index 35c687b6..18a9cc15 100644 --- a/Gui/python/TestValidator.py +++ b/Gui/python/TestValidator.py @@ -178,9 +178,14 @@ def ResultGrader( # if chip.getStatus() # ] + #relevant_files = [ + # outputDir + "/" + os.fsdecode(file) for file in os.listdir(outputDir) + #] relevant_files = [ - outputDir + "/" + os.fsdecode(file) for file in os.listdir(outputDir) + outputDir + "/" + os.fsdecode(file) for file in os.listdir(outputDir) if module_name in file or file.endswith(".xml") ] + dqmpattern = re.compile(rf"_Hybrid_{module_hybridID}\.root$") + relevant_files.extend([outputDir + "/" + os.fsdecode(file) for file in os.listdir(outputDir) if dqmpattern.search(file)]) logger.debug(f"{relevant_files=}") _1, _2 = felis.set_module(