Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ else if (file != null && name == null) {
}

public static void importFile(String file, URI relativeTo) throws Exception {

// Solve user_home value
if (file.contains("[user_home]")) {
String userHome = System.getProperty("user.home");
file = file.replace("[user_home]", userHome);
}

// parse the xml file
XMLDocument scenarioDocument = Cache.getXMLDocument(relativeTo.resolve(file), URIFactory.newURI("../conf/schemas/scenario.xsd"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public Operation execute(Runner runner) throws Exception {
// retrieve the list of groovy files to load
String groovyFiles = getRootElement().attributeValue("name");

// Solve user_home value
if (groovyFiles.contains("[user_home]")) {
String userHome = System.getProperty("user.home");
groovyFiles = groovyFiles.replace("[user_home]", userHome);
}

// retrieve the groovy operation script source
String scriptSource = getRootElement().getText();

Expand Down