Megatest

Check-in [79e43d242f]
Login
Overview
Comment:Cleared up issues with the code listings in the documention
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 79e43d242feb90180e54e217c9da2946f34a0e66
User & Date: matt on 2012-01-29 19:17:35
Other Links: manifest | tags
Context
2012-02-22
17:13
Added tests to rm of test dir in tree for speculative bug fix check-in: 95fdf5ee69 user: mrwellan tags: trunk
2012-01-31
07:40
Partial implementation of archiving check-in: 263965f514 user: matt tags: archiving
2012-01-29
19:17
Cleared up issues with the code listings in the documention check-in: 79e43d242f user: matt tags: trunk
18:50
Tweaking docs check-in: 7ad3e07014 user: matt tags: trunk
Changes

Modified docs/html/megatest.html from [24d1afe4f2] to [637f8cb216].

380
381
382
383
384
385
386
387
388
389
390
391
392
393







394
395
396
397
398
399
400
380
381
382
383
384
385
386







387
388
389
390
391
392
393
394
395
396
397
398
399
400







-
-
-
-
-
-
-
+
+
+
+
+
+
+








</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-3.3">3.3</a> Create the tests directory and your first test
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">../tests
  ├── megatest.config
  ├── runconfigs.config
  └── tests
     └── mytest
           ├── main.sh
           └── testconfig
<pre class="listing">mt
|-- megatest.config
|-- runconfigs.config
‘-- tests
    ‘-- mytest
        |-- main.sh
        ‘-- testconfig
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-3.4">3.4</a> Create the testconfig file for your test
</h2>
1706
1707
1708
1709
1710
1711
1712
1713

1714
1715
1716
1717
1706
1707
1708
1709
1710
1711
1712

1713
1714
1715
1716
1717







-
+




</h1>
<h1 class="Section">
<a class="toc" name="toc-Appendix-B">B</a> References
</h1>

<hr class="footer"/>
<div class="footer" id="generated-by">
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.2.2 (2011-06-12)</a> on <span class="create-date">2012-01-29T18:44:54.893148</span>
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.2.2 (2011-06-12)</a> on <span class="create-date">2012-01-29T19:15:57.445316</span>
</div>
</div>
</body>
</html>

Modified docs/megatest.lyx from [2e56021d96] to [4ed5338fae].

519
520
521
522
523
524
525

526
527
528
529
530
531
532
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533







+







Create the file megatest.config using the megatest.config template from the
 tests directory.
 At a minimum you need the following:
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# Fields are the keys under which your test runs are organized
\end_layout
634
635
636
637
638
639
640

641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659

660
661
662
663
664
665

666
667
668
669
670

671
672
673
674
675

676
677
678
679
680

681
682
683
684
685

686
687
688
689
690

691
692
693
694
695

696
697
698
699
700
701
702
703
704
705
706
707
708

709
710
711
712
713
714
715
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667

668
669
670
671
672

673
674
675
676
677

678
679
680
681
682

683
684
685
686
687

688
689
690
691
692

693
694
695
696
697

698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719







+



















+





-
+




-
+




-
+




-
+




-
+




-
+




-
+













+







\begin_layout Standard
This file is used to set environment variables that are run specific.
 You can simply create an empty file to start.
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# runconfigs.config
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Create the tests directory and your first test
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

../tests
mt
\end_layout

\begin_layout Plain Layout

  ├── megatest.config
|-- megatest.config
\end_layout

\begin_layout Plain Layout

  ├── runconfigs.config
|-- runconfigs.config
\end_layout

\begin_layout Plain Layout

  └── tests
`-- tests
\end_layout

\begin_layout Plain Layout

     └── mytest
    `-- mytest
\end_layout

\begin_layout Plain Layout

           ├── main.sh
        |-- main.sh
\end_layout

