1 .. _autogen_methodology:
6 CSIT uses robot suite files to define tests.
7 However, not all suite files available for Jenkins jobs
8 (or manually started bootstrap scripts) are present in CSIT git repository.
9 They are generated only when needed.
14 There is a code generation layer implemented as Python library called "autogen",
15 called by various bash scripts.
17 It generates the full extent of CSIT suites, using the ones in git as templates.
22 The generated suites (and their contents) are affected by multiple information
23 sources, listed below.
28 The suites present in git repository act as templates for generating suites.
29 One of autogen design principles is that any template suite should also act
30 as a full suite (no placeholders).
32 In practice, autogen always re-creates the template suite with exactly
33 the same content, it is one of checks that autogen works correctly.
38 Not all suites present in CSIT git repository act as template for autogen.
39 The distinction is on per-directory level. Directories with
40 regenerate_testcases.py script usually consider all suites as templates
41 (unless possibly not included by the glob patten in the script).
43 The script also specifies minimal frame size, indirectly, by specifying protocol
44 (protocol "ip4" is the default, leading to 64B frame size).
49 Values in Constants.py are taken into consideration when generating suites.
50 The values are mostly related to different NIC models and NIC drivers.
55 Python code in resources/libraries/python/autogen contains several other
61 The test case part of template suite is ignored, test case lines
62 are created according to text templates in Testcase.py file.
64 Testcase Argument Lists
65 _______________________
67 Each testcase template has different number of "arguments", e.g. values
68 to put into various placeholders. Different test types need different
69 lists of the argument values, the lists are in regenerate_glob method
70 in Regenerator.py file.
75 Python code detects the test type (usually by substrings of suite file name),
76 then iterates over different quantities based on type.
77 For example, only ndrpdr suite templates generate other types (mrr and soak).
82 Some combinations of values are known not to work, so they are excluded.
83 Examples: Density tests for too much CPUs; IMIX for ASTF.
88 Some information sources are available in CSIT repository,
89 but do not affect the suites generated by autogen.
94 Overall, no information visible in topology yaml files is taken into account
100 Historically, suite files are agnostic to testbed architecture, e.g. ICX or ALT.
105 Historically, 2-node and 3-node suites have diferent names, and while
106 most of the code is common, the differences are not always simple enough.
107 Autogen treat 2-node and 3-node suites as independent templates.
109 TRex suites are intended for a 1-node circuit of otherwise 2-node or 3-node
110 testbeds, so they support all 3 robot tags.
111 They are also detected and treated differently by autogen,
112 mainly because they need different testcase arguments (no CPU count).
113 Autogen does nothing specifically related to the fact they should run
114 only in testbeds/NICs with TG-TG line available.
119 Some bonding tests need two (parallel) links between DUTs.
120 Autogen does not care, as suites are agnostic.
121 Robot tag marks the difference, but the link presence is not explicitly checked.
126 Information in job spec files depend on generated suites (not the other way).
127 Autogen should generate more suites, as job spec is limited by time budget.
128 More suites should be available for manually triggered verify jobs,
129 so autogen covers that.
134 Historically, bootstrap scripts perform some logic,
135 perhaps adding exclusion options to Robot invocation
136 (e.g. skipping testbed+NIC combinations for tests that need parallel links).
138 Once again, the logic here relies on what autogen generates,
139 autogen does not look into bootstrap scripts.