Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b33a525
xml results initial shot
judovana Nov 17, 2024
2e91a4d
Removed cpuMap from detailed test output
judovana Nov 18, 2024
f0c0de3
hidden constructor used methods
judovana Nov 18, 2024
c04b2f8
Unhappy experiemnts to try traces from subtests
judovana Nov 19, 2024
0380427
use name of proeprty
judovana Nov 22, 2024
70edc25
Changed approach to iterate ower merged results.
judovana Nov 22, 2024
2572fa2
Reorganized and cleaned up as it finally do what it should
judovana Nov 25, 2024
9af3612
FIXME Added fast fake results generator REMOVE IT
judovana Jan 7, 2025
126dc70
Various changes.. bad day
judovana Jan 9, 2025
4ac17b8
aded possibility to merge stdout/err to failure only
judovana Jan 10, 2025
c9333f9
Small code improvements
judovana Jan 11, 2025
fa80272
Removed most of the duplicated code
judovana Jan 11, 2025
536338a
Refactored exporter proeprties to method
judovana Jan 11, 2025
1b2cb28
Next gandidate to soon be removed code
judovana Jan 12, 2025
10915f6
No longer pritning empty properties
judovana Jan 13, 2025
a28f08e
Not printing the seed argument
judovana Jan 13, 2025
724fc3f
<testsuite> now prints correct summary
judovana Jan 15, 2025
b6a8aa4
Support for time attribute and removed some dnagling code
judovana Jan 16, 2025
89d8d01
Unifide testcase print
judovana Jan 16, 2025
a56c1a3
changed comments proeprty to comment out non-standart elements
judovana Jan 16, 2025
30fce35
made default output xsd valid again
judovana Jan 18, 2025
04824cf
Fixed few noted comments/variables
judovana Jan 25, 2025
1fd743b
Revert "FIXME Added fast fake results generator REMOVE IT"
judovana Jan 25, 2025
01b37ae
Started migration to proepr DOM
judovana Jan 25, 2025
870f160
Dropped the dom-based generation
judovana Jan 27, 2025
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
14 changes: 11 additions & 3 deletions jcstress-core/src/main/java/org/openjdk/jcstress/JCStress.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.openjdk.jcstress.infra.grading.ExceptionReportPrinter;
import org.openjdk.jcstress.infra.grading.TextReportPrinter;
import org.openjdk.jcstress.infra.grading.HTMLReportPrinter;
import org.openjdk.jcstress.infra.grading.XMLReportPrinter;
import org.openjdk.jcstress.infra.runners.TestConfig;
import org.openjdk.jcstress.infra.runners.TestList;
import org.openjdk.jcstress.os.*;
Expand Down Expand Up @@ -157,11 +158,18 @@ public void parseResults() throws Exception {
drc.dump();
drc.close();

new TextReportPrinter(opts, collector).work();
new HTMLReportPrinter(opts, collector, out).work();
new TextReportPrinter(opts.verbosity(), collector).work();
new HTMLReportPrinter(opts.getResultDest(), collector, out).work();
if (XMLReportPrinter.getSparse(out)!=null) {
new XMLReportPrinter(opts.getResultDest(), collector, out, XMLReportPrinter.getSparse(out)).work();
} else {
new XMLReportPrinter(opts.getResultDest(), collector, out, false).work();
new XMLReportPrinter(opts.getResultDest(), collector, out, true).work();
}
new ExceptionReportPrinter(collector).work();
}


