Commit 7bc2cbf
committed
travis: Parallelize tests on Android
Currently our slowest test suite on android, run-pass, takes over 5 times longer
than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed
add overhead, but not 5x for this kind of workload. One of the slowest parts of
the Android process is that *compilation* happens serially. Tests themselves
need to run single-threaded on the emulator (due to how the test harness works)
and this forces the compiles themselves to be single threaded.
Now Travis gives us more than one core per machine, so it'd be much better if we
could take advantage of them! The emulator itself is still fundamentally
single-threaded, but we should see a nice speedup by sending binaries for it to
run much more quickly.
It turns out that we've already got all the tools to do this in-tree. The
qemu-test-{server,client} that are in use for the ARM Linux testing are a
perfect match for the Android emulator. This commit migrates the custom adb
management code in compiletest/rustbuild to the same qemu-test-{server,client}
implementation that ARM Linux uses.
This allows us to lift the parallelism restriction on the compiletest test
suites, namely run-pass. Consequently although we'll still basically run the
tests themselves in single threaded mode we'll be able to compile all of them in
parallel, keeping the pipeline much more full and using more cores for the work
at hand. Additionally the architecture here should be a bit speedier as it
should have less overhead than adb which is a whole new process on both the host
and the emulator!
Locally on an 8 core machine I've seen the run-pass test suite speed up from
taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a
drastic speedup on Travis but I'm hoping this change can place the Android tests
well below 2 hours instead of just above 2 hours.
Because the client/server here are now repurposed for more than just QEMU,
they've been renamed to `remote-test-{server,client}`.
Note that this PR does not currently modify how debuginfo tests are executed on
Android. While parallelizable it wouldn't be quite as easy, so that's left to
another day. Thankfully that test suite is much smaller than the run-pass test
suite.
As a final fix I discovered that the ARM and Android test suites were actually
running all library unit tests (e.g. stdtest, coretest, etc) twice. I've
corrected that to only run tests once which should also give a nice boost in
overall cycle time here.1 parent 70baf4f commit 7bc2cbf
File tree
14 files changed
+243
-467
lines changed- src
- bootstrap
- etc
- test/run-pass
- tools
- compiletest/src
- remote-test-client
- src
- remote-test-server
- src
14 files changed
+243
-467
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
| 246 | + | |
| 247 | + | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
450 | | - | |
| 448 | + | |
451 | 449 | | |
452 | 450 | | |
453 | 451 | | |
| |||
459 | 457 | | |
460 | 458 | | |
461 | 459 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 460 | + | |
466 | 461 | | |
467 | 462 | | |
468 | | - | |
| 463 | + | |
469 | 464 | | |
470 | | - | |
| 465 | + | |
471 | 466 | | |
472 | 467 | | |
473 | 468 | | |
474 | 469 | | |
475 | 470 | | |
476 | 471 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | 472 | | |
525 | 473 | | |
526 | 474 | | |
527 | 475 | | |
528 | 476 | | |
529 | 477 | | |
530 | | - | |
531 | 478 | | |
532 | 479 | | |
533 | 480 | | |
| |||
543 | 490 | | |
544 | 491 | | |
545 | 492 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
550 | 497 | | |
551 | 498 | | |
552 | | - | |
553 | 499 | | |
554 | 500 | | |
555 | 501 | | |
556 | | - | |
| 502 | + | |
557 | 503 | | |
558 | 504 | | |
559 | 505 | | |
| |||
566 | 512 | | |
567 | 513 | | |
568 | 514 | | |
569 | | - | |
570 | 515 | | |
571 | 516 | | |
572 | 517 | | |
| |||
585 | 530 | | |
586 | 531 | | |
587 | 532 | | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 533 | + | |
| 534 | + | |
618 | 535 | | |
619 | | - | |
620 | 536 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 537 | + | |
627 | 538 | | |
628 | 539 | | |
629 | | - | |
630 | 540 | | |
631 | | - | |
632 | | - | |
| 541 | + | |
633 | 542 | | |
634 | 543 | | |
635 | 544 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
641 | 555 | | |
642 | 556 | | |
643 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
948 | 954 | | |
949 | 955 | | |
950 | 956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | | - | |
| 523 | + | |
| 524 | + | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
573 | | - | |
| 572 | + | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
98 | 109 | | |
99 | 110 | | |
100 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
| 188 | + | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments