Megatest

Check-in [25d7ed4419]
Login
Overview
Comment:updated itemmap section in manual; hopefully it is clearer now
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: 25d7ed4419d1f50254f6b4f42dd78938ac4e5d1e
User & Date: bjbarcla on 2017-12-12 14:40:02
Other Links: branch diff | manifest | tags
Context
2017-12-12
15:27
updated manual check-in: 3eb427f66f user: bjbarcla tags: v1.65
14:40
updated itemmap section in manual; hopefully it is clearer now check-in: 25d7ed4419 user: bjbarcla tags: v1.65
14:34
updated itemmap section in manual; hopefully it is clearer now check-in: c607976150 user: bjbarcla tags: v1.64
10:17
Merged last few changes from v1.64 into v1.65. All QA passed except for known bad test2. check-in: b5369b3646 user: mrwellan tags: v1.65
Changes

Modified db.scm from [935cf42136] to [1866550cfc].

4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
                     (if (and waiton-is-toplevel ;; if upstream rollup test is completed, parent-waiton-met is set
			      (or waiton-is-completed waiton-is-running))
			 (set! parent-waiton-met #t)))
		    ;; normal checking of parent items, any parent or parent item not ok blocks running
		    ((and waiton-is-completed
			  (or waiton-is-ok 
			      (member 'toplevel mode))              ;; toplevel does not block on FAIL
			  (and waiton-is-ok (member 'itemmatch mode) ;; itemmatch blocks on not ok
                               ))
                     ;;(BB> "cond4")
		     (set! item-waiton-met #t))

                    ((and waiton-is-completed waiton-is-ok same-itempath)
                     ;;(BB> "cond5")
                     (set! item-waiton-met #t))







|







4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
                     (if (and waiton-is-toplevel ;; if upstream rollup test is completed, parent-waiton-met is set
			      (or waiton-is-completed waiton-is-running))
			 (set! parent-waiton-met #t)))
		    ;; normal checking of parent items, any parent or parent item not ok blocks running
		    ((and waiton-is-completed
			  (or waiton-is-ok 
			      (member 'toplevel mode))              ;; toplevel does not block on FAIL
			  (and waiton-is-ok (member 'itemmatch mode) ;; itemmatch blocks on not ok ;; TODO: THIS IS PROBABLY A BUG.  ITEMMATCH AND ITEMWAIT ARE SYNONYMS!! WHAT HAPPENED OT ITEMWAIT???
                               ))
                     ;;(BB> "cond4")
		     (set! item-waiton-met #t))

                    ((and waiton-is-completed waiton-is-ok same-itempath)
                     ;;(BB> "cond5")
                     (set! item-waiton-met #t))

Modified docs/manual/complex-itemmap.dot from [1ce1e37196] to [29ad0d06b8].

36
37
38
39
40
41
42
43
44
45
46
47
	subgraph cluster_6 {
		node [style=filled];
		label = "Test E";
		"C/1/bb" -> "E/1/res";
		"C/2/bb" -> "E/2/res";
	}

        label = "Complex Itemmapping";
        color=green;
    }

}







|




36
37
38
39
40
41
42
43
44
45
46
47
	subgraph cluster_6 {
		node [style=filled];
		label = "Test E";
		"C/1/bb" -> "E/1/res";
		"C/2/bb" -> "E/2/res";
	}

        label = "Complex Itemmapping (arrows indicate order of execution)";
        color=green;
    }

}

Modified docs/manual/complex-itemmap.png from [d2bdff7bfb] to [e000b2b035].

cannot compute difference between binary files

Modified docs/manual/megatest_manual.html from [9ee0d26d38] to [acbcdce45d].

1724
1725
1726
1727
1728
1729
1730

1731
1732
1733

1734
1735



1736
1737
1738
1739



1740
1741





1742
1743



1744
1745














1746
1747
1748
1749

1750
1751
1752
1753
1754
1755

1756

1757
1758


1759
1760
1761


1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788

1789
1790
1791
1792
1793
1794
1795
</div>
<div class="sect2">
<h3 id="_itemmap_handling">Itemmap Handling</h3>
<div class="paragraph"><p>For cases were the dependent test has a similar but not identical
itempath to the downstream test an itemmap can allow for itemmatch
mode</p></div>
<div class="listingblock">

<div class="content monospaced">
<pre>[requirements]
mode itemmatch

itemmap .*x/ y/




# ## pattern replacement notes
#
# ## Example
# ## Remove everything up to the last /



itemmap .*/
#





# ## Example
# ## Replace foo/ with bar/



itemmap foo/ bar/















# multi-line; matches are applied in the listed order
# The following would map:
#   a123b321 to b321fooa123 then to 321fooa123p
#

itemmap (a\d+)(b\d+) \2foo\1
  b(.*) \1p</pre>
</div></div>
<div class="sect3">
<h4 id="_complex_mappings">Complex mappings</h4>
<div class="paragraph"><p>Complex mappings can be handled with the [itemmap] section</p></div>

<div class="imageblock">

<div class="content">
<img src="complex-itemmap.png" alt="complex-itemmap.png">


</div>
</div>
<div class="paragraph"><p>Example:</p></div>


<div class="olist arabic"><ol class="arabic">
<li>
<p>
Request to run D/1/res
</p>
</li>
<li>
<p>
Megatest uses rule "(\d+)/res" &#8594; "\1/aa" to create item C/1/aa from D/1/res
</p>
</li>
<li>
<p>
Full list to be run is now: D/1/res, C/1/aa
</p>
</li>
<li>
<p>
Megatest uses rule "(\d+)/aa" &#8594; "aa/\1" to create item A/aa/1
</p>
</li>
<li>
<p>
Full list to be run is now: D/1/res, C/1/aa, A/aa/1
</p>
</li>
</ol></div>

<div class="listingblock">
<div class="title">Testconfig for Test C</div>
<div class="content monospaced">
<pre>[requirements]
waiton A B

[itemmap]







>


|
>
|
|
>
>
>
|



>
>
>
|
<
>
>
>
>
>


>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|



>




|
|
>
|
>
|
|
>
>
|

|
>
>
|
<
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
>







1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748

1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798






1799

1800
















1801
1802
1803
1804
1805
1806
1807
1808
1809
</div>
<div class="sect2">
<h3 id="_itemmap_handling">Itemmap Handling</h3>
<div class="paragraph"><p>For cases were the dependent test has a similar but not identical
itempath to the downstream test an itemmap can allow for itemmatch
mode</p></div>
<div class="listingblock">
<div class="title">example for removing part of itemmap for waiton test (eg: item <span class="monospaced">foo-x/bar</span> depends on waiton&#8217;s item <span class="monospaced">y/bar</span>)</div>
<div class="content monospaced">
<pre>[requirements]
mode itemwait
# itemmap &lt;item pattern for this test&gt;  &lt;item replacement pattern for waiton test&gt;
itemmap .*x/ y/</pre>
</div></div>
<div class="listingblock">
<div class="title">example for removing part of itemmap for waiton test (eg: item <span class="monospaced">foo/bar/baz</span> in this test depends on waiton&#8217;s item <span class="monospaced">baz</span>)</div>
<div class="content monospaced">
<pre># ## pattern replacement notes
#
# ## Example
# ## Remove everything up to the last /
[requirements]
mode itemwait
# itemmap &lt;item pattern for this test&gt; &lt;nothing here indicates removal&gt;
itemmap .*/</pre>

</div></div>
<div class="listingblock">
<div class="title">example replacing part of itemmap for (eg: item <span class="monospaced">foo/1234</span> will imply waiton&#8217;s item <span class="monospaced">bar/1234</span>)</div>
<div class="content monospaced">
<pre>#
# ## Example
# ## Replace foo/ with bar/
[requirements]
mode itemwait
# itemmap &lt;item pattern for this test&gt;  &lt;item replacement pattern for waiton test&gt;
itemmap foo/ bar/</pre>
</div></div>
<div class="listingblock">
<div class="title">example for backreference (eg: item <span class="monospaced">foo23/thud</span> will imply waiton&#8217;s item <span class="monospaced">num-23/bar/thud</span></div>
<div class="content monospaced">
<pre>#
# ## Example
# ## can use \{number} in replacement pattern to backreference a (capture) from matching pattern similar to sed or perl
[requirements]
mode itemwait
# itemmap &lt;item pattern for this test&gt;  &lt;item replacement pattern for waiton test&gt;
itemmap foo(\d+)/ num-\1/bar/</pre>
</div></div>
<div class="listingblock">
<div class="title">example multiple itemmaps</div>
<div class="content monospaced">
<pre># multi-line; matches are applied in the listed order
# The following would map:
#   a123b321 to b321fooa123 then to 321fooa123p
#
[requirements]
itemmap (a\d+)(b\d+) \2foo\1
  b(.*) \1p</pre>
</div></div>
<div class="sect3">
<h4 id="_complex_mapping">Complex mapping</h4>
<div class="paragraph"><p>Complex mappings can be handled with a separate [itemmap] section (instead if an itemmap line in the [requirements] section)</p></div>
<div class="paragraph"><p>Each line in an itemmap section starts with a waiton test name followed by an itemmap expression</p></div>
<div class="listingblock">
<div class="title">eg: The following causes waiton test A item <span class="monospaced">bar/1234</span> to run when our test&#8217;s <span class="monospaced">foo/1234</span> item is requested as well as causing waiton test B&#8217;s <span class="monospaced">blah</span> item to run when our test&#8217;s <span class="monospaced">stuff/blah</span> item is requested</div>
<div class="content monospaced">
<pre>[itemmap]
A foo/ bar/
B stuff/</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_complex_mapping_example">Complex mapping example</h4>
<div class="imageblock">
<div class="content">






<img src="complex-itemmap.png" alt="complex-itemmap.png">

</div>
















</div>
<div class="paragraph"><p>We accomplish this by configuring the testconfigs of our tests C D and E as follows:</p></div>
<div class="listingblock">
<div class="title">Testconfig for Test C</div>
<div class="content monospaced">
<pre>[requirements]
waiton A B

[itemmap]
1806
1807
1808
1809
1810
1811
1812




























1813
1814
1815
1816
1817
1818
1819
<div class="listingblock">
<div class="title">Testconfig for Test E</div>
<div class="content monospaced">
<pre>[requirements]
waiton C
itemmap (\d+)/res \1/bb</pre>
</div></div>




























</div>
<div class="sect3">
<h4 id="_dynamic_flow_dependency_tree">Dynamic Flow Dependency Tree</h4>
<div class="listingblock">
<div class="title">Autogeneration waiton list for dynamic flow dependency trees</div>
<div class="content monospaced">
<pre>[requirements]







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
<div class="listingblock">
<div class="title">Testconfig for Test E</div>
<div class="content monospaced">
<pre>[requirements]
waiton C
itemmap (\d+)/res \1/bb</pre>
</div></div>
<div class="paragraph"><p>Example from image just above, we want the following to occur:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
We want the above to execute when we request pattern <span class="monospaced">D/1/res</span>, eg from command line <span class="monospaced">megatest -run -testpatt D/1/res -target &#8230; -runname &#8230;</span>
</p>
</li>
<li>
<p>
"(\d+)/res" &#8594; "\1/aa" to require <span class="monospaced">C/1/aa</span> be executed before <span class="monospaced">D/1/res</span>
</p>
</li>
<li>
<p>
Full list to be run is now: D/1/res, C/1/aa
</p>
</li>
<li>
<p>
"(\d+)/aa" &#8594; "aa/\1" to create item <span class="monospaced">A/aa/1</span>
</p>
</li>
<li>
<p>
Full list to be run is now: <span class="monospaced">D/1/res</span>, <span class="monospaced">C/1/aa</span>, <span class="monospaced">A/aa/1</span>
</p>
</li>
</ol></div>
</div>
<div class="sect3">
<h4 id="_dynamic_flow_dependency_tree">Dynamic Flow Dependency Tree</h4>
<div class="listingblock">
<div class="title">Autogeneration waiton list for dynamic flow dependency trees</div>
<div class="content monospaced">
<pre>[requirements]
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br>
Last updated 2017-08-30 10:42:37 PDT
</div>
</div>
</body>
</html>







|




2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br>
Last updated 2017-07-17 14:05:11 PDT
</div>
</div>
</body>
</html>

Modified docs/manual/reference.txt from [3fc5197c1a] to [39fa0839a8].

298
299
300
301
302
303
304

305
306
307

308





309
310
311
312
313



314





315
316
317



318

















319
320
321
322
323

324
325
326
327

328
329

330










331



332
333
334
335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
Itemmap Handling
~~~~~~~~~~~~~~~~

For cases were the dependent test has a similar but not identical
itempath to the downstream test an itemmap can allow for itemmatch
mode


-------------------
[requirements]
mode itemmatch

itemmap .*x/ y/






# ## pattern replacement notes
#
# ## Example
# ## Remove everything up to the last /



itemmap .*/





#
# ## Example
# ## Replace foo/ with bar/



itemmap foo/ bar/


















# multi-line; matches are applied in the listed order
# The following would map:
#   a123b321 to b321fooa123 then to 321fooa123p
#

itemmap (a\d+)(b\d+) \2foo\1
  b(.*) \1p
-------------------


Complex mappings
^^^^^^^^^^^^^^^^












Complex mappings can be handled with the [itemmap] section




// image::itemmap.png[]
image::complex-itemmap.png[]

Example:

. Request to run D/1/res
. Megatest uses rule "(\d+)/res" -> "\1/aa" to create item C/1/aa from D/1/res
. Full list to be run is now: D/1/res, C/1/aa
. Megatest uses rule "(\d+)/aa" -> "aa/\1" to create item A/aa/1
. Full list to be run is now: D/1/res, C/1/aa, A/aa/1


.Testconfig for Test C
----------------------
[requirements]
waiton A B

[itemmap]







>


|
>

>
>
>
>
>





>
>
>

>
>
>
>
>



>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>




>
|
|
>

>
>
>
>
>
>
>
>
>
>
|
>
>
>




<

<
<
<
<
<
>







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386

387





388
389
390
391
392
393
394
395
Itemmap Handling
~~~~~~~~~~~~~~~~

For cases were the dependent test has a similar but not identical
itempath to the downstream test an itemmap can allow for itemmatch
mode

.example for removing part of itemmap for waiton test (eg: item +foo-x/bar+ depends on waiton's item +y/bar+)
-------------------
[requirements]
mode itemwait
# itemmap <item pattern for this test>  <item replacement pattern for waiton test>
itemmap .*x/ y/

-------------------

.example for removing part of itemmap for waiton test (eg: item +foo/bar/baz+ in this test depends on waiton's item +baz+)
-------------------

# ## pattern replacement notes
#
# ## Example
# ## Remove everything up to the last /
[requirements]
mode itemwait
# itemmap <item pattern for this test> <nothing here indicates removal>
itemmap .*/
-------------------

.example replacing part of itemmap for (eg: item +foo/1234+ will imply waiton's item +bar/1234+)
-------------------

#
# ## Example
# ## Replace foo/ with bar/
[requirements]
mode itemwait
# itemmap <item pattern for this test>  <item replacement pattern for waiton test>
itemmap foo/ bar/

-------------------

.example for backreference (eg: item +foo23/thud+ will imply waiton's item +num-23/bar/thud+
-------------------
#
# ## Example
# ## can use \{number} in replacement pattern to backreference a (capture) from matching pattern similar to sed or perl
[requirements]
mode itemwait
# itemmap <item pattern for this test>  <item replacement pattern for waiton test>
itemmap foo(\d+)/ num-\1/bar/

-------------------

.example multiple itemmaps
-------------------

# multi-line; matches are applied in the listed order
# The following would map:
#   a123b321 to b321fooa123 then to 321fooa123p
#
[requirements]
itemmap (a\d+)(b\d+) \2foo\1
  b(.*) \1p
-------------------


Complex mapping
^^^^^^^^^^^^^^^
Complex mappings can be handled with a separate [itemmap] section (instead if an itemmap line in the [requirements] section)

Each line in an itemmap section starts with a waiton test name followed by an itemmap expression

.eg: The following causes waiton test A item +bar/1234+ to run when our test's +foo/1234+ item is requested as well as causing waiton test B's +blah+ item to run when our test's +stuff/blah+ item is requested
--------------
[itemmap]
A foo/ bar/
B stuff/
--------------


Complex mapping example
^^^^^^^^^^^^^^^^^^^^^^^



// image::itemmap.png[]
image::complex-itemmap.png[]








We accomplish this by configuring the testconfigs of our tests C D and E as follows:

.Testconfig for Test C
----------------------
[requirements]
waiton A B

[itemmap]
360
361
362
363
364
365
366









367
368
369
370
371
372
373

.Testconfig for Test E
----------------------
[requirements]
waiton C
itemmap (\d+)/res \1/bb
----------------------










Dynamic Flow Dependency Tree
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.Autogeneration waiton list for dynamic flow dependency trees
-------------------
[requirements]







>
>
>
>
>
>
>
>
>







406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428

.Testconfig for Test E
----------------------
[requirements]
waiton C
itemmap (\d+)/res \1/bb
----------------------

Example from image just above, we want the following to occur:

. We want the above to execute when we request pattern +D/1/res+, eg from command line +megatest -run -testpatt D/1/res -target ... -runname ...+
. "(\d+)/res" -> "\1/aa" to require +C/1/aa+ be executed before +D/1/res+
. Full list to be run is now: D/1/res, C/1/aa
. "(\d+)/aa" -> "aa/\1" to create item +A/aa/1+
. Full list to be run is now: +D/1/res+, +C/1/aa+, +A/aa/1+


Dynamic Flow Dependency Tree
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.Autogeneration waiton list for dynamic flow dependency trees
-------------------
[requirements]