Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 2c31155

Browse files
loysollivierMiloCasagrande
authored andcommitted
Test view by board-job test count update
In test view by board-job change the test results column. It was previously the value of the latest test only. Update it to the count of all tests results. Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
1 parent 1c08752 commit 2c31155

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

app/dashboard/static/js/app/view-tests-board-job.2017.7.2.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ require([
106106
var results;
107107

108108
function _parseOperationsResult(result) {
109-
gTableCount[result.operation_id] =
110-
parseInt(result.result[0].count, 10);
109+
if (gTableCount[result.operation_id]) {
110+
gTableCount[result.operation_id] +=
111+
parseInt(result.result[0].count, 10);
112+
} else {
113+
gTableCount[result.operation_id] =
114+
parseInt(result.result[0].count, 10);
115+
}
111116
}
112117

113118
function _updateTable(opId) {
@@ -186,15 +191,10 @@ require([
186191
}
187192

188193
function _getTestSuiteDone(resultz) {
189-
results = resultz.result;
190-
191-
if (results.length > 0) {
194+
if (resultz.result) {
192195
batchOps = [];
193-
// Only one result, latest test suite
194-
_createOp(results[0]);
195-
deferred = request.post(
196-
'/_ajax/batch', JSON.stringify({batch: batchOps}));
197-
196+
resultz.result.forEach(_createOp);
197+
deferred = request.post('/_ajax/batch', JSON.stringify({batch: batchOps}));
198198
$.when(deferred)
199199
.fail(error.error, getSuitesCountFail)
200200
.done(getSuitesCountDone);
@@ -211,7 +211,7 @@ require([
211211
vcs_commit: result.vcs_commit,
212212
sort: 'created_on',
213213
sort_order: '-1',
214-
limit: '1'
214+
field: ['test_case', 'kernel']
215215
};
216216

217217
// Get the latest test suite

0 commit comments

Comments
 (0)