Log test number and id in reftests

The new output looks like
```
Harness thinks this browser is firefox
Fetching manifest "/test/test_manifest.json"... done
[1/1152] bug1755201:
  Skipping file "pdfs/bug1755201.pdf"
[2/1152] issue14864:
  Skipping file "pdfs/issue14864.pdf"
[3/1152] issue18503:
  Skipping file "pdfs/issue18503.pdf"
[4/1152] issue19835:
  Skipping file "pdfs/issue19835.pdf"
[5/1152] filled-background-range:
  Loading file "pdfs/filled-background.pdf"
    Loading page 1/3... Snapshotting... done
    Loading page 2/3... Snapshotting... done
    Loading page 3/3... Snapshotting... done
[6/1152] tracemonkey-eq:
  Loading file "pdfs/tracemonkey.pdf"
    Loading page 1/14... Snapshotting... done
    Loading page 2/14... Snapshotting... done
```

This gives an idea of how many tests are left while they are running
This commit is contained in:
Nicolò Ribaudo 2025-06-09 18:45:33 +02:00
parent 250cc7d299
commit f789c132da
No known key found for this signature in database
GPG Key ID: AAFDA9101C58F338

View File

@ -604,6 +604,10 @@ class Driver {
md5FileMap.set(task.md5, task.file); md5FileMap.set(task.md5, task.file);
} }
this._log(
`[${this.currentTask + 1}/${this.manifest.length}] ${task.id}:\n`
);
// Support *linked* test-cases for the other suites, e.g. unit- and // Support *linked* test-cases for the other suites, e.g. unit- and
// integration-tests, without needing to run them as reference-tests. // integration-tests, without needing to run them as reference-tests.
if (task.type === "other") { if (task.type === "other") {
@ -618,7 +622,7 @@ class Driver {
return; return;
} }
this._log('Loading file "' + task.file + '"\n'); this._log(` Loading file "${task.file}"\n`);
try { try {
let xfaStyleElement = null; let xfaStyleElement = null;
@ -849,7 +853,7 @@ class Driver {
if (task.pageNum > this._getLastPageNumber(task)) { if (task.pageNum > this._getLastPageNumber(task)) {
if (++task.round < task.rounds) { if (++task.round < task.rounds) {
this._log(" Round " + (1 + task.round) + "\n"); this._log(` Round ${1 + task.round}\n`);
task.pageNum = task.firstPage || 1; task.pageNum = task.firstPage || 1;
} else { } else {
this.currentTask++; this.currentTask++;
@ -860,7 +864,7 @@ class Driver {
if (task.skipPages?.includes(task.pageNum)) { if (task.skipPages?.includes(task.pageNum)) {
this._log( this._log(
" Skipping page " + task.pageNum + "/" + task.pdfDoc.numPages + "...\n" ` Skipping page ${task.pageNum}/${task.pdfDoc.numPages}...\n`
); );
task.pageNum++; task.pageNum++;
this._nextPage(task); this._nextPage(task);
@ -870,7 +874,7 @@ class Driver {
if (!failure) { if (!failure) {
try { try {
this._log( this._log(
" Loading page " + task.pageNum + "/" + task.pdfDoc.numPages + "... " ` Loading page ${task.pageNum}/${task.pdfDoc.numPages}... `
); );
ctx = this.canvas.getContext("2d", { alpha: false }); ctx = this.canvas.getContext("2d", { alpha: false });
task.pdfDoc.getPage(task.pageNum).then( task.pdfDoc.getPage(task.pageNum).then(