Commit 0e70c18
test_runner: support combining coverage reports
This commit adds support for combining code coverage reports
in the test runner. This allows coverage to be collected for
child processes, and by extension, the test runner CLI.
PR-URL: #47686
Fixes: #47669
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 464ddf9 commit 0e70c18Copy full SHA for 0e70c18
File tree
Expand file treeCollapse file tree
9 files changed
+293
-55
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal/test_runner
- src
- test
- fixtures/v8-coverage/combined_coverage
- parallel
Expand file treeCollapse file tree
9 files changed
+293
-55
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
624 | 624 | |
625 | 625 | |
626 | 626 | |
| 627 | + |
| 628 | + |
| 629 | + |
| 630 | + |
627 | 631 | |
628 | 632 | |
629 | 633 | |
|
Collapse file
-4Lines changed: 0 additions & 4 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
428 | 428 | |
429 | 429 | |
430 | 430 | |
431 | | - |
432 | | - |
433 | | - |
434 | | - |
435 | 431 | |
436 | 432 | |
437 | 433 | |
|
Collapse file
lib/internal/test_runner/coverage.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/coverage.js+142-14Lines changed: 142 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
| 3 | + |
3 | 4 | |
4 | 5 | |
5 | 6 | |
6 | 7 | |
7 | 8 | |
8 | | - |
9 | 9 | |
10 | 10 | |
| 11 | + |
| 12 | + |
11 | 13 | |
12 | 14 | |
13 | 15 | |
| ||
23 | 25 | |
24 | 26 | |
25 | 27 | |
26 | | - |
27 | | - |
28 | | - |
| 28 | + |
29 | 29 | |
30 | 30 | |
31 | 31 | |
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | 98 | |
106 | 99 | |
107 | 100 | |
| ||
345 | 338 | |
346 | 339 | |
347 | 340 | |
348 | | - |
349 | | - |
| 341 | + |
350 | 342 | |
351 | 343 | |
352 | 344 | |
| ||
359 | 351 | |
360 | 352 | |
361 | 353 | |
362 | | - |
| 354 | + |
| 355 | + |
363 | 356 | |
| 357 | + |
| 358 | + |
364 | 359 | |
365 | 360 | |
366 | 361 | |
367 | 362 | |
368 | 363 | |
369 | 364 | |
370 | 365 | |
| 366 | + |
| 367 | + |
| 368 | + |
| 369 | + |
| 370 | + |
| 371 | + |
| 372 | + |
| 373 | + |
| 374 | + |
| 375 | + |
| 376 | + |
| 377 | + |
| 378 | + |
| 379 | + |
| 380 | + |
| 381 | + |
| 382 | + |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | + |
| 396 | + |
| 397 | + |
| 398 | + |
| 399 | + |
| 400 | + |
| 401 | + |
| 402 | + |
| 403 | + |
| 404 | + |
| 405 | + |
| 406 | + |
| 407 | + |
| 408 | + |
| 409 | + |
| 410 | + |
| 411 | + |
| 412 | + |
| 413 | + |
| 414 | + |
| 415 | + |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
| 431 | + |
| 432 | + |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
| 440 | + |
| 441 | + |
| 442 | + |
| 443 | + |
| 444 | + |
| 445 | + |
| 446 | + |
| 447 | + |
| 448 | + |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + |
| 456 | + |
| 457 | + |
| 458 | + |
| 459 | + |
| 460 | + |
| 461 | + |
| 462 | + |
| 463 | + |
| 464 | + |
| 465 | + |
| 466 | + |
| 467 | + |
| 468 | + |
| 469 | + |
| 470 | + |
| 471 | + |
| 472 | + |
| 473 | + |
| 474 | + |
| 475 | + |
| 476 | + |
| 477 | + |
| 478 | + |
| 479 | + |
| 480 | + |
| 481 | + |
| 482 | + |
| 483 | + |
| 484 | + |
| 485 | + |
| 486 | + |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
371 | 499 | |
Collapse file
-7Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
141 | 141 | |
142 | 142 | |
143 | 143 | |
144 | | - |
145 | | - |
146 | | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | 144 | |
152 | 145 | |
153 | 146 | |
|
Collapse file
test/fixtures/v8-coverage/combined_coverage/common.js
Copy file name to clipboard+69Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
Collapse file
test/fixtures/v8-coverage/combined_coverage/first.test.js
Copy file name to clipboard+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
Collapse file
test/fixtures/v8-coverage/combined_coverage/second.test.js
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
Collapse file
test/fixtures/v8-coverage/combined_coverage/third.test.js
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
0 commit comments