Overview
Comment: | Added more flexible/powerful job launching control. Allows granular to the test/itempath dispatching of jobs |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
ad4b12b5f3176e49440ca89e8a66ecf0 |
User & Date: | matt on 2015-07-12 22:36:05 |
Other Links: | branch diff | manifest | tags |
Context
2015-07-12
| ||
22:53 | Tidy up manual a bit check-in: a42c267b01 user: matt tags: v1.60 | |
22:36 | Merged v1.60 dev branch to trunk check-in: e18bd60653 user: matt tags: trunk | |
22:36 | Added more flexible/powerful job launching control. Allows granular to the test/itempath dispatching of jobs check-in: ad4b12b5f3 user: matt tags: v1.60 | |
2015-07-08
| ||
23:34 | Added TESTPATT in runconfigs test to release suite. Got TESTPATT working correctly check-in: 5551da927c user: matt tags: v1.60 | |
Changes
Modified NOTES from [8d1d854887] to [fdf26c3763].
1 2 3 4 5 6 7 | ====================================================================== Try writing to in-memory db and every 2-5 seconds syncing to megatest.db ====================================================================== First, how much time will it take to write back the changes: 1. Get the run table | > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ====================================================================== New way of launching needed to accomodate different target hosttypes for items ====================================================================== [flavors] general ssh #{getbgesthost general} nbgeneral nbjob run JOBCOMMAND -log $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.lgo [hosts] general cubian xena [launchers] envsetup general xor/%/n 4C16G % nbgeneral [jobtools] launcher internal ====================================================================== Try writing to in-memory db and every 2-5 seconds syncing to megatest.db ====================================================================== First, how much time will it take to write back the changes: 1. Get the run table |
︙ | ︙ |
Modified common.scm from [725ee2bc0d] to [62a7dd9755].
︙ | ︙ | |||
948 949 950 951 952 953 954 | ;; get registered dashboards ;; (define (mddb:get-dashboards) (let ((db (mddb:open-db))) (query fetch-column (sql db "SELECT ipaddr || ':' || portnum FROM dashboards;")))) | > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 | ;; get registered dashboards ;; (define (mddb:get-dashboards) (let ((db (mddb:open-db))) (query fetch-column (sql db "SELECT ipaddr || ':' || portnum FROM dashboards;")))) ;;====================================================================== ;; T E S T L A U N C H I N G P E R I T E M W I T H H O S T T Y P E S ;;====================================================================== ;; ;; [host-types] ;; general ssh #{getbgesthost general} ;; nbgeneral nbjob run JOBCOMMAND -log $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.lgo ;; ;; [hosts] ;; general cubian xena ;; ;; [launchers] ;; envsetup general ;; xor/%/n 4C16G ;; % nbgeneral ;; ;; [jobtools] ;; launcher bsub ;; # if defined and not "no" flexi-launcher will bypass launcher unless there is no ;; # match. ;; flexi-launcher yes (define (common:get-launcher configdat testname itempath) (let ((fallback-launcher (configf:lookup configdat "jobtools" "launcher"))) (if (and (configf:lookup configdat "jobtools" "flexi-launcher") ;; overrides launcher (not (equal? (configf:lookup configdat "jobtools" "flexi-launcher") "no"))) (let* ((launchers (hash-table-ref/default configdat "launchers" '()))) (if (null? launchers) fallback-launcher (let loop ((hed (car launchers)) (tal (cdr launchers))) (let ((patt (car hed)) (host-type (cadr hed))) (if (tests:match patt testname itempath) (begin (debug:print-info 0 "Have flexi-launcher match for " testname "/" itempath " = " host-type) (let ((launcher (configf:lookup configdat "host-types" host-type))) (if launcher launcher (begin (debug:print-info 0 "WARNING: no launcher found for host-type " host-type) (if (null? tal) fallback-launcher (loop (car tal)(cdr tal))))))) ;; no match, try again (if (null? tal) fallback-launcher (loop (car tal)(cdr tal)))))))) fallback-launcher))) |
Modified docs/manual/howto.txt from [d044c3efa0] to [47a69b4c15].
︙ | ︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ---------------- Hint: You can browse the archive using bup commands directly. ---------------- bup -d /path/to/bup/archive ftp ---------------- Tricks ------ This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest. | > > > > > > > > > > > > > > > > > > > > > > > > | 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 | ---------------- Hint: You can browse the archive using bup commands directly. ---------------- bup -d /path/to/bup/archive ftp ---------------- Submit jobs to Host Types based on Test Name -------------------------------------------- .In megatest.config ------------------------ [host-types] general ssh #{getbgesthost general} nbgeneral nbjob run JOBCOMMAND -log $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.lgo [hosts] general cubian xena [launchers] envsetup general xor/%/n 4C16G % nbgeneral [jobtools] launcher bsub # if defined and not "no" flexi-launcher will bypass launcher unless there is no # match. flexi-launcher yes ------------------------ Tricks ------ This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest. |
︙ | ︙ |
Modified docs/manual/megatest_manual.html from [1fcc35d329] to [c1e091c8e4].
︙ | ︙ | |||
958 959 960 961 962 963 964 965 966 967 968 969 970 971 | <div class="paragraph"><p>Hint: You can browse the archive using bup commands directly.</p></div> <div class="listingblock"> <div class="content monospaced"> <pre>bup -d /path/to/bup/archive ftp</pre> </div></div> </div> </div> </div> <div class="sect1"> <h2 id="_tricks">Tricks</h2> <div class="sectionbody"> <div class="paragraph"><p>This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest.</p></div> </div> | > > > > > > > > > > > > > > > > > > > > > > > > > > | 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 | <div class="paragraph"><p>Hint: You can browse the archive using bup commands directly.</p></div> <div class="listingblock"> <div class="content monospaced"> <pre>bup -d /path/to/bup/archive ftp</pre> </div></div> </div> </div> </div> <div class="sect1"> <h2 id="_submit_jobs_to_host_types_based_on_test_name">Submit jobs to Host Types based on Test Name</h2> <div class="sectionbody"> <div class="listingblock"> <div class="title">In megatest.config</div> <div class="content monospaced"> <pre>[host-types] general ssh #{getbgesthost general} nbgeneral nbjob run JOBCOMMAND -log $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.lgo [hosts] general cubian xena [launchers] envsetup general xor/%/n 4C16G % nbgeneral [jobtools] launcher bsub # if defined and not "no" flexi-launcher will bypass launcher unless there is no # match. flexi-launcher yes</pre> </div></div> </div> </div> <div class="sect1"> <h2 id="_tricks">Tricks</h2> <div class="sectionbody"> <div class="paragraph"><p>This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest.</p></div> </div> |
︙ | ︙ | |||
1067 1068 1069 1070 1071 1072 1073 | sudo netstat -tulpn</pre> </div></div> </div> </div> </div> <h1 id="_reference">Reference</h1> <div class="sect1"> | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | sudo netstat -tulpn</pre> </div></div> </div> </div> </div> <h1 id="_reference">Reference</h1> <div class="sect1"> <h2 id="_megatest_config_file_settings">Megatest Config File Settings</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_trim_trailing_spaces">Trim trailing spaces</h3> <div class="listingblock"> <div class="content monospaced"> <pre>[configf:settings trim-trailing-spaces yes]</pre> </div></div> </div> </div> </div> <div class="sect1"> <h2 id="_submit_jobs_to_host_types_based_on_test_name_2">Submit jobs to Host Types based on Test Name</h2> <div class="sectionbody"> <div class="listingblock"> <div class="title">In megatest.config</div> <div class="content monospaced"> <pre>[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 # match. flexi-launcher yes</pre> </div></div> <div class="sect2"> <h3 id="_host_types">host-types</h3> <div class="paragraph"><p>List of host types and the commandline to run a job on that host type.</p></div> <div class="listingblock"> <div class="title">host-type ⇒ launch command</div> <div class="content monospaced"> <pre>general nbfake</pre> </div></div> </div> <div class="sect2"> <h3 id="_launchers">launchers</h3> <div class="listingblock"> <div class="title">test/itempath ⇒ host-type</div> <div class="content monospaced"> <pre>runfirst/sum% remote</pre> </div></div> </div> </div> </div> <div class="sect1"> <h2 id="_the_testconfig_file">The testconfig File</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_setup_section">Setup section</h3> |
︙ | ︙ |
Modified docs/manual/reference.txt from [9d0025f2e1] to [c49419698a].
1 2 3 4 | Reference ========= | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | Reference ========= Megatest Config File Settings ----------------------------- Trim trailing spaces ~~~~~~~~~~~~~~~~~~~~ ------------------ [configf:settings trim-trailing-spaces yes] ------------------ 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 # 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 ------------ The testconfig File ------------------- Setup section ~~~~~~~~~~~~~ |
︙ | ︙ |
Modified launch.scm from [e8ae5ca55a] to [d9bf1bd69d].
︙ | ︙ | |||
794 795 796 797 798 799 800 | )) (let* ((useshell (let ((ush (config-lookup *configdat* "jobtools" "useshell"))) (if ush (if (equal? ush "no") ;; must use "no" to NOT use shell #f ush) #t))) ;; default is yes | < | 794 795 796 797 798 799 800 801 802 803 804 805 806 807 | )) (let* ((useshell (let ((ush (config-lookup *configdat* "jobtools" "useshell"))) (if ush (if (equal? ush "no") ;; must use "no" to NOT use shell #f ush) #t))) ;; default is yes (runscript (config-lookup test-conf "setup" "runscript")) (ezsteps (> (length (hash-table-ref/default test-conf "ezsteps" '())) 0)) ;; don't send all the steps, could be big (diskspace (config-lookup test-conf "requirements" "diskspace")) (memory (config-lookup test-conf "requirements" "memory")) (hosts (config-lookup *configdat* "jobtools" "workhosts")) (remote-megatest (config-lookup *configdat* "setup" "executable")) (run-time-limit (or (configf:lookup test-conf "requirements" "runtimelim") |
︙ | ︙ | |||
816 817 818 819 820 821 822 | (exe (pathname-strip-directory lm))) (conc (if dir (conc dir "/") "") (case (string->symbol exe) ((dboard) "../megatest") ((mtest) "../megatest") ((dashboard) "megatest") (else exe))))) | | > | 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | (exe (pathname-strip-directory lm))) (conc (if dir (conc dir "/") "") (case (string->symbol exe) ((dboard) "../megatest") ((mtest) "../megatest") ((dashboard) "megatest") (else exe))))) (item-path (item-list->path itemdat)) (launcher (common:get-launcher *configdat* test-name item-path)) ;; (config-lookup *configdat* "jobtools" "launcher")) (test-sig (conc test-name ":" item-path)) ;; (item-list->path itemdat))) ;; test-path is the full path including the item-path (work-area #f) (toptest-work-area #f) ;; for iterated tests the top test contains data relevant for all (diskpath #f) (cmdparms #f) (fullcmd #f) ;; (define a (with-output-to-string (lambda ()(write x)))) (mt-bindir-path #f) |
︙ | ︙ |
Modified tests/fullrun/megatest.config from [883d34808e] to [7fbae1ffea].
︙ | ︙ | |||
255 256 257 258 259 260 261 262 | VAL1 Foo VAL2 ==>#{get test VAL1}Bar<== no spaces between Foo and Bar to pass ltest #{scheme (case (string->symbol (conc (getenv "datapath"))) \ ((none) "nbfake") \ ((openlava) "bsub") \ (else "sleeprunner"))} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | VAL1 Foo VAL2 ==>#{get test VAL1}Bar<== no spaces between Foo and Bar to pass ltest #{scheme (case (string->symbol (conc (getenv "datapath"))) \ ((none) "nbfake") \ ((openlava) "bsub") \ (else "sleeprunner"))} #================================================================ # Flexi-launcher #================================================================ # # [host-types] # general ssh #{getbgesthost general} # nbgeneral nbjob run JOBCOMMAND -log $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.lgo # # [hosts] # general cubian xena # # [launchers] # envsetup general # xor/%/n 4C16G # % nbgeneral # # [jobtools] # launcher bsub # # if defined and not "no" flexi-launcher will bypass launcher unless there is no # # match. # flexi-launcher yes [jobtools] flexi-launcher yes [host-types] general nbfake remote bsub [launchers] runfirst/sum% remote |