Skip to content

Commit f789c13

Browse files
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
1 parent 250cc7d commit f789c13

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/driver.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,14 @@ class Driver {
604604
md5FileMap.set(task.md5, task.file);
605605
}
606606

607+
this._log(
608+
`[${this.currentTask + 1}/${this.manifest.length}] ${task.id}:\n`
609+
);
610+
607611
// Support *linked* test-cases for the other suites, e.g. unit- and
608612
// integration-tests, without needing to run them as reference-tests.
609613
if (task.type === "other") {
610-
this._log(`Skipping file "${task.file}"\n`);
614+
this._log(` Skipping file "${task.file}"\n`);
611615

612616
if (!task.link) {
613617
this._nextPage(task, 'Expected "other" test-case to be linked.');
@@ -618,7 +622,7 @@ class Driver {
618622
return;
619623
}
620624

621-
this._log('Loading file "' + task.file + '"\n');
625+
this._log(` Loading file "${task.file}"\n`);
622626

623627
try {
624628
let xfaStyleElement = null;
@@ -849,7 +853,7 @@ class Driver {
849853

850854
if (task.pageNum > this._getLastPageNumber(task)) {
851855
if (++task.round < task.rounds) {
852-
this._log(" Round " + (1 + task.round) + "\n");
856+
this._log(` Round ${1 + task.round}\n`);
853857
task.pageNum = task.firstPage || 1;
854858
} else {
855859
this.currentTask++;
@@ -860,7 +864,7 @@ class Driver {
860864

861865
if (task.skipPages?.includes(task.pageNum)) {
862866
this._log(
863-
" Skipping page " + task.pageNum + "/" + task.pdfDoc.numPages + "...\n"
867+
` Skipping page ${task.pageNum}/${task.pdfDoc.numPages}...\n`
864868
);
865869
task.pageNum++;
866870
this._nextPage(task);
@@ -870,7 +874,7 @@ class Driver {
870874
if (!failure) {
871875
try {
872876
this._log(
873-
" Loading page " + task.pageNum + "/" + task.pdfDoc.numPages + "... "
877+
` Loading page ${task.pageNum}/${task.pdfDoc.numPages}... `
874878
);
875879
ctx = this.canvas.getContext("2d", { alpha: false });
876880
task.pdfDoc.getPage(task.pageNum).then(

0 commit comments

Comments
 (0)