.. _compass_config: config ====== A config file is used to setup a case directory. This file contains information describing how to configure a case directory, including files that the case depends on, executables that are required for the case, namelists and streams files the case requires, and run scripts which can be used to automate running a case. How to use pre-defined paths ---------------------------- This testing infrastructure has several predefined paths available as attributes to several XML tags. Attributes that can use these will have the line "Can use pre-defined paths" in their description. In order to help you make use of these pre-defined paths, this section will describe what they are, and how to use them. To begin, there are two standard paths. These are referred to as ```` and ````. - ```` is the location where the test cases are setup to run. - ```` is the location where the testing infrastructure scripts live. Additionally, there are 4 sub-paths: - ```` - This is the core directory that contains the test case - ```` - This is the configuration directory that contains the test case - ```` - This is the resolution directory that contains the test case - ```` - This is the test directory that contains the test case - ```` - This is the case directory that is generated from an XML config file Now, all attributes that can use pre-defined paths can build a path using the following syntax:: {base}_{sub} Where ``{base}`` can be either ``work`` or ``script``, and ``{sub}`` can be any of ``core_dir``, ``configuration_dir``, ``resolution_dir``, ``test_dir``, and ``case_dir``. Note however, ``case_dir`` isn't valid when {base} is ``script`` as a case directory isn't typically generated in the script path if it's different from the work path. As an example: - ``script_test_dir`` would point to the location that the XML files exist to setup a testcase - ``work_test_dir`` would point to the location that the testcase will be setup, and will not include the case directory created from an XML file. Description of XML file ----------------------- Below, you will see text describing the various XML tags available in a config file. Each will describe the tag itself, any attributes the tag can have, and what children can be placed below the tag. ```` - This is the overarching parent tag of a config file that describes the setup for a case. - Attributes: * ``case``: The name of the case directory that will be created from this config tag. - Children: * ```` * ```` * ```` * ```` * ```` * ```` ```` - This tag defines the need for ensuring a required file is available, and the appropriate ways of acquiring the file. - Attributes: * ``hash``: (Optional) The expected hash of the mesh file. The acquired mesh file will be validated using this. If this attribute is omitted, the resulting file will not be validated. * ``dest_path``: The path the resulting file should be placed in. Should be the name of a path defined in the config file, or optionally 'case' which is expanded to be the case directory generated from the XML file containing the get_file tag. Can additionally take the values of pre-defined paths * ``file_name``: The name of the file that will be downloaded and placed in dest_path. - Children: * ```` ```` - This tag defined the different methods of acquiring a required file. - Attributes: * ``protocol``: A description of how the mesh should be retrieved. Currently supports ``wget``. * ``url``: Only used if ``protocol == wget``. The url (pre-filename) portion of the ``wget`` command. ```` - This tag defined the need to link an executable defined in a configuration file (e.g. general.config) into a case directory. - Attributes: * ``source``: The name of the executable, defined in the configuration file (e.g. ``general.config``). This name is a short name, and will be expanded to executables.source * ``dest``: The name of the link that will be generated from the executable. ```` - This tag defined the need to link a file into a case directory. - Attributes: * ``source_path``: The path variable from a configure file to find the source file in. If it is empty, source is assumed to have the full path to the file. Additionally, it can take the values of: - Can use pre-defined paths * ``source``: The source to generate a symlink from. Relative to the case directory that will be generated from the parent ```` tag. * ``dest``: The name of the resulting symlink. ```` - This tag defines a namelist that should be generated from a template. - Attributes: * ``name``: The name of the namelist file that will be generated from the template namelist pointed to by its mode attribute. * ``mode``: The name of the mode to use from the template input files Each core can define these arbitrarily - Children: * ``