Commit cf52c7f
authored
Combine all tests into a single suite to increase parallelism. NFC (#26365)
My motivation for this change is to allow for increased parallelism that
is not limited to how
many tests are in a give module. I'm hoping to do more splitting up of
test_other.py, for
example, and I don't want to loose parallism.
After this change all tests are combined into a single parallel test
suite. For example:
```
$ ./test/runner jslib other.test_a* core0.test_a* --skip-slow
Test suites: ['test_core', 'test_jslib', 'test_other']
Running test_core: (88 tests)
Using 88 parallel test processes
[88/88] test_asan_vector (test_core.core0.test_asan_vector) ... ok
----------------------------------------------------------------------
Ran 88 tests in 3.296s
OK (skipped=5)
Running test_jslib: (54 tests)
Using 54 parallel test processes
[54/54] test_jslib_aliases_closure_wasm64 (test_jslib.jslib.test_jslib_aliases_closure_wasm64) ... ok
----------------------------------------------------------------------
Ran 54 tests in 5.287s
OK
Running test_other: (41 tests)
Using 41 parallel test processes
[41/41] test_abspaths (test_other.other.test_abspaths) ... ok
----------------------------------------------------------------------
Ran 41 tests in 5.210s
OK
Total core time: 228.881s. Wallclock time: 13.795s. Parallelization: 16.59x.
====================
TEST SUMMARY
test_core: 88 run, 0 errors, 0 failures, 5 skipped
test_jslib: 54 run, 0 errors, 0 failures, 0 skipped
test_other: 41 run, 0 errors, 0 failures, 0 skipped
```
After:
```
$ ./test/runner jslib other.test_a* core0.test_a* --skip-slow
Running 183 tests
Using 128 parallel test processes
[183/183] test_abspaths (test_other.other.test_abspaths) ... ok
----------------------------------------------------------------------
Ran 183 tests in 7.459s
OK (skipped=5)
Total core time: 301.490s. Wallclock time: 7.459s. Parallelization: 40.42x.
```
Note the wall clock time is less since we ran all the tests in parallel.
If you try to mix parallel and non-parallel test module you now get an
error. e.g.:
```
$ ./test/runner core0 benchmark
runner: error: attempt to mix parallel and non-parallel test modules
```1 parent cfb4642 commit cf52c7f
3 files changed
Lines changed: 45 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
1100 | 1102 | | |
1101 | | - | |
1102 | | - | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1103 | 1106 | | |
1104 | 1107 | | |
1105 | 1108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
372 | 388 | | |
373 | 389 | | |
374 | 390 | | |
375 | 391 | | |
376 | 392 | | |
377 | | - | |
| 393 | + | |
| 394 | + | |
378 | 395 | | |
379 | 396 | | |
380 | 397 | | |
| |||
394 | 411 | | |
395 | 412 | | |
396 | 413 | | |
397 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
398 | 423 | | |
399 | 424 | | |
400 | 425 | | |
| |||
407 | 432 | | |
408 | 433 | | |
409 | 434 | | |
410 | | - | |
411 | 435 | | |
412 | 436 | | |
413 | | - | |
| 437 | + | |
414 | 438 | | |
415 | 439 | | |
416 | 440 | | |
| |||
420 | 444 | | |
421 | 445 | | |
422 | 446 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 447 | + | |
439 | 448 | | |
440 | | - | |
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
| |||
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
459 | | - | |
460 | 467 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | 468 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
480 | 476 | | |
481 | 477 | | |
482 | 478 | | |
| |||
746 | 742 | | |
747 | 743 | | |
748 | 744 | | |
749 | | - | |
| 745 | + | |
750 | 746 | | |
751 | 747 | | |
752 | 748 | | |
753 | 749 | | |
754 | | - | |
| 750 | + | |
755 | 751 | | |
756 | 752 | | |
757 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
| |||
0 commit comments