def analyze(self): """Analize the test scenario results""" if not self.is_failed(): try: # Check for the OSPL error log file: self.check_for_ospl_error_log() # Get test hosts: hosts = {} hosts["Pub"] = self.get_host_by_role("Pub")[0] hosts["Sub"] = self.get_host_by_role("Sub")[0] # Read node mopnitor logs: app_log_contents = {} app_log_contents["Pub"] = self.parser.get_process_log_content( self.log_root, hosts["Pub"], "dds2734_publisher" ) app_log_contents["Sub"] = self.parser.get_process_log_content( self.log_root, hosts["Sub"], "dds2734_subscriber" ) for index in app_log_contents.keys(): if len(app_log_contents[index]) == 0: raise TestError( "DDS2734TestScenario::analyze - empty application log for node [%s]" % hosts[index].get_host_name() ) # Check test case expected result: if self.type == DDS2734TransLocTestScenario.TRANSLOC_NORMAL: self.check_transloc_normal(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_LATE_READER: self.check_transloc_late_reader(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_LATE_NODE: self.check_transloc_late_node(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_TOO_LATE_READER: self.check_transloc_too_late_reader(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_TOO_LATE_NODE: self.check_transloc_too_late_node(app_log_contents) except: self.fail() self.errors.append("Cannot analyze results: %s %s" % (sys.exc_info()[0], sys.exc_info()[1])) # Call parent analyze to create log file: BaseTestScenario.analyze(self)
def analyze(self): """Analize the test scenario results""" if not self.is_failed(): try: # Check for the OSPL error log file: self.check_for_ospl_error_log() # Get test hosts: hosts = {} hosts["Pub"] = self.get_host_by_role("Pub")[0] hosts["Sub"] = self.get_host_by_role("Sub")[0] # Read node mopnitor logs: app_log_contents = {} app_log_contents["Pub"] = self.parser.get_process_log_content( self.log_root, hosts["Pub"], "dds2734_publisher") app_log_contents["Sub"] = self.parser.get_process_log_content( self.log_root, hosts["Sub"], "dds2734_subscriber") for index in app_log_contents.keys(): if len(app_log_contents[index]) == 0: raise TestError( "DDS2734TestScenario::analyze - empty application log for node [%s]" % hosts[index].get_host_name()) # Check test case expected result: if self.type == DDS2734TransLocTestScenario.TRANSLOC_NORMAL: self.check_transloc_normal(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_LATE_READER: self.check_transloc_late_reader(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_LATE_NODE: self.check_transloc_late_node(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_TOO_LATE_READER: self.check_transloc_too_late_reader(app_log_contents) elif self.type == DDS2734TransLocTestScenario.TRANSLOC_TOO_LATE_NODE: self.check_transloc_too_late_node(app_log_contents) except: self.fail() self.errors.append("Cannot analyze results: %s %s" % (sys.exc_info()[0], sys.exc_info()[1])) # Call parent analyze to create log file: BaseTestScenario.analyze(self)
self.check_for_timestamps(pub_data1, sub_data1) # pub2->sub1: self.check_for_timestamps(pub_data2, sub_data1) # pub1->sub2: self.check_for_timestamps(pub_data1, sub_data2) # pub2->sub2: self.check_for_timestamps(pub_data2, sub_data2) # Check for the same publisher: self.check_for_publishers(sub_data1) self.check_for_publishers(sub_data2) # Check that subscriber have the same results: self.check_for_subscribers(sub_data1, sub_data2) except TestError, msg: self.fail() self.errors.append(msg) # Check for the OSPL error log file: self.check_for_ospl_error_log() except: self.fail() self.errors.append("Cannot analyze results: %s" % sys.exc_info()[0]) # Call parent analyze to create log file: BaseTestScenario.analyze(self) #===============================================================================
try: # Check for right timestamps: # pub1->sub1: self.check_for_timestamps(pub_data1, sub_data1) # pub2->sub1: self.check_for_timestamps(pub_data2, sub_data1) # pub1->sub2: self.check_for_timestamps(pub_data1, sub_data2) # pub2->sub2: self.check_for_timestamps(pub_data2, sub_data2) # Check for the same publisher: self.check_for_publishers(sub_data1) self.check_for_publishers(sub_data2) # Check that subscriber have the same results: self.check_for_subscribers(sub_data1, sub_data2) except TestError, msg: self.fail() self.errors.append(msg) # Check for the OSPL error log file: self.check_for_ospl_error_log() except: self.fail() self.errors.append("Cannot analyze results: %s"% sys.exc_info()[0]) # Call parent analyze to create log file: BaseTestScenario.analyze(self) #===============================================================================
def analyze(self): """Analize the test scenario results""" if not self.is_failed(): try: # Check for the OSPL error log file: self.check_for_ospl_error_log() # Get test hosts: hosts = {} hosts["A"] = self.get_host_by_role("A")[0] hosts["B"] = self.get_host_by_role("B")[0] hosts["C"] = self.get_host_by_role("C")[0] # Read node mopnitor logs: monitor_contents = {} monitor_contents["A"] = self.parser.get_process_log_content( self.log_root, hosts["A"], "NodeMonitor") monitor_contents["B"] = self.parser.get_process_log_content( self.log_root, hosts["B"], "NodeMonitor") monitor_contents["C"] = self.parser.get_process_log_content( self.log_root, hosts["C"], "NodeMonitor") for index in monitor_contents.keys(): if len(monitor_contents[index]) == 0: raise TestError("DDS2734TestScenario::analyze - empty node monitor log for node [%s]"% hosts[index].get_host_name()) # Check test case expected result: if self.type == DDS2734TestScenario.MULTI_FULL: self.check_multi_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MULTI_PART: self.check_multi_part_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MULTI_NONE: self.check_multi_none_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.UNI_FULL: self.check_uni_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.UNI_SINGLE: self.check_uni_single_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_FULL: self.check_mixed_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_SINGLE: self.check_mixed_single_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_EMPTY: self.check_mixed_empty_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_EMPTY2: self.check_mixed_empty2_case(hosts, monitor_contents) except: self.fail() self.errors.append("Cannot analyze results: %s %s"% (sys.exc_info()[0], sys.exc_info()[1])) # Call parent analyze to create log file: BaseTestScenario.analyze(self)
def analyze(self): """Analize the test scenario results""" if not self.is_failed(): try: # Check for the OSPL error log file: self.check_for_ospl_error_log() # Get test hosts: hosts = {} hosts["A"] = self.get_host_by_role("A")[0] hosts["B"] = self.get_host_by_role("B")[0] hosts["C"] = self.get_host_by_role("C")[0] # Read node mopnitor logs: monitor_contents = {} monitor_contents["A"] = self.parser.get_process_log_content( self.log_root, hosts["A"], "NodeMonitor") monitor_contents["B"] = self.parser.get_process_log_content( self.log_root, hosts["B"], "NodeMonitor") monitor_contents["C"] = self.parser.get_process_log_content( self.log_root, hosts["C"], "NodeMonitor") for index in monitor_contents.keys(): if len(monitor_contents[index]) == 0: raise TestError( "DDS2734TestScenario::analyze - empty node monitor log for node [%s]" % hosts[index].get_host_name()) # Check test case expected result: if self.type == DDS2734TestScenario.MULTI_FULL: self.check_multi_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MULTI_PART: self.check_multi_part_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MULTI_NONE: self.check_multi_none_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.UNI_FULL: self.check_uni_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.UNI_SINGLE: self.check_uni_single_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_FULL: self.check_mixed_full_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_SINGLE: self.check_mixed_single_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_EMPTY: self.check_mixed_empty_case(hosts, monitor_contents) if self.type == DDS2734TestScenario.MIXED_EMPTY2: self.check_mixed_empty2_case(hosts, monitor_contents) except: self.fail() self.errors.append("Cannot analyze results: %s %s" % (sys.exc_info()[0], sys.exc_info()[1])) # Call parent analyze to create log file: BaseTestScenario.analyze(self)