private SortedSet<Integer> computeActorCounts(Set<String> tests) {
SortedSet<Integer> counts = new TreeSet<>();
for (String test : tests) {
Expand Down Expand Up @@ -252,7 +260,7 @@ public int listTests(Options opts) {
Set<String> testsToPrint = new TreeSet<>();
for (TestConfig test : configsWithScheduler.configs) {
if (opts.verbosity().printAllTests()) {
testsToPrint.add(test.toDetailedTest());
testsToPrint.add(test.toDetailedTest(true));
} else {
testsToPrint.add(test.name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
package org.openjdk.jcstress.infra.grading;


import org.openjdk.jcstress.Options;
import org.openjdk.jcstress.annotations.Expect;
import org.openjdk.jcstress.infra.Status;
import org.openjdk.jcstress.infra.TestInfo;
Expand Down Expand Up @@ -57,19 +56,23 @@ public class HTMLReportPrinter {
private final InProcessCollector collector;
private int cellStyle = 1;

public HTMLReportPrinter(Options opts, InProcessCollector collector, PrintStream out) {
public HTMLReportPrinter(String resultDir, InProcessCollector collector, PrintStream out) {
this.collector = collector;
this.resultDir = opts.getResultDest();
this.resultDir = resultDir;
File dir = new File(resultDir);
dir.mkdirs();
out.println(" HTML report generated at " + dir.getAbsolutePath() + File.separator + "index.html");
out.println(" HTML report generated at " + dir.getAbsolutePath() + File.separator + getMainFileName());
}

private String getMainFileName() {
return "index.html";
}

public void work() throws FileNotFoundException {
List<TestResult> byName = ReportUtils.mergedByName(collector.getTestResults());
Collections.sort(byName, Comparator.comparing(TestResult::getName));

PrintWriter output = new PrintWriter(resultDir + "/index.html");
PrintWriter output = new PrintWriter(resultDir + File.separator + getMainFileName());

printHeader(output);

Expand Down Expand Up @@ -171,7 +174,7 @@ public void work() throws FileNotFoundException {
emitTestReports(ReportUtils.byName(collector.getTestResults()));
}

private SortedMap<String, String> getEnv(List<TestResult> ts) {
static SortedMap<String, String> getEnv(List<TestResult> ts) {
SortedMap<String, String> env = new TreeMap<>();
for (TestResult result : ts) {
if (result != null) {
Expand Down Expand Up @@ -353,10 +356,7 @@ public void emitTestReport(PrintWriter o, Collection<TestResult> results, TestIn
}

List<TestResult> sorted = new ArrayList<>(results);
sorted.sort(Comparator
.comparing((TestResult t) -> t.getConfig().getCompileMode())
.thenComparing((TestResult t) -> t.getConfig().getSchedulingClass().toString())
.thenComparing((TestResult t) -> StringUtils.join(t.getConfig().jvmArgs, ",")));
resultsOrder(sorted);

o.println("<h3>Environment</h3>");
o.println("<table>");
Expand Down Expand Up @@ -492,6 +492,13 @@ public void emitTestReport(PrintWriter o, Collection<TestResult> results, TestIn
printFooter(o);
}

static void resultsOrder(List<TestResult> sorted) {
sorted.sort(Comparator
.comparing((TestResult t) -> t.getConfig().getCompileMode())
.thenComparing((TestResult t) -> t.getConfig().getSchedulingClass().toString())
.thenComparing((TestResult t) -> StringUtils.join(t.getConfig().jvmArgs, ",")));
}

private void resultHeader(PrintWriter o, TestResult r) {
TestConfig cfg = r.getConfig();
o.println("<p><b>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ public static Multimap<String, TestResult> byName(Collection<TestResult> src) {
}
return result;
}
public static Multimap<String, TestResult> byDetailedName(Collection<TestResult> src) {
Multimap<String, TestResult> result = new HashMultimap<>();
for (TestResult r : mergedByConfig(src)) {
result.put(r.getConfig().toDetailedTest(false), r);
}
return result;
}

private static TestResult merged(TestConfig config, Collection<TestResult> mergeable) {
Counter<String> counter = new Counter<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public class TextReportPrinter {
private final PrintWriter pw;
private final Set<TestResult> emittedTests;

public TextReportPrinter(Options opts, InProcessCollector collector) {
public TextReportPrinter(Verbosity verbosity, InProcessCollector collector) {
this.collector = collector;
this.pw = new PrintWriter(System.out, true);
this.verbosity = opts.verbosity();
this.verbosity = verbosity;
this.emittedTests = new HashSet<>();
}

Expand Down
Loading