Overview
Comment: | Partial refactor to get pdf working in docs. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8b4943565692e01c6c9c330bc389bddc |
User & Date: | mrwellan on 2018-10-24 17:50:24 |
Other Links: | manifest | tags |
Context
2018-10-24
| ||
20:26 | Updated pdf and html manuals check-in: 8b5811f2d8 user: matt tags: trunk | |
17:50 | Partial refactor to get pdf working in docs. check-in: 8b49435656 user: mrwellan tags: trunk | |
15:25 | Updates to user manual. Switched back to versioned files instead of wiki pages. check-in: f02438d40b user: mrwellan tags: trunk | |
Changes
Modified docs/manual/getting_started.txt from [7f26703057] to [db325e4bbe].
︙ | ︙ | |||
16 17 18 19 20 21 22 | // Copyright 2006-2012, Matthew Welland. Getting Started --------------- [partintro] .Getting started with Megatest | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | // Copyright 2006-2012, Matthew Welland. Getting Started --------------- [partintro] .Getting started with Megatest ------------------- Creating a testsuite or flow and your first test or task. ------------------- After installing Megatest you can create a flow or testsuite and add some tests using the helpers. Here is a quickstart sequence to get you up and running your first automated testsuite. Creating a Megatest Area ~~~~~~~~~~~~~~~~~~~~~~~~ |
︙ | ︙ |
Modified docs/manual/installation.txt from [214fda16e6] to [73f4fcba67].
︙ | ︙ | |||
21 22 23 24 25 26 27 | Dependencies ~~~~~~~~~~~~ Chicken scheme and a number of "eggs" are required for building Megatest. See the script installall.sh in the utils directory of the source distribution for an automated way to install everything needed for building Megatest on Linux. | > | 21 22 23 24 25 26 27 28 | Dependencies ~~~~~~~~~~~~ Chicken scheme and a number of "eggs" are required for building Megatest. See the script installall.sh in the utils directory of the source distribution for an automated way to install everything needed for building Megatest on Linux. |
Modified docs/manual/megatest_manual.html from [a65572d7c2] to [9b4c13d87b].
︙ | ︙ | |||
808 809 810 811 812 813 814 | </div> </div> <div class="sect1"> <h2 id="_why_megatest">Why Megatest?</h2> <div class="sectionbody"> <div class="paragraph"><p>The Megatest project was started for two reasons, the first was an immediate and pressing need for a generalized tool to manage a suite | | | | | | | > > > > | | | | | | > > | > > > > | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 | </div> </div> <div class="sect1"> <h2 id="_why_megatest">Why Megatest?</h2> <div class="sectionbody"> <div class="paragraph"><p>The Megatest project was started for two reasons, the first was an immediate and pressing need for a generalized tool to manage a suite of regression tests and the second was the fact that I had written or maintained several such tools at different companies over the years. I thought a single open source tool, flexible enough to meet the needs of any team doing continuous integrating and or running a complex suite of tests for release qualification would solve some problems for me and for others.</p></div> <div class="literalblock"> <div class="content monospaced"> <pre>-- Matt Welland, original author of the Megatest tool suite.</pre> </div></div> </div> </div> <div class="sect1"> <h2 id="_megatest_design_philosophy">Megatest Design Philosophy</h2> <div class="sectionbody"> <div class="paragraph"><p>Megatest is a distributed system intended to provide the minimum needed resources to make writing a suite of tests and tasks for implementing continuous build for software, design engineering or process control (via owlfs for example) without being specialized for any specific problem space. Megatest in of itself does not know what constitutes a PASS or FAIL of a test or task. In most cases megatest is best used in conjunction with logpro or a similar tool to parse, analyze and decide on the test outcome.</p></div> <div class="ulist"><ul> <li> <p> Self-checking -Repeatable strive for directed or self-checking test as opposed to delta based tests. </p> </li> <li> <p> Traceable - environment variables, host OS and other possibly influential variables are captured and kept recorded. </p> </li> <li> <p> Immutable - once a test is run it cannot be easily overwritten or modified accidentally. </p> </li> <li> <p> Repeatable - test results can be recreated in the future using all the original variables. </p> </li> <li> <p> Relocatable - the testsuite or automation area can be checked out and the tests run anywhere in the disk hierarchy. </p> </li> <li> <p> Encapsulated - the tests run in self-contained directories and all inputs and outputs to the process can be found in the run areas. </p> </li> <li> <p> Deployable - a testsuite is self-contained and can be bundled with a software project. </p> </li> </ul></div> </div> </div> <div class="sect1"> <h2 id="_megatest_architecture">Megatest Architecture</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_data_separation">Data separation</h3> <div class="paragraph"><p>All data to specify the tests and configure the system is stored in plain text config files. All system state is stored in an sqlite3 database.</p></div> </div> <div class="sect2"> <h3 id="_distributed_compute">Distributed Compute</h3> <div class="paragraph"><p>Tests are launched using the launching system available for the distributed compute platform in use. A template script is provided which can launch jobs on local and remote Linux hosts. Currently megatest uses the network filesystem to call home to your master sqlite3 database. Megatest has been used with the Intel Netbatch system, the lsf batch system and it should be possible to use it with other similar systems.</p></div> </div> </div> </div> <div class="sect1"> <h2 id="_installation">Installation</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_dependencies">Dependencies</h3> <div class="paragraph"><p>Chicken scheme and a number of "eggs" are required for building Megatest. See the script installall.sh in the utils directory of the source distribution for an automated way to install everything needed for building Megatest on Linux.</p></div> </div> </div> </div> <div class="sect1"> <h2 id="_getting_started">Getting Started</h2> <div class="sectionbody"> <div class="openblock"> <div class="title">Getting started with Megatest</div> <div class="content"> <div class="paragraph"><p>Creating a testsuite or flow and your first test or task.</p></div> </div></div> </div> </div> <div class="sect1"> <h2 id="_megatest_internals">Megatest Internals</h2> <div class="sectionbody"> <div class="imageblock graphviz"> <div class="content"> <img src="server.png" alt="server.png"> </div> </div> </div> </div> <div class="sect1"> <h2 id="_road_map">Road Map</h2> <div class="sectionbody"> <div class="paragraph"><p>Note 1: This road-map continues to evolve and subject to change without notice.</p></div> <div class="sect2"> |
︙ | ︙ | |||
1236 1237 1238 1239 1240 1241 1242 | </ol></div> <div class="paragraph"><p>shifting, note that the preceding blank line is needed.</p></div> </div> </div> </div> </div> <div class="sect1"> | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | </ol></div> <div class="paragraph"><p>shifting, note that the preceding blank line is needed.</p></div> </div> </div> </div> </div> <div class="sect1"> <h2 id="_index">Index</h2> <div class="sectionbody"> </div> </div> </div> <div id="footnotes"><hr></div> <div id="footer"> <div id="footer-text"> Version 1.0<br> Last updated 2018-10-24 15:52:36 PDT </div> </div> </body> </html> |
Modified docs/manual/megatest_manual.txt from [27533fd7b1] to [bb97544027].
︙ | ︙ | |||
33 34 35 36 37 38 39 | ---------------------------- Why Megatest? ------------- The Megatest project was started for two reasons, the first was an immediate and pressing need for a generalized tool to manage a suite | | | | | | > | > | | | | | | > > > | > > > > > | | | | | < < < | > > > > > > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | ---------------------------- Why Megatest? ------------- The Megatest project was started for two reasons, the first was an immediate and pressing need for a generalized tool to manage a suite of regression tests and the second was the fact that I had written or maintained several such tools at different companies over the years. I thought a single open source tool, flexible enough to meet the needs of any team doing continuous integrating and or running a complex suite of tests for release qualification would solve some problems for me and for others. -- Matt Welland, original author of the Megatest tool suite. Megatest Design Philosophy -------------------------- Megatest is a distributed system intended to provide the minimum needed resources to make writing a suite of tests and tasks for implementing continuous build for software, design engineering or process control (via owlfs for example) without being specialized for any specific problem space. Megatest in of itself does not know what constitutes a PASS or FAIL of a test or task. In most cases megatest is best used in conjunction with logpro or a similar tool to parse, analyze and decide on the test outcome. * Self-checking -Repeatable strive for directed or self-checking test as opposed to delta based tests. * Traceable - environment variables, host OS and other possibly influential variables are captured and kept recorded. * Immutable - once a test is run it cannot be easily overwritten or modified accidentally. * Repeatable - test results can be recreated in the future using all the original variables. * Relocatable - the testsuite or automation area can be checked out and the tests run anywhere in the disk hierarchy. * Encapsulated - the tests run in self-contained directories and all inputs and outputs to the process can be found in the run areas. * Deployable - a testsuite is self-contained and can be bundled with a software project. Megatest Architecture --------------------- Data separation ~~~~~~~~~~~~~~~ All data to specify the tests and configure the system is stored in plain text config files. All system state is stored in an sqlite3 database. Distributed Compute ~~~~~~~~~~~~~~~~~~~ Tests are launched using the launching system available for the distributed compute platform in use. A template script is provided which can launch jobs on local and remote Linux hosts. Currently megatest uses the network filesystem to call home to your master sqlite3 database. Megatest has been used with the Intel Netbatch system, the lsf batch system and it should be possible to use it with other similar systems. include::installation.txt[] include::getting_started.txt[] include::study_plan.txt[] // :leveloffset: 0 include::writing_tests.txt[] include::howto.txt[] include::reference.txt[] Megatest Internals ------------------ ["graphviz", "server.png"] ---------------------------------------------------------------------- include::server.dot[] ---------------------------------------------------------------------- include::plan.txt[] // to allow the getting_started.txt to be a stand-alone document use level shifting, note that the preceding blank line is needed. // :leveloffset: 2 // [appendix] // Example Appendix // ================ // One or more optional appendixes go here at section level zero. // |
︙ | ︙ | |||
152 153 154 155 156 157 158 | // // [colophon] // Example Colophon // ================ // Text at the end of a book describing facts about its production. [index] | | | | 165 166 167 168 169 170 171 172 173 174 175 176 177 | // // [colophon] // Example Colophon // ================ // Text at the end of a book describing facts about its production. [index] Index ----- //////////////////////////////////////////////////////////////// The index is normally left completely empty, it's contents are generated automatically by the DocBook toolchain. //////////////////////////////////////////////////////////////// |
Modified docs/manual/reference.txt from [67599b35bf] to [61a3556a1d].
︙ | ︙ | |||
29 30 31 32 33 34 35 | |Continue run | -run | resume |Remove run | -remove-runs | clean |Lock run | -lock | lock |Unlock run | -unlock | unlock |killrun | -set-state-status KILLREQ; -kill-run | killrun |====================== | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < > | | | | | | | | | | | < > | | | | | | | | | | | < > | | | | | | | | | | | | | | | < > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 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 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 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 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | |Continue run | -run | resume |Remove run | -remove-runs | clean |Lock run | -lock | lock |Unlock run | -unlock | unlock |killrun | -set-state-status KILLREQ; -kill-run | killrun |====================== // Config File Helpers // ~~~~~~~~~~~~~~~~~~~ // // Various helpers for more advanced config files. // // .Helpers // [width="80%",cols="^,2m,2m,2m",frame="topbot",options="header"] // |====================== // |Helper | Purpose | Valid values | Comments // | #{scheme (scheme code...)} | Execute arbitrary scheme code | Any valid scheme | Value returned from the call is converted to a string and processed as part of the config file // | #{system command} | Execute program, inserts exit code | Any valid Unix command | Discards the output from the program // | #{shell command} or #{sh ...} | Execute program, inserts result from stdout | Any valid Unix command | Value returned from the call is converted to a string and processed as part of the config file // | #{realpath path} or #{rp ...} | Replace with normalized path | Must be a valid path | // | #{getenv VAR} or #{gv VAR} | Replace with content of env variable | Must be a valid var | // | #{get s v} or #{g s v} | Replace with variable v from section s | Variable must be defined before use | // | #{rget v} | Replace with variable v from target or default of runconfigs file | | // | #{mtrah} | Replace with the path to the megatest testsuite area | | // |====================== // // Config File Settings // ~~~~~~~~~~~~~~~~~~~~ // // Settings in megatest.config // // Config File Additional Features // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Including output from a script as if it was inline to the config file: // // ------------------------- // [scriptinc myscript.sh] // ------------------------- // // If the script outputs: // // ------------------------- // [items] // A a b c // B d e f // ------------------------- // // Then the config file would effectively appear to contain an items section // exactly like the output from the script. This is useful when dynamically // creating items, itemstables and other config structures. You can see the // expansion of the call by looking in the cached files (look in your linktree // for megatest.config and runconfigs.config cache files and in your test run // areas for the expanded and cached testconfig). // // Wildcards and regexes in Targets // // ------------------------- // [a/2/b] // VAR1 VAL1 // // [a/%/b] // VAR1 VAL2 // ------------------------- // // Will result in: // // ------------------------- // [a/2/b] // VAR1 VAL2 // ------------------------- // // Can use either wildcard of "%" or a regular expression: // // ------------------------- // [/abc.*def/] // ------------------------- // // Disk Space Checks // ^^^^^^^^^^^^^^^^^ // // Some parameters you can put in the [setup] section of megatest.config: // // ------------------- // # minimum space required in a run disk // minspace 10000000 // // # minimum space required in dbdir: // dbdir-space-required 100000 // // # script that takes path as parameter and returns number of bytes available: // free-space-script check-space.sh // ------------------- // // Trim trailing spaces // ^^^^^^^^^^^^^^^^^^^^ // // ------------------ // [configf:settings trim-trailing-spaces yes] // ------------------ // // Job Submission Control // ^^^^^^^^^^^^^^^^^^^^^^ // // Submit jobs to Host Types based on Test Name // ++++++++++++++++++++++++++++++++++++++++++++ // // .In megatest.config // ------------------------ // [host-types] // general nbfake // remote bsub // // [launchers] // runfirst/sum% remote // % general // // [jobtools] // launcher bsub // # if defined and not "no" flexi-launcher will bypass launcher unless // # there is no host-type match. // flexi-launcher yes // ------------------------ // // host-types // ++++++++++ // // List of host types and the commandline to run a job on that host type. // // .host-type => launch command // ------------ // general nbfake // ------------ // // launchers // +++++++++ // // .test/itempath => host-type // ------------ // runfirst/sum% remote // ------------ // // Miscellaneous Setup Items // +++++++++++++++++++++++++ // // Attempt to rerun tests in "STUCK/DEAD", "n/a", "ZERO_ITEMS" states. // // .In megatest.config // ------------------ // [setup] // reruns 5 // ------------------ // // Replace the default blacklisted environment variables with user supplied // list. // // Default list: USER HOME DISPLAY LS_COLORS XKEYSYMDB EDITOR MAKEFLAGS MAKEF MAKEOVERRIDES // // .Add a "bad" variable "PROMPT" to the variables that will be commented out // in the megatest.sh and megatest.csh files: // ----------------- // [setup] // blacklistvars USER HOME DISPLAY LS_COLORS XKEYSYMDB EDITOR MAKEFLAGS PROMPT // ----------------- // // Run time limit // ++++++++++++++ // // ----------------- // [setup] // # this will automatically kill the test if it runs for more than 1h 2m and 3s // runtimelim 1h 2m 3s // ----------------- // // Tests browser view // ~~~~~~~~~~~~~~~~~~ // // The tests browser (see the Run Control tab on the dashboard) has two views for displaying the tests. // // . Dot (graphviz) based tree // . No dot, plain listing // // The default is the graphviz based tree but if your tests don't view // well in that mode then use "nodot" to turn it off. // // ----------------- // [setup] // nodot // ----------------- // // Capturing Test Data // ~~~~~~~~~~~~~~~~~~~ // // In a test you can capture arbitrary variables and roll them up in the // megatest database for viewing on the dashboard or web app. // // .In a test as a script // ------------------------ // $MT_MEGATEST -load-test-data << EOF // foo,bar, 1.2, 1.9, > // foo,rab, 1.0e9, 10e9, 1e9 // foo,bla, 1.2, 1.9, < // foo,bal, 1.2, 1.2, < , ,Check for overload // foo,alb, 1.2, 1.2, <= , Amps,This is the high power circuit test // foo,abl, 1.2, 1.3, 0.1 // foo,bra, 1.2, pass, silly stuff // faz,bar, 10, 8mA, , ,"this is a comment" // EOF // ------------------------ // // Alternatively you can use logpro triggers to capture values and inject them // into megatest using the -set-values mechanism: // // .Megatest help related to -set-values // ------------------------ // Test data capture // -set-values : update or set values in the testdata table // :category : set the category field (optional) // :variable : set the variable name (optional) // :value : value measured (required) // :expected : value expected (required) // :tol : |value-expect| <= tol (required, can be <, >, >=, <= or number) // :units : name of the units for value, expected_value etc. (optional) // ------------------------ // // Dashboard settings // ~~~~~~~~~~~~~~~~~~ // // .Runs tab buttons, font and size // ------------------ // [dashboard] // btn-height x14 // btn-fontsz 10 // cell-width 60 // ------------------ // // Database settings // ~~~~~~~~~~~~~~~~~ // // .Database config settings in [setup] section of megatest.config // [width="70%",cols="^,2m,2m,2m",frame="topbot",options="header"] // |====================== // |Var | Purpose | Valid values | Comments // |delay-on-busy | Prevent concurrent access issues | yes\|no or not defined | Default=no, may help on some network file systems, may slow things down also. // |faststart | All direct file access to sqlite db files | yes\|no or not defined | Default=yes, suggest no for central automated systems and yes for interactive use // |homehost | Start servers on this host | <hostname> | Defaults to local host // |hostname | Hostname to bind to | <hostname>\|- | On multi-homed hosts allows binding to specific hostname // |lowport | Start searching for a port at this portnum| 32768 | // |required | Server required | yes\|no or not defined | Default=no, force start of server always // |server-query-threshold | Start server when queries take longer than this | number in milliseconds | Default=300 // |timeout | http api timeout | number in hours | Default is 1 minute, do not change // |====================== // // The testconfig File // ------------------- // // Setup section // ~~~~~~~~~~~~~ // // Header // ^^^^^^ // // ------------------- // [setup] // ------------------- // // The runscript method is a brute force way to run scripts where the // user is responsible for setting STATE and STATUS // // ------------------- // runscript main.csh // ------------------- // // Iteration // ~~~~~~~~~ // // .Sections for iteration // ------------------ // # full combinations // [items] // A x y // B 1 2 // // # Yields: x/1 x/2 y/1 y/2 // // # tabled // [itemstable] // A x y // B 1 2 // // # Yields x/1 y/2 // ------------------ // // // Requirements section // ~~~~~~~~~~~~~~~~~~~~ // // .Header // ------------------- // [requirements] // ------------------- // // Wait on Other Tests // ^^^^^^^^^^^^^^^^^^^ // // ------------------- // # A normal waiton waits for the prior tests to be COMPLETED // # and PASS, CHECK or WAIVED // waiton test1 test2 // ------------------- // // Mode // ^^^^ // // The default (i.e. if mode is not specified) is normal. All pre-dependent tests // must be COMPLETED and PASS, CHECK or WAIVED before the test will start // // ------------------- // [requirements] // mode normal // ------------------- // // The toplevel mode requires only that the prior tests are COMPLETED. // // ------------------- // [requirements] // mode toplevel // ------------------- // // A item based waiton will start items in a test when the same-named // item is COMPLETED and PASS, CHECK or WAIVED in the prior test. This // was historically called "itemwait" mode. The terms "itemwait" and // "itemmatch" are synonyms. // // ------------------- // [requirements] // mode itemmatch // ------------------- // // Overriding Enviroment Variables // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Override variables before starting the test. Can include files (perhaps generated by megatest -envdelta or similar). // // -------------------- // [pre-launch-env-vars] // VAR1 value1 // // # Get some generated settings // [include ../generated-vars.config] // // # Use this trick to unset variables // #{scheme (unsetenv "FOOBAR")} // -------------------- // // 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 E has // ---------------------- // [requirements] // waiton C // itemmap (\d+)/res \1/bb // ---------------------- // // .Testconfig for Test D has // ---------------------- // [requirements] // waiton C // itemmap (\d+)/res \1/aa // ---------------------- // // .Testconfig for Test C has // ---------------------- // [requirements] // waiton A B // // [itemmap] // A (\d+)/aa aa/\1 // B (\d+)/bb bb/\1 // ---------------------- // // .Testconfigs for Test B and Test A have no waiton or itemmap configured // ------------------- // ------------------- // // .Walk through one item -- we want the following to happen for testpatt +D/1/res+ (see blue boxes in complex itemmaping figure above): // // . eg from command line +megatest -run -testpatt D/1/res -target mytarget -runname myrunname+ // . Full list to be run is now: +D/1/res+ // . Test D has a waiton - test C. Test D's itemmap rule +itemmap (\d+)/res \1/aa+ -> causes +C/1/aa+ to run before +D/1/res+ // . Full list to be run is now: +D/1/res+, +C/1/aa+ // . Test C was a waiton - test A. Test C's rule +A (\d+)/aa aa/\1+ -> causes +A/aa/1+ to run before +C/1/aa+ // . Full list to be run is now: +D/1/res+, +C/1/aa+, +A/aa/1+ // . Test A has no waitons. All waitons of all tests in full list have been processed. Full list is finalized. // // // // itemstable // ^^^^^^^^^^ // An alternative to defining items is the itemstable section. This lets you define the itempath in a table format rather than specifying components and relying on getting all permutations of those components. // // // // // // Dynamic Flow Dependency Tree // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // .Autogeneration waiton list for dynamic flow dependency trees // ------------------- // [requirements] // # With a toplevel test you may wish to generate your list // # of tests to run dynamically // # // waiton #{shell get-valid-tests-to-run.sh} // ------------------- // // Run time limit // ^^^^^^^^^^^^^^ // // ----------------- // [requirements] // runtimelim 1h 2m 3s # this will automatically kill the test if it runs for more than 1h 2m and 3s // ----------------- // // Skip // ^^^^ // // A test with a skip section will conditional skip running. // // .Skip section example // ----------------- // [skip] // prevrunning x // # rundelay 30m 15s // ----------------- // // Skip on Still-running Tests // ^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // ----------------- // # NB// If the prevrunning line exists with *any* value the test will // # automatically SKIP if the same-named test is currently RUNNING. The // # "x" can be any string. Comment out the prevrunning line to turn off // # skip. // // [skip] // prevrunning x // ----------------- // // Skip if a File Exists // ^^^^^^^^^^^^^^^^^^^^^ // // ----------------- // [skip] // fileexists /path/to/a/file # skip if /path/to/a/file exists // ----------------- // // Skip if test ran more recently than specified time // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // .Skip if this test has been run in the past fifteen minutes and 15 seconds. // ----------------- // [skip] // rundelay 15m 15s // ----------------- // // Disks // ^^^^^ // // A disks section in testconfig will override the disks section in // megatest.config. This can be used to allocate disks on a per-test or per item // basis. // // Controlled waiver propagation // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig: // If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED // // Waiver check has two parts, 1) a list of waiver, rulename, filepatterns and 2) the rulename script spec (note that "diff" and "logpro" are predefined) // // ----------------- // ###### EXAMPLE FROM testconfig ######### // # matching file(s) will be diff'd with previous run and logpro applied // # if PASS or WARN result from logpro then WAIVER state is set // # // [waivers] // # logpro_file rulename input_glob // waiver_1 logpro lookittmp.log // // [waiver_rules] // // # This builtin rule is the default if there is no <waivername>.logpro file // # diff diff %file1% %file2% // // # This builtin rule is applied if a <waivername>.logpro file exists // # logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html // ----------------- // // Ezsteps // ~~~~~~~ // // .Example ezsteps with logpro rules // ----------------- // [ezsteps] // lookittmp ls /tmp // // [logpro] // lookittmp ;; Note: config file format supports multi-line entries where leading whitespace is removed from each line // ;; a blank line indicates the end of the block of text // (expect:required in "LogFileBody" > 0 "A file name that should never exist!" #/This is a awfully stupid file name that should never be found in the temp dir/) // // ----------------- // // To transfer the environment to the next step you can do the following: // // ---------------------------- // $MT_MEGATEST -env2file .ezsteps/${stepname} // ---------------------------- // // Triggers // ~~~~~~~~ // // In your testconfig or megatest.config triggers can be specified // // ----------------- // [triggers] // // # Call script running.sh when test goes to state=RUNNING, status=PASS // RUNNING/PASS running.sh // // # Call script running.sh any time state goes to RUNNING // RUNNING/ running.sh // // # Call script onpass.sh any time status goes to PASS // PASS/ onpass.sh // ----------------- // // Scripts called will have; test-id test-rundir trigger test-name item-path state status event-time, added to the commandline. // // HINT // // To start an xterm (useful for debugging), use a command line like the following: // // ----------------- // [triggers] // COMPLETED/ xterm -e bash -s -- // ----------------- // // NOTE: There is a trailing space after the -- // // There are a number of environment variables available to the trigger script // but since triggers can be called in various contexts not all variables are // available at all times. The trigger script should check for the variable and // fail gracefully if it doesn't exist. // // .Environment variables visible to the trigger script // [width="90%",cols="^,2m",frame="topbot",options="header"] // |====================== // |Variable | Purpose // | MT_TEST_RUN_DIR | The directory where Megatest ran this test // | MT_CMDINFO | Encoded command data for the test // | MT_DEBUG_MODE | Used to pass the debug mode to nested calls to Megatest // | MT_RUN_AREA_HOME | Megatest home area // | MT_TESTSUITENAME | The name of this testsuite or area // | MT_TEST_NAME | The name of this test // | MT_ITEM_INFO | The variable and values for the test item // | MT_MEGATEST | Which Megatest binary is being used by this area // | MT_TARGET | The target variable values, separated by '/' // | MT_LINKTREE | The base of the link tree where all run tests can be found // | MT_ITEMPATH | The values of the item path variables, separated by '/' // | MT_RUNNAME | The name of the run // |====================== // // // Override the Toplevel HTML File // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Megatest generates a simple html file summary for top level tests of // iterated tests. The generation can be overridden. NOTE: the output of // the script is captured from stdout to create the html. // // // .For test "runfirst" override the toplevel generation with a script "mysummary.sh" // ----------------- // # Override the rollup for specific tests // [testrollup] // runfirst mysummary.sh // ----------------- // // Archiving Setup // --------------- // // In megatest.config add the following sections: // // .megatest.config // -------------- // [archive] // # where to get bup executable // # bup /path/to/bup // // [archive-disks] // // # Archives will be organised under these paths like this: // # <testsuite>/<creationdate> // # Within the archive the data is structured like this: // # <target>/<runname>/<test>/ // archive0 /mfs/myarchive-data/adisk1 // -------------- // // Environment Variables // --------------------- // // It is often necessary to capture and or manipulate environment // variables. Megatest has some facilities built in to help. // // Capture variables // ~~~~~~~~~~~~~~~~~ // // .Commands // ------------------------------ // # capture the current enviroment into a db called envdat.db under // # the context "before" // megatest -envcap before // // # capture the current environment into a db called startup.db with // # context "after" // megatest -envcap after startup.db // // # write the diff from before to after // megatest -envdelta before-after -dumpmode bash // ------------------------------ // // Dump modes include bash, csh and config. You can include config data // into megatest.config, runconfigs.config and testconfig files. This is // useful for capturing a complex environment in a special-purpose test // and then utilizing that environment in downstream tests. // // .Example of generating and using config data // ------------------------------ // megatest -envcap original // # do some stuff here // megatest -envcap munged // megatest -envdelta original-munged -dumpmode ini -o modified.config // ------------------------------ // // Then in runconfigs.config // // .Example of using modified.config in a testconfig // ------------------------------ // [pre-launch-env-vars] // [include modified.config] // ------------------------------ // // Managing Old Runs // ----------------- // // It is often desired to keep some older runs around but this must be balanced with the costs of disk space. // // . Use -remove-keep // . Use -archive (can also be done from the -remove-keep interface) // . use -remove-runs with -keep-records // // .For each target, remove all runs but the most recent 3 if they are over 1 week old // --------------------- // # use -precmd 'sleep 5;nbfake' to limit overloading the host computer but to allow the removes to run in parallel. // megatest -actions print,remove-runs -remove-keep 3 -target %/%/%/% -runname % -age 1w -precmd 'sleep 5;nbfake'" // --------------------- // // Nested Runs // ----------- // // A Megatest test can run a full Megatest run in either the same // Megatest area or in another area. This is a powerful way of chaining // complex suites of tests and or actions. // // If you are not using the current area you can use ezsteps to retrieve // and setup the sub-Megatest run area. // // In the testconfig: // --------------- // [subrun] // // # Required: wait for the run or just launch it // # if no then the run will be an automatic PASS irrespective of the actual result // run-wait yes|no // // # Optional: where to execute the run. Default is the current runarea // run-area /some/path/to/megatest/area // // # Optional: method to use to determine pass/fail status of the run // # auto (default) - roll up the net state/status of the sub-run // # logpro - use the provided logpro rules, happens automatically if there is a logpro section // # passfail auto|logpro // # Example of logpro: // passfail logpro // // # Optional: // logpro ;; if this section exists then logpro is used to determine pass/fail // (expect:required in "LogFileBody" >= 1 "At least one pass" #/PASS/) // (expect:error in "LogFileBody" = 0 "No FAILs allowed" #/FAIL/) // // # Optional: target translator, default is to use the parent target // target #{shell somescript.sh} // // # Optional: runname translator/generator, default is to use the parent runname // run-name #{somescript.sh} // // # Optional: testpatt spec, default is to first look for TESTPATT spec from runconfigs unless there is a contour spec // test-patt %/item1,test2 // // # Optional: contour spec, use the named contour from the megatest.config contour spec // contour contourname ### NOTE: Not implemented yet! Let us know if you need this feature. // // # Optional: mode-patt, use this spec for testpatt from runconfigs // mode-patt TESTPATT // // # Optional: tag-expr, use this tag-expr to select tests // tag-expr quick // // # Optional: (not yet implemented, remove-runs is always propagated at this time), propagate these actions from the parent // # test // # Note// default is % for all // propagate remove-runs archive ... // // --------------- // // Programming API // --------------- // // These routines can be called from the megatest repl. // // .API Keys Related Calls // [width="70%",cols="^,2m,2m,2m",frame="topbot",options="header,footer"] // |====================== // |API Call | Purpose comments | Returns | Comments // |(rmt:get-keys run-id) | | ( key1 key2 ... ) | // | (rmt:get-key-val-pairs run-id) | | #t=success/#f=fail | Works only if the server is still reachable // |====================== // // // :numbered!: |