Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Multi Run File gets too large and confusing to read #13

Closed
TrajceNikolov opened this issue Jan 21, 2016 · 2 comments
Closed

Batch Multi Run File gets too large and confusing to read #13

TrajceNikolov opened this issue Jan 21, 2016 · 2 comments
Assignees
Milestone

Comments

@TrajceNikolov
Copy link
Collaborator

Although I think the multi-run capability in XTMF is very much an incredibly useful feature, one problem that I have with it is that, when running a lot of runs, the "Batch File" gets too large and very confusing to read in its current format. More importantly, it becomes somewhat difficult to read through the paths when doing a QA before I launch a run. A more readable format would most definitely be welcomed.

@JamesVaughan
Copy link
Member

My current proposition is to include a new feature into the Multi-run framework to define a template. This template would contain an attribute for the parameters into the template, and inner XML. This XML would have its attributes searched for %[ParameterName]% and on invocation of the template have it replaced with the given parameter's value. This could greatly reduce the amount of duplicate lines, making it easier to validate.

@JamesVaughan
Copy link
Member

In 8b403b4 I've implement the logic for templates and the ability to import/execute other multi-run files recursively. The following files would show how to use a template to create another template that is able to execute a model system.

TemplateTest.xml

<Root>
  <import Path="..\..\Input\TemplateTest2.xml" />
  <executeTemplate Name="ExecuteWaitTwice" Dur1="5 seconds" Dur2="10 seconds" />
</Root>

TemplateTest2.xml

<Root>
  <template Name="ExecuteWaitTwice" Parameters="Dur1;Dur2">
    <template Name="ExecuteWait" Parameters="Duration">
      <run RunAs="%%Duration%%" Name="%%Duration%%:">
        <ChangeParameter ParameterPath="Wait time" Value="%%Duration%%" />
      </run>
    </template>
    <executeTemplate Name="ExecuteWait" Duration="%Dur1%" />
    <executeTemplate Name="ExecuteWait" Duration="%Dur2%" />
  </template>
</Root>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants