final String description;\r
if (i == 0) {// project itself\r
description = project.getDescription() != null ? project\r
- .getDescription() : "";\r
+ .getDescription() : "[no desc]";\r
} else {\r
description = slcAntConfig.getDescriptionForDir(dir);\r
}\r
private List<TestDefinition> tasks = null;\r
private List<TreeSPath> taskPaths = null;\r
private TreeSPath path;\r
+ private StructureRegistry registry;\r
\r
public void execute(TestRun testRun) {\r
log.info("Execute sequence of test definitions...");\r
for (TestDefinition task : tasks) {\r
TestResult result = testRun.getTestResult();\r
if (result instanceof StructureAware) {\r
- ((StructureAware) result).notifyCurrentPath(null, taskPaths\r
+ ((StructureAware) result).notifyCurrentPath(registry, taskPaths\r
.get(i));\r
}\r
\r
\r
// Reset current path in case it has been changed\r
if (result instanceof StructureAware) {\r
- ((StructureAware) result).notifyCurrentPath(null, path);\r
+ ((StructureAware) result).notifyCurrentPath(registry, path);\r
}\r
i++;\r
}\r
\r
public void notifyCurrentPath(StructureRegistry registry, StructurePath path) {\r
this.path = (TreeSPath) path;\r
-\r
+ this.registry = registry;\r
+ \r
// clear task paths\r
taskPaths.clear();\r
\r
if (task instanceof StructureElement) {\r
element = (StructureElement) task;\r
} else {\r
- element = new SimpleSElement("<no desc>");\r
+ element = new SimpleSElement("[no desc]");\r
}\r
TreeSPath taskPath = this.path.createChild(count.toString());\r
registry.register(taskPath, element);\r
\r
private void syncPath(TreeSRegistry registry,\r
StructureRegistry localRegistry, TreeSPath path) {\r
+ if (path.getParent() != null) {\r
+ TreeSPath parent = treeSPathDao.getOrCreate(path.getParent());\r
+ syncPath(registry, localRegistry, parent);\r
+ }\r
+\r
if (registry.getElement(path) == null) {\r
if (localRegistry != null) {\r
registry.register(path, localRegistry.getElement(path));\r
treeSRegistryDao.update(registry);\r
}\r
\r
- if (path.getParent() != null) {\r
- TreeSPath parent = treeSPathDao.getOrCreate(path.getParent());\r
- syncPath(registry, localRegistry, parent);\r
- }\r
}\r
}\r