def numeric_logical_test(self, discovery_container, resource_collection, collection_name, properties): """function to test if requested properties are integer and higher than zero""" if self.collection_is_not_empty(resource_collection, collection_name) is True: for resource in resource_collection: print "MESSAGE::%s" % resource for subproperty in self.format_body(discovery_container, resource, properties): construct = self.construct(discovery_container, resource, subproperty) if type(construct) != int: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property is not an integer" self.failure = True elif construct <= 0: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property is not > 0" self.failure = True else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": " + subproperty + " property is > 0"
def all_not_bool_test(self, discovery_container, resource_collection, collection_name, mode, properties): """function to test if all requested properties in collection are not true/false""" if self.collection_is_not_empty(resource_collection, collection_name) is True: for resource in resource_collection: print "MESSAGE::%s" % resource for subproperty in self.format_body(discovery_container, resource, properties): construct = self.construct(discovery_container, resource, subproperty) if construct is mode: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property is " + str(mode) self.failure = True elif construct is None: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property is Null" self.failure = True else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": " + subproperty + " property is not " + str( mode)
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) tests_manager = TestsManager() configuration_files = configuration.config_files test_scripts_configuration = get_configuration_from_files(configuration_files) if not configuration.usecase: print('\nMissing --usecase argument\n') JsonLoader().print_available_actions() sys.exit(64) # EX_USAGE = 64 command line usage error test_scripts_configuration['UseCase'] = configuration.usecase[0] if test_scripts_configuration is None: sys.exit(-1) if not certificates_files_are_valid(test_scripts_configuration): sys.exit(-1) test_plan = TestsPackagesContainer() if configuration.test_scripts: test_scripts_found = tests_manager.get_packages() test_scripts_found.filter(scripts=configuration.test_scripts, remove_empty=True) test_plan += test_scripts_found else: test_plan += tests_manager.get_packages() if not test_plan.packages: print('No script selected to execute') exit(64) # EX_USAGE = 64 command line usage error message = "Executing " print('Executing:') for package in test_plan.packages: for suite in package.suites: for script in suite.scripts: print "\t* %s from suite %s from package %s" % (script.name, suite.name, package.name) message += "%s from suite %s from package %s, " % (script.name, suite.name, package.name) self._logger.log_debug(message) if configuration.timeout is not None: message = "setting timeout execution to %s" % configuration.timeout[0] self._logger.log_debug(message) print "\n%s" % message test_plan.set_scripts_timeout(configuration.timeout[0]) execution_feed = ExecutionFeed(test_plan, test_scripts_configuration) for case in configuration.usecase: if not self.check_use_case_exist(case): print('\nUse Case was not found: %s ' % case) exit(64) # EX_USAGE = 64 command line usage error ScenarioAction.execute_configuration_group(execution_feed, test_status_as_exit_code=configuration.return_tests_status_as_exit_code)
def run(self): api_explorer = ApiExplorer(self.metadata_container, self.configuration) discovery_container, status = api_explorer.discover( MetadataConstants.SERVICE_ROOT_URI, MetadataConstants.SERVICE_ROOT) status = ValidationStatus.PASSED catalog = expanduser( "~" ) + "/.cts/tests/Rack_Scale_2_5_Storage_Services/required/tests_archeo_ss/" for test in listdir(catalog): with open(catalog + test) as f: data = json.load(f) test_name = data["name"] print "TEST_CASE::Validating section " + ColorPrinter.format_text(test_name, color=ColorPrinter.YELLOW_FORE) + \ " of architecture specification" status_of_test = ArchSpecTests().parse_json( discovery_container, data) if _skip_pnc_tests_if_resource_is_not_available(test) and \ (status_of_test == ValidationStatus.FAILED): status = ValidationStatus.join_statuses( status, ValidationStatus.PASSED_WITH_WARNINGS) print "MESSAGE:: CTS can not detect a PNC. Skipping this tests" else: status = ValidationStatus.join_statuses( status, status_of_test) print "STATUS::{status}".format(status=status_of_test) print "MESSAGE::All tests finished" print "STATUS::{status}".format(status=status)
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text( BuildInformation.get_version(), bold=True)) print "\nComparing...\n\n" with ErrorMute(): report = self.report_name() with open(report, 'w') as sys.stdout: comparator = MetadataComparator(configuration.METADATA, configuration.qualifiers) result = comparator.run() if result is not None: if result.result == Comparator.EQUAL: msg = "\n\nMetadata sets {metadata} are equal\n\n".format( metadata=" and ".join(configuration.METADATA)) sys.stderr.write(msg) sys.stdout.write(msg) else: msg = "\n\nMetadata sets {metadata} differ\n\n".format( metadata=" and ".join(configuration.METADATA)) sys.stderr.write(msg) sys.stdout.write(msg) print result.get_side_by_side(*configuration.METADATA) sys.stdout = sys.__stdout__ print "Report has been written to: {name}".format(name=report)
def process_action(self, configuration): replay_id = configuration.replay_id[0] print "Using CTS in version %s to replay execution %s" \ % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True), replay_id) error, script_execution_id = split_replay_id(replay_id) if error: return # TODO: warn user when he tries to replay using newer CTS script_execution = ScriptDAO.get_script_execution_details( script_execution_id) if script_execution is None: cts_error( "Recording for script execution id={id:ignore} not found", id=script_execution_id) return script_path = script_execution.script_path configuration = self._configuration_from_string( script_execution.configuration) test_plan = self._prepare_test_plan(script_path) environ[ReplayController.CTS_REPLAY_SCRIPT_EXECUTION_ID] = str( script_execution_id) self._execute(configuration, test_plan)
def write(self, msg): """ :type msg: str :param msg: message to log """ if msg.startswith("%s%s" % (self.LOG_PREFIX, self.SEPARATOR)): print >> self.logging_messages_stream, "".join(msg.split(self.SEPARATOR)[1:]) elif msg.startswith("%s%s" % (self.TEST_CASE_TITLE, self.SEPARATOR)): Indent.indent_reset() test_case = "".join(msg.split(self.SEPARATOR)[1:]).strip() self.logging_messages_stream.set_active_case(test_case) msg = '\nTest case: {test_case}'.format(test_case=test_case) print "%s%s" % ( indent(), ColorPrinter.format_text(msg, color=ColorPrinter.BLUE_FORE, bold=True)) Indent.indent_right() elif msg.startswith("%s%s" % (self.STATUS, self.SEPARATOR)): status = "".join(msg.split(self.SEPARATOR)[1:]).strip() self.logging_messages_stream.set_case_status(status) print "%s%s" % ( indent(), ColorPrinter.format_status(status, bold=True) ) Indent.indent_reset() elif msg.startswith(self.SCREEN): print "%s%s" % ( indent(), "".join(msg.split(self.SCREEN)[1:]).strip() ) else: print >> self.logging_messages_stream, msg
def write(self, msg): """ :type msg: str :param msg: message to log """ if msg.startswith("%s%s" % (self.LOG_PREFIX, self.SEPARATOR)): print >> self.logging_messages_stream, "".join( msg.split(self.SEPARATOR)[1:]) elif msg.startswith("%s%s" % (self.TEST_CASE_TITLE, self.SEPARATOR)): Indent.indent_reset() test_case = "".join(msg.split(self.SEPARATOR)[1:]).strip() self.logging_messages_stream.set_active_case(test_case) msg = '\nTest case: {test_case}'.format(test_case=test_case) print "%s%s" % (indent(), ColorPrinter.format_text( msg, color=ColorPrinter.BLUE_FORE, bold=True)) Indent.indent_right() elif msg.startswith("%s%s" % (self.STATUS, self.SEPARATOR)): status = "".join(msg.split(self.SEPARATOR)[1:]).strip() self.logging_messages_stream.set_case_status(status) print "%s%s" % (indent(), ColorPrinter.format_status(status, bold=True)) Indent.indent_reset() elif msg.startswith(self.SCREEN): print "%s%s" % (indent(), "".join(msg.split( self.SCREEN)[1:]).strip()) else: print >> self.logging_messages_stream, msg
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text( BuildInformation.BUILD_VERSION, bold=True)) tests_manager = TestsManager() configuration_files = configuration.config_files test_scripts_configuration = get_configuration_from_files( configuration_files) if not configuration.use_case: print('\nMissing --use_case argument\n') JsonLoader().print_available_actions() sys.exit(64) # EX_USAGE = 64 command line usage error test_scripts_configuration['UseCase'] = configuration.use_case[0] if test_scripts_configuration is None: sys.exit(-1) if not certificates_files_are_valid(test_scripts_configuration): sys.exit(-1) test_plan = TestsPackagesContainer() test_scripts_found = tests_manager.get_packages() test_scripts_found.filter(scripts='validate_use_case', remove_empty=True) test_plan += test_scripts_found if not test_plan.packages: print('No script selected to execute') exit(64) # EX_USAGE = 64 command line usage error message = "Executing " print('Executing:') for package in test_plan.packages: for suite in package.suites: for script in suite.scripts: print "\t* %s from suite %s from package %s" % ( script.name, suite.name, package.name) message += "%s from suite %s from package %s, " % ( script.name, suite.name, package.name) self._logger.log_debug(message) if configuration.timeout is not None: message = "setting timeout execution to %s" % configuration.timeout[ 0] self._logger.log_debug(message) print('\n%s' % message) test_plan.set_scripts_timeout(configuration.timeout[0]) execution_feed = ExecutionFeed(test_plan, test_scripts_configuration) for case in configuration.use_case: if not self.check_use_case_exist(case): print('\nUse Case was not found: %s ' % case) exit(64) # EX_USAGE = 64 command line usage error
def all_elements_identical(self, elements, name): """function to test if all elements in list are identical""" if not elements: self.failure = True print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": List is empty or does not exist!" return False else: if len(set(elements)) > 1: self.failure = True print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": All " + name + " are not identical" return False else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": All " + name + " are identical" return True
def collection_is_not_empty(self, resource_collection, name): """function to test if collection is empty""" if resource_collection is not None: if len(resource_collection) == 0: self.failure = True print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": Collection of " + name + " is empty" return False else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": Collection of " + name + " is not empty" return True else: self.failure = True print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": Collection of " + name + " does not exist!" return False
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) tests_manager = TestsManager() configuration_files = configuration.config_files test_scripts_configuration = get_configuration_from_files(configuration_files) if test_scripts_configuration is None: sys.exit(-1) if not certificates_files_are_valid(test_scripts_configuration): sys.exit(-1) test_plan = TestsPackagesContainer() if configuration.test_suites or configuration.test_scripts: if configuration.test_suites: test_suites_found = tests_manager.get_packages() test_suites_found.filter(packages=configuration.package, suites=configuration.test_suites, remove_empty=True) test_plan += test_suites_found if configuration.test_scripts: test_scripts_found = tests_manager.get_packages() test_scripts_found.filter(packages=configuration.package, scripts=configuration.test_scripts, remove_empty=True) test_plan += test_scripts_found else: test_plan += tests_manager.get_packages() test_plan.filter(packages=configuration.package) if not test_plan.packages: print "No script selected to execute" exit(64) # EX_USAGE = 64 command line usage error message = "Executing " print "Executing:" for package in test_plan.packages: for suite in package.suites: for script in suite.scripts: print "\t* %s from suite %s from package %s" % (script.name, suite.name, package.name) message += "%s from suite %s from package %s, " % (script.name, suite.name, package.name) self._logger.log_debug(message) if configuration.timeout is not None: message = "setting timeout execution to %s" % configuration.timeout[0] self._logger.log_debug(message) print "\n%s" % message test_plan.set_scripts_timeout(configuration.timeout[0]) execution_feed = ExecutionFeed(test_plan, test_scripts_configuration) ExecuteTestScriptsAction.execute_configuration_group(execution_feed, test_status_as_exit_code=configuration.return_tests_status_as_exit_code)
def string_logical_test(self, discovery_container, resource_collection, collection_name, properties, str_value, consists=False): """function to test if requested properties are equal to string""" if self.collection_is_not_empty(resource_collection, collection_name) is True: for resource in resource_collection: print "MESSAGE::%s" % resource for subproperty in self.format_body(discovery_container, resource, properties): construct = self.construct(discovery_container, resource, subproperty) if consists is False: if str_value in re.split('\W+', construct): print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": " + subproperty + " property is " + str_value elif construct != str_value: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property is not " + str_value self.failure = True else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": " + subproperty + " property is " + str_value else: if str_value not in construct: print "MESSAGE::" + ColorPrinter.format_text( "Failed", color=ColorPrinter.RED_FORE ) + ": " + subproperty + " property does not contain " + str_value self.failure = True else: print "MESSAGE::" + ColorPrinter.format_text( "Passed", color=ColorPrinter.GREEN_FORE ) + ": " + subproperty + " property does contain " + str_value
def process_action(self, configuration): """ The SOS process collects the information needed for easier debugging :return: """ print "Using SOS CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) SOS_SCRIPT_PATH = "" SOS_SCRIPT_NAME = "cts-sos.sh" resource_package = __name__ resource_path = '/'.join((SOS_SCRIPT_PATH, SOS_SCRIPT_NAME)) script_path = pkg_resources.resource_filename(resource_package, resource_path) subprocess.call(['sh', script_path])
def string_logical_test_special(self, discovery_container, resource_collection, collection_name, property, str_list): """function to test if at least one of members matches one of strings""" if self.collection_is_not_empty(resource_collection, collection_name) is True: i = 0 for resource in resource_collection: i = i + 1 for string in str_list: for prop in self.format_body(discovery_container, resource, [property]): construct = self.construct(discovery_container, resource, prop) if construct == string: print "MESSAGE::" + ColorPrinter.format_text("Passed", color=ColorPrinter.GREEN_FORE) + ": " + \ "One of " + str(property) + " property equals one of strings " + str(str_list) return else: if i == len(resource_collection): print "MESSAGE::" + ColorPrinter.format_text("Failed", color=ColorPrinter.RED_FORE) + ": " + \ "None of " + str(property) + " property equals one of strings " + str(str_list) self.failure = True
def process_action(self, configuration): """ The SOS process collects the information needed for easier debugging :return: """ print "Using SOS CTS in version %s" % (ColorPrinter.format_text( BuildInformation.get_version(), bold=True)) SOS_SCRIPT_PATH = "" SOS_SCRIPT_NAME = "cts-sos.sh" resource_package = __name__ resource_path = '/'.join((SOS_SCRIPT_PATH, SOS_SCRIPT_NAME)) script_path = pkg_resources.resource_filename(resource_package, resource_path) subprocess.call(['sh', script_path])
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.get_version(), bold=True)) print "\nComparing...\n\n" if not self.__create_dirs(): exit(1) # if you can not create a dirs dont create a report include_reports = set(configuration.include_reports) if include_reports: reports_details = self.get_information_about_test_case_from_db(include_reports) else: reports_details = {} with ErrorMute(): report = self.report_name(configuration.RackScaleMetadata, configuration.RedfishMetadata) comparator = MetadataComparator([configuration.RackScaleMetadata, configuration.RedfishMetadata]) result = comparator.run() if result is not None: if result.result == Comparator.EQUAL: print "\n\nMetadata sets {metadata} are equal\n\n".format(metadata=" and ".join( (configuration.RackScaleMetadata, configuration.RedfishMetadata))) else: print "\n\nMetadata sets {metadata} differ\n\n".format(metadata=" and ".join( (configuration.RackScaleMetadata, configuration.RedfishMetadata))) if configuration.preview: print result.get_side_by_side(*(configuration.RackScaleMetadata, configuration.RedfishMetadata)) left_text_container = result.left_ext_file.getvalue().split('\n') right_text_container = result.right_ext_file.getvalue().split('\n') missing_elements_on_left = self._generate_statistics_from_text_container(left_text_container, right_text_container) missing_elements_on_right = self._generate_statistics_from_text_container(right_text_container, left_text_container) preformat_left = self._update_view_for_more_human_readable(left_text_container) preformat_right = self._update_view_for_more_human_readable(right_text_container) self._build_html_view(configuration, {'left': preformat_left, 'right': preformat_right, 'missing_left': missing_elements_on_left, 'missing_right': missing_elements_on_right, 'reports_details': reports_details}) print "Report has been written to: {name}".format(name=report)
def log_screen_message(self, message, message_level, message_datetime): if MessageLevel.DEBUG != message_level: try: color = {MessageLevel.ERROR: ColorPrinter.RED_FORE, MessageLevel.WARNING: ColorPrinter.YELLOW_FORE}[message_level] except KeyError: color = ColorPrinter.DEFAULT m = re.match(INDENT_RE, message) if m: shift = indent() + m.group('get_indent') msg = m.group('therest') multiline_log = to_multiline(str(msg), 140, '\n{indent} '.format(indent=shift)) print "%s%s" % ( shift, ColorPrinter.format_text(multiline_log, color=color))
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) print "\nComparing...\n\n" if not self.__create_dirs(): exit(1) # if you can not create a dirs dont create a report include_reports = set(configuration.include_reports) if include_reports: reports_details = self.get_information_about_test_case_from_db(include_reports) else: reports_details = {} with ErrorMute(): report = self.report_name(configuration.RackScaleMetadata, configuration.RedfishMetadata) comparator = MetadataComparator([configuration.RackScaleMetadata, configuration.RedfishMetadata]) result = comparator.run() if result is not None: if result.result == Comparator.EQUAL: print "\n\nMetadata sets {metadata} are equal\n\n".format(metadata=" and ".join( (configuration.RackScaleMetadata, configuration.RedfishMetadata))) else: print "\n\nMetadata sets {metadata} differ\n\n".format(metadata=" and ".join( (configuration.RackScaleMetadata, configuration.RedfishMetadata))) if configuration.preview: print result.get_side_by_side(*(configuration.RackScaleMetadata, configuration.RedfishMetadata)) left_text_container = result.left_ext_file.getvalue().split('\n') right_text_container = result.right_ext_file.getvalue().split('\n') missing_elements_on_left = self._generate_statistics_from_text_container(left_text_container, right_text_container) missing_elements_on_right = self._generate_statistics_from_text_container(right_text_container, left_text_container) preformat_left = self._update_view_for_more_human_readable(left_text_container) preformat_right = self._update_view_for_more_human_readable(right_text_container) self._build_html_view(configuration, {'left': preformat_left, 'right': preformat_right, 'missing_left': missing_elements_on_left, 'missing_right': missing_elements_on_right, 'reports_details': reports_details}) print "Report has been written to: {name}".format(name=report)
def run(self): api_explorer = ApiExplorer(self.metadata_container, self.configuration) discovery_container, status = api_explorer.discover(MetadataConstants.SERVICE_ROOT_URI, MetadataConstants.SERVICE_ROOT) status = ValidationStatus.PASSED catalog = expanduser("~") + "/.cts/tests/Rack_Scale_2_5_PSME/required/tests_archeo_psme/" for test in listdir(catalog): with open(catalog + test) as f: data = json.load(f) test_name = data["name"] print "TEST_CASE::Validating section " + ColorPrinter.format_text(test_name, color=ColorPrinter.YELLOW_FORE) + \ " of architecture specification" status_of_test = ArchSpecTests().parse_json(discovery_container, data) print "STATUS::{status}".format(status=status_of_test) status = ValidationStatus.join_statuses(status, status_of_test) print "MESSAGE::All tests finished" print "STATUS::{status}".format(status=status)
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) running_list = ConfigParser.ConfigParser() running_list.optionxform = str running_list.read(configuration.test_run_list) test_run = TestRun() for running_list_section in running_list.sections(): self.process_running_list_section(running_list_section, running_list, test_run) test_run.register_all() execution_status = test_run.run_all() if not execution_status and configuration.return_tests_status_as_exit_code: print "Tests finished with status failed, exit code set to 4" exit(4)
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) print "\nComparing...\n\n" with ErrorMute(): report = self.report_name() with open(report, 'w') as sys.stdout: comparator = MetadataComparator(configuration.METADATA, configuration.qualifiers) result = comparator.run() if result is not None: if result.result == Comparator.EQUAL: msg = "\n\nMetadata sets {metadata} are equal\n\n".format(metadata=" and ".join(configuration.METADATA)) sys.stderr.write(msg) sys.stdout.write(msg) else: msg = "\n\nMetadata sets {metadata} differ\n\n".format(metadata=" and ".join(configuration.METADATA)) sys.stderr.write(msg) sys.stdout.write(msg) print result.get_side_by_side(*configuration.METADATA) sys.stdout = sys.__stdout__ print "Report has been written to: {name}".format(name=report)
def process_action(self, configuration): print "Using CTS in version %s\n" % (ColorPrinter.format_text(BuildInformation.BUILD_VERSION, bold=True)) JsonLoader().print_available_actions()
def process_action(self, configuration): print "Using CTS in version %s" % (ColorPrinter.format_text( BuildInformation.BUILD_VERSION, bold=True)) tests_manager = TestsManager() configuration_files = configuration.config_files test_scripts_configuration = get_configuration_from_files( configuration_files) if test_scripts_configuration is None: sys.exit(-1) if not certificates_files_are_valid(test_scripts_configuration): sys.exit(-1) test_plan = TestsPackagesContainer() if configuration.test_suites or configuration.test_scripts: if configuration.test_suites: test_suites_found = tests_manager.get_packages() test_suites_found.filter(packages=configuration.package, suites=configuration.test_suites, remove_empty=True) test_plan += test_suites_found if configuration.test_scripts: test_scripts_found = tests_manager.get_packages() test_scripts_found.filter(packages=configuration.package, scripts=configuration.test_scripts, remove_empty=True) test_plan += test_scripts_found else: test_plan += tests_manager.get_packages() test_plan.filter(packages=configuration.package) if not test_plan.packages: print "No script selected to execute" exit(64) # EX_USAGE = 64 command line usage error message = "Executing " print "Executing:" for package in test_plan.packages: for suite in package.suites: for script in suite.scripts: print "\t* %s from suite %s from package %s" % ( script.name, suite.name, package.name) message += "%s from suite %s from package %s, " % ( script.name, suite.name, package.name) self._logger.log_debug(message) if configuration.timeout is not None: message = "setting timeout execution to %s" % configuration.timeout[ 0] self._logger.log_debug(message) print "\n%s" % message test_plan.set_scripts_timeout(configuration.timeout[0]) execution_feed = ExecutionFeed(test_plan, test_scripts_configuration) ExecuteTestScriptsAction.execute_configuration_group( execution_feed, test_status_as_exit_code=configuration. return_tests_status_as_exit_code)
def process_action(self, configuration): print "Using CTS in version %s\n" % (ColorPrinter.format_text( BuildInformation.BUILD_VERSION, bold=True)) JsonLoader().print_available_actions()