Skip to content
Merged
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
5 changes: 3 additions & 2 deletions .CI/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,11 @@ pipeline {
sh "./report.py --branches='generateSymbolicJacobian' configs/conf.json"
sh "mv overview.html overview-generateSymbolicJacobian.html"

sh "./report.py --branches='dataReconciliation dataReconciliation-newBackend' configs/dataReconciliation.json"
// master does not test these libraries.
sh "./report.py --branches='dataReconciliation dataReconciliation-newBackend' --invalid-branch=dataReconciliation configs/dataReconciliation.json"
sh "mv overview.html overview-dataReconciliation.html"

sh "./report.py --branches='heavy_tests heavy_tests_wasm' configs/heavy_tests.json"
sh "./report.py --branches='heavy_tests heavy_tests_wasm' --invalid-branch=heavy_tests configs/heavy_tests.json"
sh "mv overview.html overview-heavy_tests.html"

sh "./report.py --branches='${env.GITBRANCHES_NEWINST}' configs/conf.json"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Verify that overview.html contains simulation and verification
shell: bash
run: |
if ! grep -q '<tr><td><a href="${{ matrix.omc-version }}/MyLibrary_1.0.0/MyLibrary_1.0.0.html">${{ matrix.omc-version }}</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td><td><a>2</a></td></tr></table>' overview.html; then
if ! grep -q '<tr><td><a href="${{ matrix.omc-version }}/MyLibrary_1.0.0/MyLibrary_1.0.0.html">${{ matrix.omc-version }}</a></td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td></tr>' overview.html; then
echo "Failed to find 2 simulating and 2 verifying models in overwiew.html:"
cat overview.html
exit 1
Expand Down
8 changes: 2 additions & 6 deletions configs/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@
{
"library":"AES",
"libraryVersion":"main",
"libraryVersionNameForTests":"",
"extraCustomCommands":["setCommandLineOptions(\"--allowNonStandardModelica=illegalConditionalContext\");"]
"libraryVersionNameForTests":""
},
{
"library":"AixLib"
Expand Down Expand Up @@ -326,14 +325,12 @@
"library":"Dynawo",
"ulimitExeModels":{
"Dynawo.Examples.RVS.TestCases.TestB.TestBNoSvcNoLoadReset":330
},
"extraCustomCommands":["setCommandLineOptions(\"--allowNonStandardModelica=implicitParameterStartAttribute,illegalConditionalContext\");"]
}
},
{
"library":"Dynawo",
"libraryVersion":"master",
"libraryVersionNameForTests":"dev",
"extraCustomCommands":["setCommandLineOptions(\"--allowNonStandardModelica=implicitParameterStartAttribute,illegalConditionalContext\");"],
"referenceFileExtension":"csv",
"referenceFileNameDelimiter":".",
"referenceFinalDot":"_res.",
Expand Down Expand Up @@ -673,7 +670,6 @@
"libraryVersionNameForTests":"",
"extraCustomCommands":
[
"setCommandLineOptions(\"--allowNonStandardModelica=nonStdEnumerationAsIntegers,nonStdTopLevelOuter\")",
"setEnvironmentVar(\"publicData\", \"$libraryLocation/Tables/\")",
"setEnvironmentVar(\"privateData\", \"$libraryLocation/Tables/\")",
"setEnvironmentVar(\"superstructureTables\", \"$libraryLocation/Tables/superstructure/Tables/\")",
Expand Down
9 changes: 7 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ migrates on startup (`test.py`, around the `CREATE TABLE` block):
| 0 | empty/new database; `omcversion` and `libversion` are created |
| 1 | `libversion.confighash` added |
| 2 | `parsing` added to every per-branch table |
| 3 | current layout |
| 3 | the layout of 2026-08 |
| 4 | `libversion.host` and `libversion.sysinfo` added |
| 5 | `maxrss` added to every per-branch table |
| 6 | `invalid` added to every per-branch table; current layout |

A database with a higher `user_version` makes `test.py` exit rather than guess.

Expand Down Expand Up @@ -72,7 +75,9 @@ CREATE TABLE if not exists [<branch>] (
verifyfail integer NOT NULL, -- number of variables that differ from the reference
verifytotal integer NOT NULL, -- number of variables compared against the reference
finalphase integer NOT NULL, -- how far the model got, see below
parsing real NOT NULL -- time loading/parsing the library [s]
parsing real NOT NULL, -- time loading/parsing the library [s]
maxrss integer NOT NULL, -- most resident memory of the test at once [bytes]
invalid integer NOT NULL -- 1 if the model needs non-standard Modelica, see below
)
```

Expand Down
7 changes: 7 additions & 0 deletions library.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
<html lang="en">
<head>
<title>#fileName# test using OpenModelica</title>
<style>
tr.invalid > td:first-child, td.invalid {background-color:#F4A6A6;}
span.cross {color:#D00000; font-weight:bold;}
</style>
</head>
<body>
<h1>#fileName# test using OpenModelica</h1>

<table>
<tr>
<th>Total</th>
<th title="Models that need non-standard Modelica (--allowNonStandardModelica)">Invalid</th>
<th>Frontend</th>
<th>Backend</th>
<th>SimCode</th>
Expand All @@ -19,6 +24,7 @@
</tr>
<tr>
<td>#Total#</td>
<td#InvalidClass#>#Invalid#</td>
<td bgcolor="#FrontendColor#">#Frontend#</td>
<td bgcolor="#BackendColor#">#Backend#</td>
<td bgcolor="#SimCodeColor#">#SimCode#</td>
Expand Down Expand Up @@ -51,6 +57,7 @@ Optimization level: #optlevel#</p>
Flags: <pre>#customCommands#</pre>
Config: <pre>#config#</pre>
<p>Links are provided if getErrorString() or the simulation generates output. The links are coded with <font style="#FF0000">red</font> if there were errors, <font style="#FFCC66">yellow</font> if there were warnings, and normal links if there are only notifications.</p>
#invalidNote#
<table>
<tr><th>Model</th><th>Verified</th><th>#simulateLabel#</th>#drHeader#<th>Total buildModel</th><th>Parsing</th><th>Frontend</th><th>Backend</th><th>SimCode</th><th>Templates</th><th>Compile</th><th>Total Execution</th></tr>
#testsHTML#
Expand Down
120 changes: 106 additions & 14 deletions overview.html.tpl
Original file line number Diff line number Diff line change
@@ -1,28 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>#title#</title>
<style>
td.warning {background-color:#FFCC66;}
td.better {background-color:#00FF00;}
td.warningPerformance {background-color:#FFFC66;}
td.betterPerformance {background-color:#00FAFF;}
a span.tooltip {display:none;}
a:hover span.tooltip {position:fixed;top:30px;left:20px;display:inline;border:2px solid black;background-color:white;}
a.dot {border-bottom: 1px dotted #000; text-decoration: none;}
:root {
--text: #1f2328;
--muted: #59636e;
--border: #d8dee4;
--rule: #eaeef2;
--head: #f3f5f8;
--page: #f6f8fa;
--card: #ffffff;
--accent: #2f6fd0;
--invalid: #f6c3c3;
--invalid-text: #b42318;
}
body {
margin: 0 24px 24px;
background: var(--page);
color: var(--text);
font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a {color: var(--accent); text-decoration: none;}
a:hover {text-decoration: underline;}
h1 {font-size: 20px; margin: 0;}
h2 {font-size: 17px; margin: 24px 0 8px;}
h3 {font-size: 16px; margin: 0 0 4px;}

header.toolbar {
position: sticky; top: 0; z-index: 1;
display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
margin: 0 -24px 16px; padding: 10px 24px;
background: var(--card); border-bottom: 1px solid var(--border);
}
header.toolbar .label {color: var(--muted);}

.switch {display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--card);}
.switch button {
font: inherit; font-size: 13px; padding: 4px 12px; margin: 0;
border: 0; background: transparent; color: var(--text); cursor: pointer;
}
.switch button + button {border-left: 1px solid var(--border);}
.switch button:hover {background: var(--head);}
.switch button[aria-pressed="true"] {background: var(--accent); color: #fff;}
.switch button:focus-visible {outline: 2px solid var(--accent); outline-offset: -2px;}

.stats {display: flex; flex-wrap: wrap; gap: 12px;}
.stat {background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; min-width: 120px;}
.stat .value {display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;}
.stat .name {color: var(--muted);}
.stat.invalid {border-color: var(--invalid);}
.stat.invalid .value {color: var(--invalid-text);}
p.note {color: var(--muted); max-width: 70em;}

table {border-collapse: collapse; margin: 4px 0 12px; background: var(--card); font-variant-numeric: tabular-nums;}
caption {caption-side: top; text-align: left; color: var(--muted); font-size: 12px; padding: 4px 0;}
th, td {padding: 3px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap;}
th {background: var(--head); font-weight: 600; border-bottom: 1px solid var(--border);}
th:first-child, td:first-child {text-align: left;}
table.branches td:nth-child(-n+3) {text-align: left;}
table.versions td, table.versions th {text-align: left;}
td.warning {background-color: #ffd27a;}
td.better {background-color: #9be89b;}
td.warningPerformance {background-color: #FFFC66;}
td.betterPerformance {background-color: #00FAFF;}
.view-invalid th {background: #fbe3e3;}

section.library {background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px 4px; margin: 12px 0;}
section.library table {background: transparent;}
p.version {margin: 0 0 6px; color: var(--muted);}
.badge {display: inline-block; margin: 6px 0; background: var(--invalid); color: var(--invalid-text); font-weight: 600; border-radius: 999px; padding: 2px 10px;}
span.cross {color: #d00000; font-weight: bold;}
details {margin: 4px 0 8px;}
summary {cursor: pointer; color: var(--muted);}
details p {margin: 4px 0 0 16px;}

[data-view] > .view {display: none;}
[data-view="valid"] > .view-valid,
[data-view="all"] > .view-all,
[data-view="invalid"] > .view-invalid {display: block;}
</style>
</head>
<body>
<header class="toolbar">
<h1>#title#</h1>
<span class="label">Invalid models:</span>
#viewSwitch#
</header>
<h2>Statistics</h2>
<table>
<tr><td>Number of libraries</td><td>#numlibs#</td></tr>
<tr><td>Number of models</td><td>#nummodels#</td></tr>
</table>
<div class="stats">
<div class="stat"><span class="value">#numlibs#</span><span class="name">libraries</span></div>
<div class="stat"><span class="value">#nummodels#</span><span class="name">models</span></div>
<div class="stat invalid"><span class="value">#numinvalid#</span><span class="name">invalid models</span></div>
</div>
<p class="note">A model is invalid if the newest run of #invalidBranch# on its library translated it only because
--warnNonStandardModelica turned the errors of non-standard Modelica into warnings. The buttons at the top
select if the counts and times leave the invalid models out (the default), include them, or count only them.</p>
<h2>Tested branches</h2>
<table>
<tr><th>Branch</th><th>Version</th><th>Build time</th><th>Execution time</th><th>Simulation time</th><th>#simulateLabel#</th><th># Verify</th><th># Total</th></tr>
<div id="branches" data-view="valid">
#branches#
</table>
</div>
<h2>Libraries</h2>
#entries#
<script>
for (const button of document.querySelectorAll('.switch button')) {
button.addEventListener('click', () => {
for (const b of button.parentElement.querySelectorAll('button')) {
b.setAttribute('aria-pressed', b === button);
}
for (const container of document.querySelectorAll('[data-view]')) {
container.dataset.view = button.dataset.show;
}
});
}
</script>
</body>
</html>
Loading
Loading