Builds a tree structure of graph objects that corresponds to the suite configuration. - GraphConfig: - Can have arbitrary children - can be used to store properties used by its children - VariantConfig - Has variants of the same (any) type as children For all other configs see
(suite, parent, arch)
| 657 | |
| 658 | |
| 659 | def BuildGraphConfigs(suite, parent, arch): |
| 660 | """Builds a tree structure of graph objects that corresponds to the suite |
| 661 | configuration. |
| 662 | |
| 663 | - GraphConfig: |
| 664 | - Can have arbitrary children |
| 665 | - can be used to store properties used by its children |
| 666 | |
| 667 | - VariantConfig |
| 668 | - Has variants of the same (any) type as children |
| 669 | |
| 670 | For all other configs see the override AppendChild methods. |
| 671 | |
| 672 | Example 1: |
| 673 | - GraphConfig |
| 674 | - RunnableLeafTraceConfig (no children) |
| 675 | - ... |
| 676 | |
| 677 | Example 2: |
| 678 | - RunnableConfig |
| 679 | - LeafTraceConfig (no children) |
| 680 | - ... |
| 681 | |
| 682 | Example 3: |
| 683 | - RunnableConfig |
| 684 | - LeafTraceConfig (optional) |
| 685 | - TraceConfig |
| 686 | - LeafTraceConfig (no children) |
| 687 | - ... |
| 688 | - TraceConfig (optional) |
| 689 | - ... |
| 690 | - ... |
| 691 | |
| 692 | Example 4: |
| 693 | - VariantConfig |
| 694 | - RunnableConfig |
| 695 | - ... |
| 696 | - RunnableConfig |
| 697 | - ... |
| 698 | """ |
| 699 | # TODO(machenbach): Implement notion of cpu type? |
| 700 | if arch not in suite.get('archs', SUPPORTED_ARCHS): |
| 701 | return None |
| 702 | |
| 703 | variants = suite.get('variants', []) |
| 704 | if len(variants) == 0: |
| 705 | graph = MakeGraphConfig(suite, parent, arch) |
| 706 | for subsuite in suite.get('tests', []): |
| 707 | BuildGraphConfigs(subsuite, graph, arch) |
| 708 | else: |
| 709 | graph = VariantConfig(suite, parent, arch) |
| 710 | variant_class = GetGraphConfigClass(suite, parent) |
| 711 | for variant_suite in variants: |
| 712 | # Propagate down the results_regexp and default if they are not |
| 713 | # overridden in the variant. |
| 714 | variant_suite.setdefault('results_regexp', |
| 715 | suite.get('results_regexp', None)) |
| 716 | variant_suite.setdefault('results_default', |
no test coverage detected
searching dependent graphs…