diff --git a/conf/report/report-template.html b/conf/report/report-template.html
index b9fe401813184..d917d98756639 100644
--- a/conf/report/report-template.html
+++ b/conf/report/report-template.html
@@ -49,238 +49,100 @@
tool_array = table.columns()[0];
tool_array = tool_array.splice(2);
col_array = table.columns()[0];
+ var filters = $('
Show advanced filters (experimental)
').insertAfter(".dataTables_filter");
+ var section = $('').insertAfter("summary");
+ var add_buttons = $('Add Apply Remove all filters
').insertAfter("#filter");
} );
var iter;
- var selected_tools = [];
- var tools_relation;
-
- const operator_from_string = {
- '<': (a, b) => a < b,
- '>': (a, b) => a > b,
- '>=': (a, b) => a >= b,
- '<=': (a, b) => a <= b,
- '=': (a, b) => a === b
- };
+ var global_relation;
+ var filter_expression;
const relation_from_string = {
- 'and': (a, b) => a && b,
- 'or': (a, b) => a || b
- }
-
- function toggleFilters() {
- var x = document.getElementById("filter");
- if (x.style.display === "none") {
- x.style.display = "block";
- } else {
- x.style.display = "none";
- }
+ 'is': '==',
+ 'is not': '!=='
}
const filter_types = {
coverage: {
name: "Coverage",
- operators: ["<", "<=", ">", ">=", "="],
- value_field_factory: function(id, span_id=0) {
- span_id = parseInt(span_id)
- if ($(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).length > 0)
- $(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).remove()
- var iter = $(`li[data-uid=${id}] span`).length
- if (iter === 0)
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] .filter-entry-type`)
- else
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] span[data-uid=${iter-1}]`)
- var filter_entry_operator = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_entry_value = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_condition_options = $('AND OR ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
+ operators: ["<", "<=", ">", ">=", "=="],
+ value_field_factory: function(id) {
+ $(`li[data-uid=${id}] .filter-entry-operator`).remove();
+ $(`li[data-uid=${id}] .filter-entry-value`).remove();
+ var filter_entry_operator = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-type`);
+ var filter_entry_value = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i${this.operators[i]}`).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-operator`);
+ $(`${this.operators[i]} `).appendTo(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i<=100; i++)
- $(`${i} `).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-value`);
- },
- apply: function(operator1, percentage1, operator2, percentage2, relation) {
- var values = new Set();
- if (typeof relation == 'undefined') {
- table.columns().every(function() {
- var column = this;
- if(column.index() !== 0 && column.index() !== 1) {
- percentage = parseInt(percentage1);
- column.data().each(function(d, j) {
- output = d.split('/');
- tests_passed = output[0];
- total_tests = output[1];
- coverage = parseInt((tests_passed/total_tests)*100);
- if ((operator1 in operator_from_string) && operator_from_string[operator1](coverage, percentage))
- values.add(d);
- });
- }
- });
- }
- else {
- table.columns().every(function() {
- var column = this;
- if(column.index() !== 0 && column.index() !== 1) {
- percentage1 = parseInt(percentage1);
- percentage2 = parseInt(percentage2);
- column.data().each(function(d, j) {
- output = d.split('/');
- tests_passed = output[0];
- total_tests = output[1];
- coverage = parseInt((tests_passed/total_tests)*100);
- const result_left = operator_from_string[operator1](coverage, percentage1);
- const result_right = operator_from_string[operator2](coverage, percentage2);
- const result = relation_from_string[relation](result_left, result_right);
- if (result)
- values.add(d);
- });
- }
- });
- }
- values = [...values];
- if (selected_tools.length === 0){
- table.columns(col_array).every(function() {
- $.fn.dataTable.ext.search.push(
- function(settings, searchData, index, rowData, counter) {
- for(var i=0; i${i}`).appendTo(`li[data-uid=${id}] .filter-entry-value`);
}
},
type: {
name: "Type",
operators: ["is", "is not"],
types: ["parsing", "preprocessing", "simulation"],
- value_field_factory: function(id, span_id=0) {
- span_id = parseInt(span_id)
- if ($(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).length > 0)
- $(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).remove()
- var iter = $(`li[data-uid=${id}] span`).length
- if (iter === 0)
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] .filter-entry-type`)
- else
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] span[data-uid=${iter-1}]`)
- var filter_entry_operator = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_entry_value = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_condition_options = $('AND OR ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
+ value_field_factory: function(id) {
+ $(`li[data-uid=${id}] .filter-entry-operator`).remove();
+ $(`li[data-uid=${id}] .filter-entry-value`).remove();
+ var filter_entry_operator = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-type`);
+ var filter_entry_value = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i${this.operators[i]}`).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-operator`);
+ $(`${this.operators[i]} `).appendTo(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i${this.types[i]}`).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-value`);
- },
- apply: function(operator1, type1, operator2, type2, relation) {
- if (typeof relation == 'undefined'){
- $.fn.dataTable.ext.search.push(
- function(settings, data, dataIndex){
- if (operator1 === 'is')
- return $(table.row(dataIndex).node()).hasClass(type1);
- else if (operator1 === 'is not')
- return !$(table.row(dataIndex).node()).hasClass(type1);
- });
- }
- else {
- $.fn.dataTable.ext.search.push(
- function(settings, data, dataIndex){
- if (relation === 'and'){
- if (operator1 === 'is' && operator2 === 'is')
- return (($(table.row(dataIndex).node()).hasClass(type1)) && ($(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is' && operator2 === 'is not')
- return (($(table.row(dataIndex).node()).hasClass(type1)) && (!$(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is not' && operator2 === 'is')
- return ((!$(table.row(dataIndex).node()).hasClass(type1)) && ($(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is not' && operator2 === 'is not')
- return ((!$(table.row(dataIndex).node()).hasClass(type1)) && (!$(table.row(dataIndex).node()).hasClass(type2)));
- }
- else if (relation === 'or'){
- if (operator1 === 'is' && operator2 === 'is')
- return (($(table.row(dataIndex).node()).hasClass(type1)) || ($(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is' && operator2 === 'is not')
- return (($(table.row(dataIndex).node()).hasClass(type1)) || (!$(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is not' && operator2 === 'is')
- return ((!$(table.row(dataIndex).node()).hasClass(type1)) || ($(table.row(dataIndex).node()).hasClass(type2)));
- else if (operator1 === 'is not' && operator2 === 'is not')
- return ((!$(table.row(dataIndex).node()).hasClass(type1)) || (!$(table.row(dataIndex).node()).hasClass(type2)));
- }
- }
- );
- }
- table.draw();
+ $(`${this.types[i]} `).appendTo(`li[data-uid=${id}] .filter-entry-value`);
}
},
tool: {
name: "Tool",
operators: ["is", "is not"],
tools: toolnames,
- value_field_factory: function(id, span_id=0) {
- span_id = parseInt(span_id)
- if ($(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).length > 0)
- $(`li[data-uid=${id}] span[data-uid=${span_id+1}]`).remove()
- var iter = $(`li[data-uid=${id}] span`).length
- if (iter === 0)
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] .filter-entry-type`)
- else
- var filter_condition = $(` `).insertAfter(`li[data-uid=${id}] span[data-uid=${iter-1}]`)
- var filter_entry_operator = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_entry_value = $(' ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
- var filter_condition_options = $('AND OR ').appendTo(`li[data-uid=${id}] span[data-uid=${iter}]`)
+ value_field_factory: function(id) {
+ $(`li[data-uid=${id}] .filter-entry-operator`).remove();
+ $(`li[data-uid=${id}] .filter-entry-value`).remove();
+ var filter_entry_operator = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-type`);
+ var filter_entry_value = $(' ').insertAfter(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i${this.operators[i]}`).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-operator`);
+ $(`${this.operators[i]} `).appendTo(`li[data-uid=${id}] .filter-entry-operator`);
for (var i=0; i${this.tools[i]}`).appendTo(`li[data-uid=${id}] span[data-uid=${iter}] .filter-entry-value`);
- },
- apply: function(operator, tool) {
- table.columns(col_array).visible(true);
- table.columns(tool_array).every(function() {
- var column = this;
- if(column.index() !== 0 && column.index() !== 1){
- var theadname = column.header().textContent.trim();
- if(operator === 'is'){
- if(theadname === tool){
- var index = tool_array.indexOf(column.index());
- tool_array.splice(index, 1);
- selected_tools.push(column.index());
- }
- }
- else if(operator === 'is not'){
- if(theadname !== tool){
- var index = tool_array.indexOf(column.index());
- tool_array.splice(index, 1);
- selected_tools.push(column.index());
- }
- }
- }
- });
- table.columns(tool_array).visible(false);
+ $(`${this.tools[i]} `).appendTo(`li[data-uid=${id}] .filter-entry-value`);
}
}
}
+ const global_relation_string = {
+ 'and': ' && ',
+ 'or': ' || '
+ }
+
+ function string_builder(applied_filters) {
+ var query = [];
+ global_relation = $('.global-relation').val();
+ $('.filter-entries').find('li').each(function(){
+ var expression = $(this).find('.filter-entry-type').val() + $(this).find('.filter-entry-operator').val() + "\"" + $(this).find('.filter-entry-value').val() + "\"";
+ query.push(expression);
+ });
+ return query.join(global_relation_string[global_relation]);
+ }
+
+ function search_function() {
+ const filter_cell = eval('(coverage, tool, type) => (' + filter_expression + ')')
+ $.fn.dataTable.ext.search.push(
+ function(settings, searchData, index, rowData, counter){
+ for(var i=2; i (a.priority < b.priority) ? 1 : -1);
- for(const key in applied_filters){
- if (applied_filters[key]['filter'] === 'tool')
- tool_relation = applied_filters[key][0]['relation'];
- if (applied_filters[key]['filter'] !== 'tool' && (Object.keys(applied_filters[key]).length-2 === 2))
- filter_types[applied_filters[key]['filter']].apply(applied_filters[key][0]['operator'], applied_filters[key][0]['value'], applied_filters[key][1]['operator'], applied_filters[key][1]['value'], applied_filters[key][0]['relation']);
- else {
- for (var i=0; i= 1 && document.getElementsByClassName('global-relation').length == 0){
+ var global_relation = $('AND OR ').insertAfter("#filter");
+ }
iter = $('.filter-entries').children('li').length;
if(iter === 0)
$('.filter-apply').show();
@@ -375,16 +214,6 @@
Test suite to check compliance with the SystemVerilog LRM by chapter as well as some real-world cores and test-cases.
- Show advanced filters (experimental)
-
-
-
- Add
- Apply
- Remove all filters
-
-
{% for tag, info in database.items() %}
- {% set list = [] %}
- {% for tool, tooldata in report|dictsort %}
- {% for type in tooldata["tags"][tag]["type"] %}
- {% if type not in list %}
- {% set list = list.append(type) %}
- {% endif %}
- {% endfor %}
- {% endfor %}
-
+
{% if tag in database_urls %}
{{ info }}
@@ -416,15 +237,18 @@
{{ tag }}
{% for tool, tooldata in report|dictsort %}
-
+ {% if "test-na" in tooldata["tags"][tag]["status"] %}
+ data-order=" "
+ {% endif %}>
{% if "test-na" not in tooldata["tags"][tag]["status"] %}
{{ tooldata["tags"][tag]["passed-num"] }}/{{ tooldata["tags"][tag]["logs"]|length }}
{% endif %}
diff --git a/conf/report/report.css b/conf/report/report.css
index 0786186b231c3..2398acb26e976 100644
--- a/conf/report/report.css
+++ b/conf/report/report.css
@@ -22,6 +22,14 @@ body {
height: 150px;
}
+.advanced_filter {
+ padding-top: 20px;
+}
+
+section > ul.filter-entries {
+ list-style-type: none;
+}
+
.report_table_info, .col_header1 {
position: sticky;
left: 0;