Automatic Interception Interface - Profile XML File
The profile XML file is used to define the how the Automatic
Interception Interface should handle the various processes involved
in a distributed job.
Contents of this page:
- An Example of creating a Profile XML file
based on a real-life scenario.
- Samples and Resources related to the
Profile XML file.
- Profile XML File Specification
- Important Notes related to the Profile XML
file.
In the following simple example, our goal is to distribute a
makefile-based C++ code build process run by "make.exe". Our
makefile runs several compilation steps (cl.exe) and ends with a
link step (link.exe).
In this scenario we would probably only want to distribute
execution of compilation steps (cl.exe). Distributing execution of
the single link.exe task to a remote machine would involve sending
a relatively large amount of data (.obj files, etc.) across the
network, so it would probably be best to let this task always run
on the initiating machine.
The following profile.xml file can be used to run the Automatic
Interception Interface on the above scenario:
<?xml version="1.0" encoding="UTF-8" standalone="no"
?>
<Profile FormatVersion="1">
<Tools>
<Tool
Filename="make" AllowIntercept="true" />
<Tool
Filename="cl" AllowRemote="true" />
<Tool
Filename="link" AllowRemote="false" />
</Tools>
</Profile>
Explanation
- "make.exe" is the process managing the build process.
Because this process spawns processes whose execution we want
IncrediBuild to intercept (cl.exe and link.exe), this process is
marked with the AllowIntercept attribute set to "True".
- Since we want to distribute execution of "cl.exe" to remote
machines, "cl" is specified with AllowRemote set to
"True".
- Since we want "link.exe" to run locally, it is specified with
AllowRemote set to "False". Omitting this line from the
profile.xml file would have the same effect since the default for
both AllowIntercept and AllowRemote is "False".
Once our profile.xml file is ready, all that's left is to run
xgConsole.exe to
distribute the build process using the Automatic Interception
Interface.
Following is a detailed specification of the Profile XML file
format. In addition to the information below, note the following
useful resources:
1. In the "XGE" subfolder under the IncrediBuild installation
folder you will find a standard .xsd schema file ("Schema for
Profile file.xsd") you can use to validate an existing Profile XML
file. .xsd files can be read by MS Visual Studio and many
XML-related editors.
2. Several pre-built working samples of projects (including Profile
XML files) using the Automatic Interception Interface are installed
with IncrediBuild. See this section for
more details.
The Profile XML file structure is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no"
?>
<Profile FormatVersion="1">
<Tools>
<Tool ATTRIBUTES
/>
...
</Tools>
</Profile>
- The Tool element defines the tool or tools that
IncrediBuild should handle during the distributed process.
- Multiple Tool elements may be included under the
Tools element.
- A Tool element should be added for the following
cases:
| Description
|
AllowRemote Value
|
AllowIntercept Value
|
| Executables whose execution is to be distributed to remote
machines |
True |
False |
| Executables responsible for direct or indirect execution of
remotely executed Tools |
False |
True |
| Executables to be executed locally (optional) |
False |
False |
Tool Element Attributes
- Filename: The name of the tool (filename extension is
optional).
- AllowRemote: Execution of Tools with this attribute set
to "True" will be distributed to remote machines.
- AllowIntercept: Tools with this attribute set to "True"
are monitored by the Automatic Interception Interface. Any tool
responsible for direct or indirect execution of remotely executed
Tools (Tools with AllowRemote set to "True") should have
AllowIntercept set to "True".
- DeriveCaptionFrom: This attribute controls the caption
that will appear in the task's build bar in the build monitor
Progress View. The attribute
accepts 2 pre-defined values:
- firstparam – will echo the first parameter from the
task's command line.
- lastparam – will echo the last parameter from the task's
command line.
- SuccessExitCodes: This attribute specifies the exit
code(s) that will be considered success exit codes for the
specified tool. Value is a comma-separated list of numerical
values. Ranges are also allowed (e.g.: '2..19'). If omitted, the
default success exit code for the tool will be 0.
- The main build tool executable should be defined in the profile
XML with the AllowIntercept attribute set to "True" (see XML
profile files in the sample
projects). Note that if you are running xgConsole.exe with the
"/COMMAND=" syntax, the tool specified in the /COMMAND argument (or
cmd.exe if the tool is a .bat file) will be implicitly given the
AllowIntercept behavior.
- If the process to be executed remotely is spawned by a child
process of the main build tool, the entire hierarchy of processes
starting from the main build tool should be specified the
AllowIntercept attribute set to "True". For example, if the
main build tool is "make.exe", which executes "runner.exe", and
"runner.exe" executes "MyTool.exe" which is the process whose
execution we wish to distribute, then both "make.exe" and
"runner.exe" must be specified with the AllowIntercept
attribute set to "True".
- when running make tools in the Mingw or Cygwin environments,
some common shell commands are automatically defined with
"AllowIntercept" set to "True", to avoid their execution getting
queued. See this page for more details.
- Executables spawned by a tool specified with AllowRemote
set to "True" should not be specified as well with
AllowRemote set to "True". Remote child processes will be
handled automatically by the Xoreax Grid Engine.
Copyright (C) 2001-2008 Xoreax Software Ltd. All rights
reserved.