diff --git a/contrib/intel/jenkins/runtests.py b/contrib/intel/jenkins/runtests.py index 95dd3d1f222..cb0d0f994ab 100755 --- a/contrib/intel/jenkins/runtests.py +++ b/contrib/intel/jenkins/runtests.py @@ -6,6 +6,7 @@ import subprocess import run import common +import shlex class ParseDict(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): @@ -63,6 +64,7 @@ def __call__(self, parser, namespace, values, option_string=None): hosts = [] if 'slurm' in os.environ['FABRIC']: slurm_nodes = os.environ['SLURM_JOB_NODELIST'] # example cb[1-4,11] + common.run_command(shlex.split(f"sinfo --Format=Features -n {slurm_nodes}")) if int(os.environ['SLURM_NNODES']) == 1: hosts.append(slurm_nodes) else: diff --git a/contrib/intel/jenkins/summary.py b/contrib/intel/jenkins/summary.py index 517048305f9..59f135a8362 100755 --- a/contrib/intel/jenkins/summary.py +++ b/contrib/intel/jenkins/summary.py @@ -56,6 +56,10 @@ def __subclasshook__(cls, subclass): return ( hasattr(subclass, "print_results") and callable(subclass.print_results) + and hasattr(subclass, "check_features") + and callable(subclass.check_features) + and hasattr(subclass, "check_node") + and callable(subclass.check_node) and hasattr(subclass, "check_name") and callable(subclass.check_name) and hasattr(subclass, "check_pass") @@ -89,6 +93,8 @@ def __init__(self, logger, log_dir, prov, file_name, stage_name): self.excluded_tests = [] self.test_name ='no_test' self.name = 'no_name' + self.features = "no_features_found" + self.node = "no_node_found" def print_results(self): total = self.passes + self.fails @@ -99,11 +105,13 @@ def print_results(self): percent = self.passes/total * 100 if (verbose): self.logger.log( - f"<>{self.stage_name}: ", lpad=1, ljust=40, end_delimiter = '' + f"<>{self.stage_name} : {self.node} : [{self.features}] : ", + lpad=1, ljust=80, end_delimiter = '' ) else: self.logger.log( - f"{self.stage_name}: ", lpad=1, ljust=40, end_delimiter = '' + f"{self.stage_name} : {self.node} : [{self.features}] : ", + lpad=1, ljust=80, end_delimiter = '' ) self.logger.log(f"{self.passes}:{total} ", ljust=10, end_delimiter = '') self.logger.log(f": {percent:.2f}% : ", ljust=12, end_delimiter = '') @@ -129,6 +137,14 @@ def print_results(self): for test in self.excluded_tests: self.logger.log(f'{test}', lpad=3) + def check_features(self, previous, line): + if ('avail_features') in previous: + self.features = line.strip() + + def check_node(self, line): + if ('slurm_nodelist' in line): + self.node = line.strip().split('=')[1] + def check_name(self, line): return @@ -149,9 +165,14 @@ def check_line(self, line): self.check_exclude(line) def read_file(self): + previous = "" with open(self.file_path, 'r') as log_file: for line in log_file: - self.check_line(line.lower()) + line = line.lower() + self.check_features(previous, line) + self.check_node(line) + self.check_line(line) + previous = line def summarize(self): if not self.exists: @@ -396,9 +417,14 @@ def check_line(self, line, log_file): self.check_fails(line) def read_file(self): + previous = "" with open(self.file_path, 'r') as log_file: for line in log_file: - self.check_line(line.lower(), log_file) + line = line.lower() + super().check_features(previous, line) + super().check_node(line) + self.check_line(line, log_file) + previous = line for key in self.shmem_type.keys(): self.passes += self.shmem_type[key]['passes'] @@ -520,6 +546,14 @@ class DaosSummarizer(Summarizer): def __init__(self, logger, log_dir, prov, file_name, stage_name): super().__init__(logger, log_dir, prov, file_name, stage_name) + if (self.exists): + if ('verbs' in file_name): + self.node = cloudbees_config.prov_node_map['verbs'] + if ('tcp' in file_name): + self.node = cloudbees_config.prov_node_map['tcp'] + + self.features = cloudbees_config.node_features + def check_name(self, line): if "reading ." in line: self.test_name = line.split('/')[len(line.split('/')) - 1] \