\begin_layout Plain Layout

           └── testconfig
        `-- testconfig
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Create the testconfig file for your test
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

[setup]
\end_layout
726
727
728
729
730
731
732

733
734
735
736
737
738
739
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744







+








\begin_layout Subsection
Create your test running script, main.sh
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

#!/bin/bash
\end_layout
759
760
761
762
763
764
765

766
767
768
769
770
771
772
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778







+








\begin_layout Subsection
Run megatest and watch your run progress
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

megatest :field1 abc :field2 def :runname 2011week08.4a -runall
\end_layout
818
819
820
821
822
823
824

825
826
827
828
829
830
831
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838







+








\begin_layout Subsection
A Simple Test with one Step
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

mkdir simpletest
\end_layout
885
886
887
888
889
890
891

892
893
894
895
896
897
898
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906







+







 
\end_layout

\begin_layout Standard
\noindent
\align left
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

#!/bin/tcsh -x
\end_layout
956
957
958
959
960
961
962

963
964
965
966
967
968
969
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978







+







 Here we add a step to test “cpu2”.
 The second step that tests cpu2 will only run after the step that tested
 “cpu1” completes.
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

#!/bin/tcsh -x
\end_layout
1033
1034
1035
1036
1037
1038
1039

1040
1041
1042
1043
1044
1045
1046
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056







+







 Writing Makefiles is beyond the scope of this document but here is a minimal
 example that will run “runsim cpu1” and “runsim cpu2” in parallel.
 For more information on make try “info make” at the Linux command prompt.
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# Example Makefile to run two steps in parallel
\end_layout
1081
1082
1083
1084
1085
1086
1087

1088
1089
1090
1091
1092
1093
1094
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105







+








\begin_layout Subsection
The main.csh file
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

#!/bin/tcsh -x
\end_layout
1140
1141
1142
1143
1144
1145
1146

1147
1148
1149
1150
1151
1152
1153
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165







+








\begin_layout Subsection
Update your testconfig file for iteration
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

[setup]
\end_layout
1180
1181
1182
1183
1184
1185
1186

1187
1188
1189
1190
1191
1192
1193
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206







+








\begin_layout Subsection
Rewrite your main.csh for iteration
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout
\noindent

#!/bin/tcsh -x
1263
1264
1265
1266
1267
1268
1269

1270
1271
1272
1273
1274
1275
1276
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290







+







 before being launched.
 In this example there is no point in running the “system” test if the “cpu”
 and “mem” tests either do not complete or complete but with status “FAIL”.
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout
\noindent

# testconfig for the "system" test
1306
1307
1308
1309
1310
1311
1312

1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334







+







\begin_layout Standard
Use the -load-test-data switch to roll up arbitrary data from a test into
 the test_data table.
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# Fields are:
\end_layout
1414
1415
1416
1417
1418
1419
1420

1421
1422
1423
1424
1425
1426
1427
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443







+







To roll up a number of tests in a sequence of runs to a single run use the
 -rollup command.
 
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

megatest -rollup :sysname ubuntu :fsname nfs :datapath none :runname rollup_ww38
\end_layout
1442
1443
1444
1445
1446
1447
1448

1449
1450
1451
1452
1453
1454
1455
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472







+








\begin_layout Section
Dashboard
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

> dashboard &
\end_layout
1492
1493
1494
1495
1496
1497
1498

1499
1500
1501
1502
1503
1504
1505
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523







+







\begin_layout Standard
And OpenDocument multi-paned spreadsheet can be generated from the megatest.db
 file by running -extract-ods
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

megatest -extract-ods results.ods :runname % 
\end_layout
1522
1523
1524
1525
1526
1527
1528

1529
1530
1531
1532
1533
1534
1535
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554







+








\begin_layout Subsection
Getting previous test paths
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

megatest -test-paths -target %/%/% :runname % -testpatt % -itempatt % :status
 PASS 
1559
1560
1561
1562
1563
1564
1565

1566
1567
1568
1569
1570
1571
1572
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592







+








\begin_layout Standard
flows/<flowname>.config
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# Flow: <flowname>
\end_layout
1659
1660
1661
1662
1663
1664
1665

1666
1667
1668
1669
1670
1671
1672
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693







+








\begin_layout Subsection
Run the flow
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

megatest -runflow <flowname> :FIELD1 val1 :FIELD2 val2 :runname wk32.4
\end_layout
1722
1723
1724
1725
1726
1727
1728

1729
1730
1731
1732
1733
1734
1735
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757







+








\begin_layout Subsubsection
Sections
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily}"
inline false
status open

\begin_layout Plain Layout

[section name]
\end_layout
1745
1746
1747
1748
1749
1750
1751

1752
1753
1754
1755
1756
1757
1758
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781







+








\begin_layout Subsubsection
Variables
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily}"
inline false
status open

\begin_layout Plain Layout

VARX has this value
\end_layout
1792
1793
1794
1795
1796
1797
1798

1799
1800
1801
1802
1803
1804
1805
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829







+








\begin_layout Subsubsection
Setting a variable by running a command
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily}"
inline false
status open

\begin_layout Plain Layout

VARNAME [system ls /tmp]
\end_layout
2699
2700
2701
2702
2703
2704
2705

2706
2707
2708
2709
2710
2711
2712
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737







+







 The fields, CUSTOMER and LOCATION were chosen.
 The following runconfigs.config file would set some variables specific to
 runs for megacorp in India and femtocorp in the Cook Islands and New Zealand:
\end_layout

\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\small\ttfamily},language=sh"
inline false
status open

\begin_layout Plain Layout

# runconfigs.config
\end_layout

Modified docs/megatest.pdf from [f3f0e16fe6] to [fe61efda9c].

cannot compute difference between binary files