You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>To (re)generate <em>golden files</em>, append the <code>--generate</code> option: </p><divclass="fragment"><divclass="line">./mfc.sh test --generate -j 8</div>
144
144
</div><!-- fragment --><p>It is recommended that a range be specified when generating golden files for new test cases, as described in the previous section, in an effort not to regenerate the golden files of existing test cases.</p>
145
145
<p><b>Note:</b> If you output new variables and want to update the golden files to include these without modifying the original data, use the <code>--add-new-variables</code> option instead.</p>
146
-
<p>Adding a new test case can be done by modifying <ahref="https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/cases.py">cases.py</a>. The function <code>generate_cases</code> is responsible for generating the list of test cases. Loops and conditionals are used to vary parameters, whose defaults can be found in the <code>BASE_CFG</code> case object within <ahref="https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/case.py">case.py</a>. The function operates on two variables:</p>
146
+
<p>Adding a new test case can be done by modifying <ahref="https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/cases.py">cases.py</a>. The function <code>list_cases</code> is responsible for generating the list of test cases. Loops and conditionals are used to vary parameters, whose defaults can be found in the <code>BASE_CFG</code> case object within <ahref="https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/case.py">case.py</a>. The function operates on two variables:</p>
147
147
<ul>
148
148
<li><code>stack</code>: A stack that holds the variations to the default case parameters. By pushing and popping the stack inside loops and conditionals, it is easier to nest test case descriptions, as it holds the variations that are common to all future test cases within the same indentation level (in most scenarios).</li>
149
149
<li><code>cases</code>: A list that holds fully-formed <code>Case</code> objects, that will be returned at the end of the function.</li>
</div><!-- fragment --><p>When pushing to the stack, or creating a new case with the <code>create_case</code> function, you must specify:</p><ul>
177
+
</div><!-- fragment --><p>When pushing to the stack, or creating a new case with the <code>define_case_d</code> function, you must specify:</p><ul>
178
178
<li><code>stack</code>: The current stack.</li>
179
179
<li><code>trace</code>: A human-readable string describing what you are currently varying.</li>
180
180
<li><code>variations</code>: A Python dictionary with case parameter variations.</li>
181
181
<li>(Optional) <code>ppn</code>: The number of processes per node to use (default is 1).</li>
182
182
</ul>
183
183
<p>If a trace is empty (that is, the empty string <code>""</code>), it will not appear in the final trace, but any case parameter variations associated with it will still be applied.</p>
184
-
<p>Finally, the case is appended to the <code>cases</code> list, which will be returned by the <code>generate_cases</code> function.</p>
184
+
<p>Finally, the case is appended to the <code>cases</code> list, which will be returned by the <code>list_cases</code> function.</p>
185
185
<h2><aclass="anchor" id="autotoc_md85"></a>
186
186
Testing Post Process</h2>
187
187
<p>To test updated post process code, append the <code>-a</code> or <code>--test-all</code> option: </p><divclass="fragment"><divclass="line">./mfc.sh test -a -j 8</div>
<trclass="memdesc:a88808ee0f14fe4e145a538646dc9ba73"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This procedure creates a bounding box for a model. <br/></td></tr>
<divclass="center"><iframescrolling="no" frameborder="0" src="m__helper_8fpp_8f90_a3685fb84c52ce964157ac58fc0068249_icgraph.svg" width="294" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<divclass="center"><iframescrolling="no" frameborder="0" src="m__helper_8fpp_8f90_aaa9cc8944c8dfe3f302e106b0eb3efee_icgraph.svg" width="347" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<divclass="center"><iframescrolling="no" frameborder="0" src="m__helper_8fpp_8f90_abd1074cc9307589b2d34db68c67afb7f_icgraph.svg" width="280" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
0 commit comments