Skip to content

Commit

Permalink
Output full library name in machine-readable test reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed May 6, 2024
1 parent 5c82380 commit f8ca335
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public String name() {
return name;
}

public String fullName() {
return name() + " (" + provider.getName() + ")";
}

public Provider getProvider() {
return provider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected String deviceString(TestSuite suite) {
StandaloneTestSuite standaloneSuite = (StandaloneTestSuite) suite;
StringBuilder sb = new StringBuilder();
sb.append("═══ ").append(Colors.underline("ECTester version:")).append(" ").append(ECTesterStandalone.VERSION).append(System.lineSeparator());
sb.append("═══ ").append(Colors.underline("Library:")).append(" ").append(standaloneSuite.getLibrary().name()).append(" (").append(standaloneSuite.getLibrary().getProvider().getName()).append(")").append(System.lineSeparator());
sb.append("═══ ").append(Colors.underline("Library:")).append(" ").append(standaloneSuite.getLibrary().fullName()).append(System.lineSeparator());
return sb.toString();
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected Element deviceElement(TestSuite suite) {
result.setAttribute("ectester", ECTesterStandalone.VERSION);

Element name = doc.createElement("name");
name.setTextContent(standaloneSuite.getLibrary().name());
name.setTextContent(standaloneSuite.getLibrary().fullName());
result.appendChild(name);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected Map<String, Object> deviceObject(TestSuite suite) {
Map<String, Object> result = new LinkedHashMap<>();
result.put("type", "library");
result.put("ectester", ECTesterStandalone.VERSION);
result.put("name", standaloneSuite.getLibrary().name());
result.put("name", standaloneSuite.getLibrary().fullName());
return result;
}
return null;
Expand Down

0 comments on commit f8ca335

Please sign in to comment.