def suite_configuration_section_parser(self) -> SectionElementParser: configuration_section_instructions = instruction_setup.instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.INSTRUCTION_NAME__PREPROCESSOR, preprocessor.setup), (conf_section_test_resources.INSTRUCTION_NAME__ACTOR, conf_section_test_resources.setup), ]) return section_element_parsers.standard_syntax_element_parser( InstructionWithOptionalDescriptionParser( InstructionParserForDictionaryOfInstructions( white_space_name_and_argument_splitter, configuration_section_instructions)))
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.impls.instructions.before_assert import define_symbol, change_dir, env, run, shell, sys_cmd, \ new_file, new_dir, copy, timeout INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list([ (instruction_names.SYMBOL_DEFINITION_INSTRUCTION_NAME, define_symbol.setup), (instruction_names.NEW_FILE_INSTRUCTION_NAME, new_file.setup), (instruction_names.NEW_DIR_INSTRUCTION_NAME, new_dir.setup), (instruction_names.COPY_INSTRUCTION_NAME, copy.setup), (instruction_names.CHANGE_DIR_INSTRUCTION_NAME, change_dir.setup), (instruction_names.ENV_VAR_INSTRUCTION_NAME, env.setup), (instruction_names.TIMEOUT_INSTRUCTION_NAME, timeout.setup), (instruction_names.RUN_INSTRUCTION_NAME, run.setup), (instruction_names.SYS_CMD_INSTRUCTION_NAME, sys_cmd.setup), (instruction_names.SHELL_INSTRUCTION_NAME, shell.setup), ])
from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.impls.instructions.assert_ import contents_of_dir from exactly_lib.impls.instructions.assert_ import define_symbol, change_dir, \ contents_of_file, env, run, new_file, new_dir, copy, \ shell, existence_of_file, sys_cmd, timeout from exactly_lib.impls.instructions.assert_.process_output import stderr, stdout, exit_code INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list([ (instruction_names.EXIT_CODE_INSTRUCTION_NAME, exit_code.setup), (instruction_names.CONTENTS_OF_STDOUT_INSTRUCTION_NAME, stdout.setup_for_stdout), (instruction_names.CONTENTS_OF_STDERR_INSTRUCTION_NAME, stderr.setup_for_stderr), (instruction_names.CONTENTS_OF_EXPLICIT_FILE_INSTRUCTION_NAME, contents_of_file.setup), ('exists', existence_of_file.setup), (instruction_names.CONTENTS_OF_EXPLICIT_DIR_INSTRUCTION_NAME, contents_of_dir.setup), (instruction_names.SYMBOL_DEFINITION_INSTRUCTION_NAME, define_symbol.setup), (instruction_names.CHANGE_DIR_INSTRUCTION_NAME, change_dir.setup), (instruction_names.NEW_FILE_INSTRUCTION_NAME, new_file.setup), (instruction_names.NEW_DIR_INSTRUCTION_NAME, new_dir.setup), (instruction_names.COPY_INSTRUCTION_NAME, copy.setup), (instruction_names.ENV_VAR_INSTRUCTION_NAME, env.setup), (instruction_names.TIMEOUT_INSTRUCTION_NAME, timeout.setup), (instruction_names.RUN_INSTRUCTION_NAME, run.setup), (instruction_names.SYS_CMD_INSTRUCTION_NAME, sys_cmd.setup), (instruction_names.SHELL_INSTRUCTION_NAME, shell.setup), ])
from exactly_lib.processing.parse.act_phase_source_parser import ActPhaseParser from exactly_lib.processing.test_case_handling_setup import TestCaseHandlingSetup from exactly_lib.section_document.element_parsers import section_element_parsers from exactly_lib.section_document.element_parsers.optional_description_and_instruction_parser import \ InstructionWithOptionalDescriptionParser from exactly_lib.section_document.element_parsers.parser_for_dictionary_of_instructions import \ InstructionParserForDictionaryOfInstructions from exactly_lib.section_document.section_element_parsing import SectionElementParser from exactly_lib.util.file_utils.std import StdOutputFiles from exactly_lib_test.execution.test_resources import sandbox_root_name_resolver from exactly_lib_test.test_resources.files.capture_out_files import capture_stdout_err from exactly_lib_test.test_resources.main_program.main_program_runner_utils import \ first_char_is_name_and_rest_is_argument__splitter, EMPTY_INSTRUCTIONS_SETUP from exactly_lib_test.test_resources.process import SubProcessResult CONFIGURATION_SECTION_INSTRUCTIONS = instruction_setup.instruction_set_from_name_and_setup_constructor_list( []) def test_suite_definition() -> TestSuiteDefinition: return TestSuiteDefinition(CONFIGURATION_SECTION_INSTRUCTIONS, _new_parser(), sandbox_root_name_resolver.prefix_for_suite) def _new_parser() -> SectionElementParser: return section_element_parsers.standard_syntax_element_parser( InstructionWithOptionalDescriptionParser( InstructionParserForDictionaryOfInstructions( instruction_name_and_argument_splitter.splitter, CONFIGURATION_SECTION_INSTRUCTIONS)))
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.instructions.assert_ import contents_of_dir from exactly_lib.instructions.assert_ import define_symbol, change_dir, \ contents_of_file, env, run, exitcode, new_file, new_dir, \ shell, existence_of_file, stdout, stderr INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.EXIT_CODE_INSTRUCTION_NAME, exitcode.setup), (instruction_names.CONTENTS_OF_STDOUT_INSTRUCTION_NAME, stdout.setup_for_stdout), ('stderr', stderr.setup_for_stderr), (instruction_names.CONTENTS_OF_EXPLICIT_FILE_INSTRUCTION_NAME, contents_of_file.setup), ('exists', existence_of_file.setup), (instruction_names.CONTENTS_OF_EXPLICIT_DIR_INSTRUCTION_NAME, contents_of_dir.setup), (instruction_names.SYMBOL_DEFINITION_INSTRUCTION_NAME, define_symbol.setup), (instruction_names.CHANGE_DIR_INSTRUCTION_NAME, change_dir.setup), (instruction_names.NEW_FILE_INSTRUCTION_NAME, new_file.setup), (instruction_names.NEW_DIR_INSTRUCTION_NAME, new_dir.setup), (instruction_names.ENV_VAR_INSTRUCTION_NAME, env.setup), (instruction_names.RUN_INSTRUCTION_NAME, run.setup), (instruction_names.SHELL_INSTRUCTION_NAME, shell.setup), ] )
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.instructions.setup import change_dir, env, run, copy, new_dir, new_file, shell, stdin, \ define_symbol INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.CONTENTS_OF_STDIN_INSTRUCTION_NAME, stdin.setup), ('copy', copy.setup), (instruction_names.SYMBOL_DEFINITION_INSTRUCTION_NAME, define_symbol.setup), (instruction_names.CHANGE_DIR_INSTRUCTION_NAME, change_dir.setup), (instruction_names.ENV_VAR_INSTRUCTION_NAME, env.setup), (instruction_names.NEW_FILE_INSTRUCTION_NAME, new_file.setup), (instruction_names.NEW_DIR_INSTRUCTION_NAME, new_dir.setup), (instruction_names.RUN_INSTRUCTION_NAME, run.setup), (instruction_names.SHELL_INSTRUCTION_NAME, shell.setup), ] )
from exactly_lib import program_info from exactly_lib.cli.main_program import TestSuiteDefinition from exactly_lib.common import instruction_setup, instruction_name_and_argument_splitter from exactly_lib.definitions.test_suite import instruction_names from exactly_lib.section_document.element_parsers import section_element_parsers from exactly_lib.section_document.element_parsers.optional_description_and_instruction_parser import \ InstructionWithOptionalDescriptionParser from exactly_lib.section_document.element_parsers.parser_for_dictionary_of_instructions import \ InstructionParserForDictionaryOfInstructions from exactly_lib.section_document.section_element_parsing import SectionElementParser from exactly_lib.test_suite.instruction_set.sections.configuration import preprocessor CONFIGURATION_SECTION_INSTRUCTIONS = instruction_setup.instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.INSTRUCTION_NAME__PREPROCESSOR, preprocessor.setup), ] ) def new_parser() -> SectionElementParser: return section_element_parsers.standard_syntax_element_parser( InstructionWithOptionalDescriptionParser( InstructionParserForDictionaryOfInstructions( instruction_name_and_argument_splitter.splitter, CONFIGURATION_SECTION_INSTRUCTIONS))) def test_suite_definition() -> TestSuiteDefinition: return TestSuiteDefinition(CONFIGURATION_SECTION_INSTRUCTIONS, new_parser(),
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.instructions.configuration import home_act, home_case, test_case_status, actor, timeout INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.HOME_CASE_DIRECTORY_INSTRUCTION_NAME, home_case.setup), (instruction_names.HOME_ACT_DIRECTORY_INSTRUCTION_NAME, home_act.setup), (instruction_names.TEST_CASE_STATUS_INSTRUCTION_NAME, test_case_status.setup), (instruction_names.ACTOR_INSTRUCTION_NAME, actor.setup), (instruction_names.TIMEOUT_INSTRUCTION_NAME, timeout.setup), ] )
from exactly_lib.section_document.element_parsers import section_element_parsers from exactly_lib.section_document.element_parsers.optional_description_and_instruction_parser import \ InstructionWithOptionalDescriptionParser from exactly_lib.section_document.element_parsers.parser_for_dictionary_of_instructions import \ InstructionParserForDictionaryOfInstructions from exactly_lib.section_document.section_element_parsing import SectionElementParser from exactly_lib.test_case import os_services from exactly_lib.util.std import StdOutputFiles from exactly_lib_test.execution.test_resources import sandbox_root_name_resolver from exactly_lib_test.test_resources.files.capture_out_files import capture_stdout_err from exactly_lib_test.test_resources.main_program.main_program_runner_utils import \ first_char_is_name_and_rest_is_argument__splitter, EMPTY_INSTRUCTIONS_SETUP from exactly_lib_test.test_resources.process import SubProcessResult CONFIGURATION_SECTION_INSTRUCTIONS = instruction_setup.instruction_set_from_name_and_setup_constructor_list( [ ] ) def test_suite_definition() -> TestSuiteDefinition: return TestSuiteDefinition(CONFIGURATION_SECTION_INSTRUCTIONS, _new_parser(), sandbox_root_name_resolver.prefix_for_suite) def _new_parser() -> SectionElementParser: return section_element_parsers.standard_syntax_element_parser( InstructionWithOptionalDescriptionParser( InstructionParserForDictionaryOfInstructions( instruction_name_and_argument_splitter.splitter, CONFIGURATION_SECTION_INSTRUCTIONS)))
import datetime from exactly_lib import program_info from exactly_lib.cli.test_suite_def import TestSuiteDefinition from exactly_lib.common import instruction_setup, instruction_name_and_argument_splitter from exactly_lib.definitions.test_suite import instruction_names from exactly_lib.section_document.element_parsers import section_element_parsers from exactly_lib.section_document.element_parsers.optional_description_and_instruction_parser import \ InstructionWithOptionalDescriptionParser from exactly_lib.section_document.element_parsers.parser_for_dictionary_of_instructions import \ InstructionParserForDictionaryOfInstructions from exactly_lib.section_document.section_element_parsing import SectionElementParser from exactly_lib.test_suite.instruction_set.sections.configuration import preprocessor CONFIGURATION_SECTION_INSTRUCTIONS = instruction_setup.instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.INSTRUCTION_NAME__PREPROCESSOR, preprocessor.setup), ]) def new_parser() -> SectionElementParser: return section_element_parsers.standard_syntax_element_parser( InstructionWithOptionalDescriptionParser( InstructionParserForDictionaryOfInstructions( instruction_name_and_argument_splitter.splitter, CONFIGURATION_SECTION_INSTRUCTIONS))) def test_suite_definition() -> TestSuiteDefinition: return TestSuiteDefinition(CONFIGURATION_SECTION_INSTRUCTIONS, new_parser(), _sds_root_name_prefix_for_suite)
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.instructions.before_assert import define_symbol, change_dir, env, run, shell, new_file, new_dir INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.NEW_FILE_INSTRUCTION_NAME, new_file.setup), ('dir', new_dir.setup), ('env', env.setup), (instruction_names.SYMBOL_DEFINITION_INSTRUCTION_NAME, define_symbol.setup), (instruction_names.RUN_INSTRUCTION_NAME, run.setup), (instruction_names.CHANGE_DIR_INSTRUCTION_NAME, change_dir.setup), (instruction_names.SHELL_INSTRUCTION_NAME, shell.setup), ] )
from exactly_lib.common.instruction_setup import instruction_set_from_name_and_setup_constructor_list from exactly_lib.definitions.test_case.instructions import instruction_names from exactly_lib.impls.instructions.configuration import hds_act, hds_case, test_case_status, actor INSTRUCTIONS = instruction_set_from_name_and_setup_constructor_list( [ (instruction_names.HDS_CASE_DIRECTORY_INSTRUCTION_NAME, hds_case.setup), (instruction_names.HDS_ACT_DIRECTORY_INSTRUCTION_NAME, hds_act.setup), (instruction_names.TEST_CASE_STATUS_INSTRUCTION_NAME, test_case_status.setup), (instruction_names.ACTOR_INSTRUCTION_NAME, actor.setup), ] )