Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: infra/bots/recipes/swarm_test.py

Issue 2352653002: GN: remove old Android recipe code. (Closed)
Patch Set: missing json Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 # Recipe module for Skia Swarming test. 6 # Recipe module for Skia Swarming test.
7 7
8 8
9 DEPS = [ 9 DEPS = [
10 'build/file', 10 'build/file',
11 'core', 11 'core',
12 'recipe_engine/json', 12 'recipe_engine/json',
13 'recipe_engine/path', 13 'recipe_engine/path',
14 'recipe_engine/platform', 14 'recipe_engine/platform',
15 'recipe_engine/properties', 15 'recipe_engine/properties',
16 'recipe_engine/python', 16 'recipe_engine/python',
17 'recipe_engine/raw_io', 17 'recipe_engine/raw_io',
18 'flavor', 18 'flavor',
19 'run', 19 'run',
20 'vars', 20 'vars',
21 ] 21 ]
22 22
23 23
24 TEST_BUILDERS = { 24 TEST_BUILDERS = {
25 'client.skia': { 25 'client.skia': {
26 'skiabot-linux-swarm-000': [ 26 'skiabot-linux-swarm-000': [
27 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android', 27 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
28 'Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release', 28 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
29 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug', 29 'Test-Android-Clang-GalaxyS3-GPU-Mali400-arm-Debug-GN_Android',
30 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug', 30 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
31 'Test-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Release', 31 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
32 'Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug', 32 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
33 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug', 33 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
34 'Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug', 34 'Test-Android-Clang-Nexus9-CPU-Denver-arm64-Debug-GN_Android',
35 'Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Release', 35 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
36 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug', 36 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
37 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug', 37 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
38 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', 38 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
39 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot', 39 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot',
40 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug', 40 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
41 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug', 41 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
42 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN', 42 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
43 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN', 43 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
44 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared', 44 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
45 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN', 45 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 api.core.setup() 502 api.core.setup()
503 try: 503 try:
504 api.flavor.install() 504 api.flavor.install()
505 test_steps(api) 505 test_steps(api)
506 finally: 506 finally:
507 api.flavor.cleanup_steps() 507 api.flavor.cleanup_steps()
508 api.run.check_failure() 508 api.run.check_failure()
509 509
510 510
511 def GenTests(api): 511 def GenTests(api):
512 def AndroidTestData(builder, adb=None):
513 test_data = (
514 api.step_data(
515 'get EXTERNAL_STORAGE dir',
516 stdout=api.raw_io.output('/storage/emulated/legacy')) +
517 api.step_data(
518 'read SKP_VERSION',
519 stdout=api.raw_io.output('42')) +
520 api.step_data(
521 'read SK_IMAGE_VERSION',
522 stdout=api.raw_io.output('42')) +
523 api.step_data(
524 'read SVG_VERSION',
525 stdout=api.raw_io.output('42')) +
526 api.step_data(
527 'exists skia_dm',
528 stdout=api.raw_io.output(''))
529 )
530 if 'GalaxyS3' not in builder:
531 test_data += api.step_data(
532 'adb root',
533 stdout=api.raw_io.output('restarting adbd as root'))
534 if adb:
535 test_data += api.step_data(
536 'which adb',
537 stdout=api.raw_io.output(adb))
538 else:
539 test_data += api.step_data(
540 'which adb',
541 retcode=1)
542
543 return test_data
544
545 for mastername, slaves in TEST_BUILDERS.iteritems(): 512 for mastername, slaves in TEST_BUILDERS.iteritems():
546 for slavename, builders_by_slave in slaves.iteritems(): 513 for slavename, builders_by_slave in slaves.iteritems():
547 for builder in builders_by_slave: 514 for builder in builders_by_slave:
548 test = ( 515 test = (
549 api.test(builder) + 516 api.test(builder) +
550 api.properties(buildername=builder, 517 api.properties(buildername=builder,
551 mastername=mastername, 518 mastername=mastername,
552 slavename=slavename, 519 slavename=slavename,
553 buildnumber=5, 520 buildnumber=5,
554 revision='abc123', 521 revision='abc123',
555 path_config='kitchen', 522 path_config='kitchen',
556 swarm_out_dir='[SWARM_OUT_DIR]') + 523 swarm_out_dir='[SWARM_OUT_DIR]') +
557 api.path.exists( 524 api.path.exists(
558 api.path['slave_build'].join('skia'), 525 api.path['slave_build'].join('skia'),
559 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 526 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
560 'skimage', 'VERSION'), 527 'skimage', 'VERSION'),
561 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 528 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
562 'skp', 'VERSION'), 529 'skp', 'VERSION'),
563 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 530 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
564 'svg', 'VERSION'), 531 'svg', 'VERSION'),
565 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 532 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
566 ) 533 )
567 ) 534 )
568 if ('Android' in builder and
569 ('Test' in builder or 'Perf' in builder) and
570 not 'GN' in builder and
571 not 'Appurify' in builder):
572 test += AndroidTestData(builder)
573 if 'Trybot' in builder: 535 if 'Trybot' in builder:
574 test += api.properties(issue=500, 536 test += api.properties(issue=500,
575 patchset=1, 537 patchset=1,
576 rietveld='https://codereview.chromium.org') 538 rietveld='https://codereview.chromium.org')
577 if 'Win' in builder: 539 if 'Win' in builder:
578 test += api.platform('win', 64) 540 test += api.platform('win', 64)
579 541
580 542
581 yield test 543 yield test
582 544
(...skipping 13 matching lines...) Expand all
596 'skimage', 'VERSION'), 558 'skimage', 'VERSION'),
597 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 559 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
598 'skp', 'VERSION'), 560 'skp', 'VERSION'),
599 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 561 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
600 'svg', 'VERSION'), 562 'svg', 'VERSION'),
601 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 563 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
602 ) + 564 ) +
603 api.step_data('dm', retcode=1) 565 api.step_data('dm', retcode=1)
604 ) 566 )
605 567
606 builder = 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug' 568 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
607 yield ( 569 yield (
608 api.test('failed_get_hashes') + 570 api.test('failed_get_hashes') +
609 api.properties(buildername=builder, 571 api.properties(buildername=builder,
610 mastername='client.skia', 572 mastername='client.skia',
611 slavename='skiabot-linux-swarm-000', 573 slavename='skiabot-linux-swarm-000',
612 buildnumber=6, 574 buildnumber=6,
613 revision='abc123', 575 revision='abc123',
614 path_config='kitchen', 576 path_config='kitchen',
615 swarm_out_dir='[SWARM_OUT_DIR]') + 577 swarm_out_dir='[SWARM_OUT_DIR]') +
616 api.path.exists( 578 api.path.exists(
617 api.path['slave_build'].join('skia'), 579 api.path['slave_build'].join('skia'),
618 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 580 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
619 'skimage', 'VERSION'), 581 'skimage', 'VERSION'),
620 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 582 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
621 'skp', 'VERSION'), 583 'skp', 'VERSION'),
622 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 584 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
623 'svg', 'VERSION'), 585 'svg', 'VERSION'),
624 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 586 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
625 ) + 587 ) +
626 AndroidTestData(builder) +
627 api.step_data('read SKP_VERSION',
628 stdout=api.raw_io.output('42')) +
629 api.step_data('read SK_IMAGE_VERSION',
630 stdout=api.raw_io.output('42')) +
631 api.step_data('read SVG_VERSION',
632 stdout=api.raw_io.output('42')) +
633 api.step_data('get uninteresting hashes', retcode=1) 588 api.step_data('get uninteresting hashes', retcode=1)
634 ) 589 )
635 590
636 yield ( 591 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
637 api.test('download_and_push_skps') +
638 api.properties(buildername=builder,
639 mastername='client.skia',
640 slavename='skiabot-linux-swarm-000',
641 buildnumber=6,
642 revision='abc123',
643 path_config='kitchen',
644 swarm_out_dir='[SWARM_OUT_DIR]') +
645 api.path.exists(
646 api.path['slave_build'].join('skia'),
647 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
648 'skimage', 'VERSION'),
649 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
650 'skp', 'VERSION'),
651 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
652 'svg', 'VERSION'),
653 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
654 ) +
655 AndroidTestData(builder) +
656 api.step_data('read SKP_VERSION',
657 stdout=api.raw_io.output('2')) +
658 api.step_data('read SK_IMAGE_VERSION',
659 stdout=api.raw_io.output('42')) +
660 api.step_data('read SVG_VERSION',
661 stdout=api.raw_io.output('42')) +
662 api.step_data(
663 'exists skps',
664 stdout=api.raw_io.output(''))
665 )
666
667 yield ( 592 yield (
668 api.test('missing_SKP_VERSION_device') + 593 api.test('missing_SKP_VERSION_device') +
669 api.properties(buildername=builder, 594 api.properties(buildername=builder,
670 mastername='client.skia', 595 mastername='client.skia',
671 slavename='skiabot-linux-swarm-000', 596 slavename='skiabot-linux-swarm-000',
672 buildnumber=6, 597 buildnumber=6,
673 revision='abc123', 598 revision='abc123',
674 path_config='kitchen', 599 path_config='kitchen',
675 swarm_out_dir='[SWARM_OUT_DIR]') + 600 swarm_out_dir='[SWARM_OUT_DIR]') +
676 api.path.exists( 601 api.path.exists(
677 api.path['slave_build'].join('skia'), 602 api.path['slave_build'].join('skia'),
678 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 603 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
679 'skimage', 'VERSION'), 604 'skimage', 'VERSION'),
680 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 605 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
681 'skp', 'VERSION'), 606 'skp', 'VERSION'),
682 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 607 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
683 'svg', 'VERSION'), 608 'svg', 'VERSION'),
684 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 609 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
685 ) + 610 ) +
686 AndroidTestData(builder) + 611 api.step_data('read SKP_VERSION', retcode=1)
687 api.step_data('read SKP_VERSION',
688 retcode=1) +
689 api.step_data('read SK_IMAGE_VERSION',
690 stdout=api.raw_io.output('42')) +
691 api.step_data('read SVG_VERSION',
692 stdout=api.raw_io.output('42')) +
693 api.step_data(
694 'exists skps',
695 stdout=api.raw_io.output(''))
696 )
697
698 yield (
699 api.test('download_and_push_skimage') +
700 api.properties(buildername=builder,
701 mastername='client.skia',
702 slavename='skiabot-linux-swarm-000',
703 buildnumber=6,
704 revision='abc123',
705 path_config='kitchen',
706 swarm_out_dir='[SWARM_OUT_DIR]') +
707 api.path.exists(
708 api.path['slave_build'].join('skia'),
709 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
710 'skimage', 'VERSION'),
711 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
712 'skp', 'VERSION'),
713 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
714 'svg', 'VERSION'),
715 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
716 ) +
717 AndroidTestData(builder) +
718 api.step_data('read SKP_VERSION',
719 stdout=api.raw_io.output('42')) +
720 api.step_data('read SK_IMAGE_VERSION',
721 stdout=api.raw_io.output('2')) +
722 api.step_data('read SVG_VERSION',
723 stdout=api.raw_io.output('42')) +
724 api.step_data(
725 'exists skia_images',
726 stdout=api.raw_io.output(''))
727 )
728
729 yield (
730 api.test('missing_SK_IMAGE_VERSION_device') +
731 api.properties(buildername=builder,
732 mastername='client.skia',
733 slavename='skiabot-linux-swarm-000',
734 buildnumber=6,
735 revision='abc123',
736 path_config='kitchen',
737 swarm_out_dir='[SWARM_OUT_DIR]') +
738 api.path.exists(
739 api.path['slave_build'].join('skia'),
740 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
741 'skimage', 'VERSION'),
742 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
743 'skp', 'VERSION'),
744 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
745 'svg', 'VERSION'),
746 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
747 ) +
748 AndroidTestData(builder) +
749 api.step_data('read SKP_VERSION',
750 stdout=api.raw_io.output('42')) +
751 api.step_data('read SK_IMAGE_VERSION',
752 retcode=1) +
753 api.step_data('read SVG_VERSION',
754 stdout=api.raw_io.output('42')) +
755 api.step_data(
756 'exists skia_images',
757 stdout=api.raw_io.output(''))
758 )
759
760 yield (
761 api.test('download_and_push_svgs') +
762 api.properties(buildername=builder,
763 mastername='client.skia',
764 slavename='skiabot-linux-swarm-000',
765 buildnumber=6,
766 revision='abc123',
767 path_config='kitchen',
768 swarm_out_dir='[SWARM_OUT_DIR]') +
769 api.path.exists(
770 api.path['slave_build'].join('skia'),
771 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
772 'skimage', 'VERSION'),
773 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
774 'skp', 'VERSION'),
775 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
776 'svg', 'VERSION'),
777 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
778 ) +
779 AndroidTestData(builder) +
780 api.step_data('read SKP_VERSION',
781 stdout=api.raw_io.output('42')) +
782 api.step_data('read SK_IMAGE_VERSION',
783 stdout=api.raw_io.output('42')) +
784 api.step_data('read SVG_VERSION',
785 stdout=api.raw_io.output('2')) +
786 api.step_data(
787 'exists svgs',
788 stdout=api.raw_io.output(''))
789 )
790
791 yield (
792 api.test('missing_SVG_VERSION_device') +
793 api.properties(buildername=builder,
794 mastername='client.skia',
795 slavename='skiabot-linux-swarm-000',
796 buildnumber=6,
797 revision='abc123',
798 path_config='kitchen',
799 swarm_out_dir='[SWARM_OUT_DIR]') +
800 api.path.exists(
801 api.path['slave_build'].join('skia'),
802 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
803 'skimage', 'VERSION'),
804 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
805 'skp', 'VERSION'),
806 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
807 'svg', 'VERSION'),
808 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
809 ) +
810 AndroidTestData(builder) +
811 api.step_data('read SKP_VERSION',
812 stdout=api.raw_io.output('42')) +
813 api.step_data('read SK_IMAGE_VERSION',
814 stdout=api.raw_io.output('42')) +
815 api.step_data('read SVG_VERSION',
816 retcode=1) +
817 api.step_data(
818 'exists svgs',
819 stdout=api.raw_io.output(''))
820 )
821
822 yield (
823 api.test('adb_in_path') +
824 api.properties(buildername=builder,
825 mastername='client.skia',
826 slavename='skiabot-linux-swarm-000',
827 buildnumber=6,
828 revision='abc123',
829 path_config='kitchen',
830 swarm_out_dir='[SWARM_OUT_DIR]') +
831 api.path.exists(
832 api.path['slave_build'].join('skia'),
833 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
834 'skimage', 'VERSION'),
835 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
836 'skp', 'VERSION'),
837 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
838 'svg', 'VERSION'),
839 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
840 ) +
841 AndroidTestData(builder, adb='/usr/bin/adb') +
842 api.step_data('read SKP_VERSION',
843 stdout=api.raw_io.output('42')) +
844 api.step_data('read SK_IMAGE_VERSION',
845 stdout=api.raw_io.output('42')) +
846 api.step_data('read SVG_VERSION',
847 stdout=api.raw_io.output('42'))
848 ) 612 )
849 613
850 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot' 614 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
851 yield ( 615 yield (
852 api.test('big_issue_number') + 616 api.test('big_issue_number') +
853 api.properties(buildername=builder, 617 api.properties(buildername=builder,
854 mastername='client.skia.compile', 618 mastername='client.skia.compile',
855 slavename='skiabot-linux-swarm-000', 619 slavename='skiabot-linux-swarm-000',
856 buildnumber=5, 620 buildnumber=5,
857 revision='abc123', 621 revision='abc123',
(...skipping 27 matching lines...) Expand all
885 api.properties( 649 api.properties(
886 buildername=builder, 650 buildername=builder,
887 mastername='client.skia', 651 mastername='client.skia',
888 slavename='skiabot-linux-swarm-000', 652 slavename='skiabot-linux-swarm-000',
889 buildnumber=5, 653 buildnumber=5,
890 path_config='kitchen', 654 path_config='kitchen',
891 swarm_out_dir='[SWARM_OUT_DIR]', 655 swarm_out_dir='[SWARM_OUT_DIR]',
892 revision='abc123', 656 revision='abc123',
893 **gerrit_kwargs) 657 **gerrit_kwargs)
894 ) 658 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698