Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -66,11 +66,12 @@ delete-test-records delete-old-deleted-test-records test-set-status-state test-set-top-process-pid roll-up-pass-fail-counts - update-fail-pass-counts + update-pass-fail-counts + top-test-set-per-pf-counts ;; (db:top-test-set-per-pf-counts (db:get-db *db* 5) 5 "runfirst") ;; RUNS register-run set-tests-state-status delete-run @@ -133,10 +134,11 @@ ((delete-old-deleted-test-records) (apply db:delete-old-deleted-test-records dbstruct params)) ((test-set-status-state) (apply db:test-set-status-state dbstruct params)) ((test-set-top-process-pid) (apply db:test-set-top-process-pid dbstruct params)) ((roll-up-pass-fail-counts) (apply db:roll-up-pass-fail-counts dbstruct params)) ((update-pass-fail-counts) (apply db:general-call dbstruct 'update-pass-fail-counts params)) + ((top-test-set-per-pf-counts) (apply db:top-test-set-per-pf-counts dbstruct params)) ((test-set-archive-block-id) (apply db:test-set-archive-block-id dbstruct params)) ;; RUNS ((register-run) (apply db:register-run dbstruct params)) ((set-tests-state-status) (apply db:set-tests-state-status dbstruct params)) Index: archive.scm ================================================================== --- archive.scm +++ archive.scm @@ -7,11 +7,11 @@ ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format md5 message-digest) +(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format md5 message-digest srfi-18) (import (prefix sqlite3 sqlite3:)) (declare (unit archive)) (declare (uses db)) (declare (uses common)) @@ -99,11 +99,11 @@ ;; 1. create the bup dir if not exists ;; 2. start the du of each directory ;; 3. gen index ;; 4. save ;; -(define (archive:run-bup archive-command run-id run-name tests) +(define (archive:run-bup archive-command run-id run-name tests rp-mutex bup-mutex) ;; move the getting of archive space down into the below block so that a single run can ;; allocate as needed should a disk fill up ;; (let* ((min-space (string->number (or (configf:lookup *configdat* "archive" "minspace") "1000"))) (archive-info (archive:allocate-new-archive-block *toppath* (common:get-testsuite-name) min-space)) @@ -136,33 +136,39 @@ (toplevel/children (and (db:test-get-is-toplevel test-dat) (> (rmt:test-toplevel-num-items run-id test-name) 0))) (test-partial-path (conc target "/" run-name "/" (db:test-make-full-name test-name item-path))) ;; note the trailing slash to get the dir inspite of it being a link (test-path (conc linktree "/" test-partial-path)) - (test-physical-path (if (file-exists? test-path) (read-symbolic-link test-path #t) #f)) + (mutex-lock! rp-mutex) + (test-physical-path (if (file-exists? test-path) + (common:real-path test-path) + #f)) + (mutex-unlock! rp-mutex) (partial-path-index (if test-physical-path (substring-index test-partial-path test-physical-path) #f)) (test-base (if (and partial-path-index test-physical-path ) (substring test-physical-path 0 partial-path-index) #f))) - (if (or toplevel/children - (not (file-exists? test-path))) - #f - (begin - (debug:print 0 - "From test-dat=" test-dat " derived the following:\n" - "test-partial-path = " test-partial-path "\n" - "test-path = " test-path "\n" - "test-physical-path = " test-physical-path "\n" - "partial-path-index = " partial-path-index "\n" - "test-base = " test-base) - (hash-table-set! disk-groups test-base (cons test-physical-path (hash-table-ref/default disk-groups test-base '()))) - (hash-table-set! test-groups test-base (cons test-dat (hash-table-ref/default test-groups test-base '()))) - test-path)))) + (cond + (toplevel/children + (debug:print 0 "WARNING: cannot archive " test-name " with id " test-id " as it is a toplevel test with children")) + ((not (file-exists? test-path)) + (debug:print 0 "WARNING: Cannot archive " test-name "/" item-path " as path " test-path " does not exist")) + (else + (debug:print 0 + "From test-dat=" test-dat " derived the following:\n" + "test-partial-path = " test-partial-path "\n" + "test-path = " test-path "\n" + "test-physical-path = " test-physical-path "\n" + "partial-path-index = " partial-path-index "\n" + "test-base = " test-base) + (hash-table-set! disk-groups test-base (cons test-physical-path (hash-table-ref/default disk-groups test-base '()))) + (hash-table-set! test-groups test-base (cons test-dat (hash-table-ref/default test-groups test-base '()))) + test-path)))) tests) ;; for each disk-group (for-each (lambda (disk-group) (debug:print 0 "Processing disk-group " disk-group) @@ -180,15 +186,20 @@ (create-directory archive-dir #t)) (if (not (file-exists? (conc archive-dir "/HEAD"))) (begin ;; replace this with jobrunner stuff enventually (debug:print-info 0 "Init bup in " archive-dir) - (run-n-wait bup-exe params: bup-init-params print-cmd: print-prefix))) + ;; (mutex-lock! bup-mutex) + (run-n-wait bup-exe params: bup-init-params print-cmd: print-prefix) + ;; (mutex-unlock! bup-mutex) + )) (debug:print-info 0 "Indexing data to be archived") + ;; (mutex-lock! bup-mutex) (run-n-wait bup-exe params: bup-index-params print-cmd: print-prefix) (debug:print-info 0 "Archiving data with bup") (run-n-wait bup-exe params: bup-save-params print-cmd: print-prefix) + ;; (mutex-unlock! bup-mutex) (for-each (lambda (test-dat) (let ((test-id (db:test-get-id test-dat)) (run-id (db:test-get-run_id test-dat))) (rmt:test-set-archive-block-id run-id test-id archive-id) @@ -196,11 +207,11 @@ (runs:remove-test-directory test-dat 'archive-remove)))) (hash-table-ref test-groups disk-group)))) (hash-table-keys disk-groups)) #t)) -(define (archive:bup-restore archive-command run-id run-name tests) ;; move the getting of archive space down into the below block so that a single run can +(define (archive:bup-restore archive-command run-id run-name tests rp-mutex bup-mutex) ;; move the getting of archive space down into the below block so that a single run can ;; allocate as needed should a disk fill up ;; (let* ((bup-exe (or (configf:lookup *configdat* "archive" "bup") "bup")) (linktree (configf:lookup *configdat* "setup" "linktree"))) @@ -207,11 +218,11 @@ ;; from the test info bin the path to the test by stem ;; (for-each (lambda (test-dat) ;; When restoring test-dat will initially contain an old and invalid path to the test - (let* ((best-disk (get-best-disk *configdat*)) + (let* ((best-disk (get-best-disk *configdat* #f)) ;; BUG: get the testconfig and use it here. Otherwise data pulled out of archive could end up on the wrong kind of disk. (item-path (db:test-get-item-path test-dat)) (test-name (db:test-get-testname test-dat)) (test-id (db:test-get-id test-dat)) (run-id (db:test-get-run_id test-dat)) (keyvals (rmt:get-key-val-pairs run-id)) @@ -221,12 +232,16 @@ (> (rmt:test-toplevel-num-items run-id test-name) 0))) (test-partial-path (conc target "/" run-name "/" (db:test-make-full-name test-name item-path))) ;; note the trailing slash to get the dir inspite of it being a link (test-path (conc linktree "/" test-partial-path)) ;; if the old path was not deleted then prev-test-physical-path will end up pointing to a real directory - (prev-test-physical-path (if (file-exists? test-path) (read-symbolic-link test-path #t) #f)) - + (mutex-lock! rp-mutex) + (prev-test-physical-path (if (file-exists? test-path) + ;; (read-symbolic-link test-path #t) + (common:real-path test-path) + #f)) + (mutex-unlock! rp-mutex) (new-test-physical-path (conc best-disk "/" test-partial-path)) (archive-block-id (db:test-get-archived test-dat)) (archive-block-info (rmt:test-get-archive-block-info archive-block-id)) (archive-path (if (vector? archive-block-info) (vector-ref archive-block-info 2) ;; look in db.scm for test-get-archive-block-info for the vector record info @@ -266,10 +281,12 @@ (debug:print 0 "ERROR: unable to get data for run-id=" run-id ", test-id=" test-id) (exit 1)))) ;; new-test-path won't work - must use best-disk instead? Nope, new-test-path but tack on /.. (bup-restore-params (list "-d" archive-path "restore" "-C" (conc new-test-path "/..") archive-internal-path))) (debug:print-info 0 "Restoring archived data to " new-test-physical-path " from archive in " archive-path " ... " archive-internal-path) + ;; (mutex-lock! bup-mutex) (run-n-wait bup-exe params: bup-restore-params print-cmd: #f) + ;; (mutex-unlock! bup-mutex) (mt:test-set-state-status-by-id run-id test-id "COMPLETED" #f #f))) (debug:print 0 "ERROR: No archive path in the record for run-id=" run-id " test-id=" test-id)))) (filter vector? tests)))) Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -587,10 +587,30 @@ (let* ((uname-res (cmd-run->list (conc "uname " (if (null? params) "-a" (car params))))) (uname #f)) (if (null? (car uname-res)) "unknown" (caar uname-res)))) + +;; for reasons I don't understand multiple calls to real-path in parallel threads +;; must be protected by mutexes +;; +(define (common:real-path inpath) + ;; (cmd-run-with-stderr->list "readlink" "-f" inpath)) ;; cmd . params) + ;; (let-values + ;; (((inp oup pid) (process "readlink" (list "-f" inpath)))) + ;; (with-input-from-port inp + ;; (let loop ((inl (read-line)) + ;; (res #f)) + ;; (print "inl=" inl) + ;; (if (eof-object? inl) + ;; (begin + ;; (close-input-port inp) + ;; (close-output-port oup) + ;; ;; (process-wait pid) + ;; res) + ;; (loop (read-line) inl)))))) + (with-input-from-pipe (conc "readlink -f " inpath) read-line)) ;;====================================================================== ;; D I S K S P A C E ;;====================================================================== Index: datashare-testing/.sd.config ================================================================== --- datashare-testing/.sd.config +++ datashare-testing/.sd.config @@ -8,11 +8,11 @@ [settings] storage /tmp/#{getenv USER}/datashare/disk1 \ /tmp/#{getenv USER}/datashare/disk2 -basepath #{getenv BASEPATH} +basepath #{scheme (or (getenv "BASEPATH") "/tmp/#{getenv USER}")} [areas] synthesis asic/synthesis verilog asic/verilog customlibs custom/oalibs Index: datashare.scm ================================================================== --- datashare.scm +++ datashare.scm @@ -655,11 +655,11 @@ )))) (define (datashare:gui configdat) (iup:show (iup:dialog - #:title (conc "DataShare dashboard " (current-user-name) ":" (current-directory)) + #:title (conc "DataShare dashboard " (current-user-name) ":" (current-directory)) #:menu (datashare:main-menu) (let* ((tabs (iup:tabs #:tabchangepos-cb (lambda (obj curr prev) (set! *datashare:current-tab-number* curr)) (datashare:publish-view configdat) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1338,15 +1338,15 @@ (db:delay-if-busy dbdat) (for-each (lambda (toptest) (let ((test-name (list-ref toptest 3))) ;; (run-id (list-ref toptest 5))) - (db:top-test-set-per-pf-counts dbdat run-id test-name))) + (db:top-test-set-per-pf-counts dbstruct run-id test-name))) toplevels))) -(define (db:top-test-set-per-pf-counts dbdat run-id test-name) - (db:general-call dbdat 'top-test-set-per-pf-counts (list test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name))) +(define (db:top-test-set-per-pf-counts dbstruct run-id test-name) + (db:general-call (db:get-db dbstruct run-id) 'top-test-set-per-pf-counts (list test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name test-name))) ;; Clean out old junk and vacuum the database ;; ;; Ultimately do something like this: @@ -2156,11 +2156,10 @@ (vector-ref inrec 5) ;; status -1 "" -1 -1 "" "-" (vector-ref inrec 3) ;; item-path -1 "-" "-")) - (define (db:get-tests-for-run-state-status dbstruct run-id testpatt) (let* ((res '()) (tests-match-qry (tests:match->sqlqry testpatt)) (qry (conc "SELECT id,testname,item_path,state,status FROM tests WHERE run_id=? " (if tests-match-qry (conc " AND (" tests-match-qry ") ") "")))) @@ -2243,14 +2242,16 @@ ;; set tests with state currstate and status currstatus to newstate and newstatus ;; use currstate = #f and or currstatus = #f to apply to any state or status respectively ;; WARNING: SQL injection risk. NB// See new but not yet used "faster" version below ;; - ;; AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));"))) - ;;(debug:print 0 "QRY: " qry) - ;; (db:delay-if-busy) - +;; AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));"))) +;; (debug:print 0 "QRY: " qry) +;; (db:delay-if-busy) +;; +;; NB// This call only operates on toplevel tests. Consider replacing it with more general call +;; (define (db:set-tests-state-status dbstruct run-id testnames currstate currstatus newstate newstatus) (for-each (lambda (testname) (let ((qry (conc "UPDATE tests SET state=?,status=? WHERE " (if currstate (conc "state='" currstate "' AND ") "") (if currstatus (conc "status='" currstatus "' AND ") "") @@ -2258,12 +2259,13 @@ (db:with-db dbstruct run-id #t (lambda (db) - (sqlite3:execute db qry newstate newstatus run-id testname) - (mt:process-triggers run-id test-id newstate newstatus) + (let ((test-id (db:get-test-id dbstruct run-id testname ""))) + (sqlite3:execute db qry newstate newstatus run-id testname) + (if test-id (mt:process-triggers run-id test-id newstate newstatus))) )))) testnames)) ;; speed up for common cases with a little logic ;; NB// Ultimately this will be deprecated in deference to mt:test-set-state-status-by-id @@ -2841,11 +2843,11 @@ (define (db:roll-up-pass-fail-counts dbstruct run-id test-name item-path state status) (if (not (equal? item-path "")) (let ((dbdat (db:get-db dbstruct run-id))) ;; (db (db:dbdat-get-db dbdat))) (db:general-call dbdat 'update-pass-fail-counts (list test-name test-name test-name)) - (db:top-test-set-per-pf-counts dbdat run-id test-name)))) + (db:top-test-set-per-pf-counts dbstruct run-id test-name)))) ;; (case (string->symbol status) ;; ((RUNNING) (db:general-call dbdat 'top-test-set-running (list test-name))) ;; ((LAUNCHED) (db:general-call dbdat 'top-test-set (list "LAUNCHED" test-name))) ;; ((ABORT INCOMPLETE) (db:general-call dbdat 'top-test-set (list status test-name)))) @@ -2941,11 +2943,11 @@ SET state=CASE WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND status IN ('INCOMPLETE') - AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'INCOMPLETE' + AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND status NOT IN ('TEN_STRIKES','BLOCKED') AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' @@ -2966,11 +2968,11 @@ AND state IN ('BLOCKED','INCOMPLETE')) > 0 THEN 'FAIL' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND state NOT IN ('DELETED') - AND status = 'ABORT') > 0 THEN 'ABORT' + AND status IN ('INCOMPLETE','ABORT')) > 0 THEN 'ABORT' WHEN (SELECT count(id) FROM tests WHERE testname=? AND item_path != '' AND state NOT IN ('DELETED') AND status = 'AUTO') > 0 THEN 'AUTO' @@ -3264,22 +3266,59 @@ ;; A routine to map itempaths using a itemmap (define (db:compare-itempaths patha pathb itemmap) (debug:print-info 6 "ITEMMAP is " itemmap) (if itemmap - (let* ((mapparts (string-split itemmap)) - (pattern (car mapparts)) - (replacement (if (> (length mapparts) 1) (cadr mapparts) ""))) - (if replacement - (equal? (string-substitute pattern replacement patha) - (string-substitute pattern replacement pathb)) - (equal? (string-substitute pattern "" patha) - (string-substitute pattern "" pathb)))) + (let ((path-b-mapped (db:convert-test-itempath pathb itemmap))) + (debug:print-info 6 "ITEMMAP is " itemmap ", path: " pathb ", mapped path: " path-b-mapped) + (equal? patha pathb)) (equal? patha pathb))) + +;; (let* ((mapparts (string-split itemmap)) +;; (pattern (car mapparts)) +;; (replacement (if (> (length mapparts) 1) (cadr mapparts) ""))) +;; (if replacement +;; (equal? (string-substitute pattern replacement patha) +;; (string-substitute pattern replacement pathb)) +;; (equal? (string-substitute pattern "" patha) +;; (string-substitute pattern "" pathb)))) + +;; A routine to convert test/itempath using a itemmap +(define (db:convert-test-itempath path-in itemmap) + (debug:print-info 6 "ITEMMAP is " itemmap) + (let* ((path-parts (string-split path-in "/")) + (test-name (if (null? path-parts) "" (car path-parts))) + (item-path (string-intersperse (if (null? path-parts) '() (cdr path-parts)) "/"))) + (conc test-name "/" + (db:multi-pattern-apply item-path itemmap)))) + +;; patterns are: +;; "rx1" "replacement1"\n +;; "rx2" "replacement2" +;; etc. +;; +(define (db:multi-pattern-apply item-path itemmap) + (let ((all-patts (string-split itemmap "\n"))) + (if (null? all-patts) + item-path + (let loop ((hed (car all-patts)) + (tal (cdr all-patts)) + (res item-path)) + (let* ((parts (string-split hed)) + (patt (car parts)) + (repl (if (> (length parts) 1)(cadr parts) "")) + (newr (if (and patt repl) + (string-substitute patt repl res) + (begin + (debug:print 0 "WARNING: itemmap has problem \"" itemmap "\", patt: " patt ", repl: " repl) + res)))) + (if (null? tal) + newr + (loop (car tal)(cdr tal) newr))))))) ;; the new prereqs calculation, looks also at itempath if specified -;; all prereqs must be met: +;; all prereqs must be met ;; if prereq test with itempath='' is COMPLETED and PASS, WARN, CHECK, or WAIVED then prereq is met ;; if prereq test with itempath=ref-item-path and COMPLETED with PASS, WARN, CHECK, or WAIVED then prereq is met ;; ;; Note: mode 'normal means that tests must be COMPLETED and ok (i.e. PASS, WARN, CHECK, SKIP or WAIVED) ;; mode 'toplevel means that tests must be COMPLETED only Index: docs/manual/howto.txt ================================================================== --- docs/manual/howto.txt +++ docs/manual/howto.txt @@ -78,11 +78,11 @@ # 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. Limiting your running jobs Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -986,17 +986,13 @@ flexi-launcher yes -
-

Tricks

-
+

Tricks

This section is a compendium of a various useful tricks for debugging, configuring and generally getting the most out of Megatest.

-
-

Limiting your running jobs

The following example will limit a test in the jobgroup "group1" to no more than 10 tests simultaneously.

In your testconfig:

@@ -1138,10 +1134,20 @@
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
+
@@ -1282,10 +1288,16 @@
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

@@ -1310,10 +1322,21 @@

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}
@@ -1555,10 +1578,10 @@

Index: docs/manual/reference.txt ================================================================== --- docs/manual/reference.txt +++ docs/manual/reference.txt @@ -46,10 +46,21 @@ ^^^^^^^^^ .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 +------------------ The testconfig File ------------------- Setup section @@ -195,10 +206,17 @@ ----------------- [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 @@ -223,10 +241,22 @@ # 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} Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -53,20 +53,32 @@ (if enccmd (common:read-encoded-string enccmd) '()))) -(define (launch:runstep ezstep run-id test-id exit-info m tal) - (let* ((stepname (car ezstep)) ;; do stuff to run the step - (stepinfo (cadr ezstep)) - (stepparts (string-match (regexp "^(\\{([^\\}]*)\\}\\s*|)(.*)$") stepinfo)) - (stepparms (list-ref stepparts 2)) ;; for future use, {VAR=1,2,3}, run step for each - (stepcmd (list-ref stepparts 3)) - (script "") ; "#!/bin/bash\n") ;; yep, we depend on bin/bash FIXME!!!\ - (logpro-file (conc stepname ".logpro")) - (html-file (conc stepname ".html")) - (logpro-used (file-exists? logpro-file))) +(define (launch:runstep ezstep run-id test-id exit-info m tal testconfig) + (let* ((stepname (car ezstep)) ;; do stuff to run the step + (stepinfo (cadr ezstep)) + (stepparts (string-match (regexp "^(\\{([^\\}]*)\\}\\s*|)(.*)$") stepinfo)) + (stepparms (list-ref stepparts 2)) ;; for future use, {VAR=1,2,3}, run step for each + (stepcmd (list-ref stepparts 3)) + (script "") ; "#!/bin/bash\n") ;; yep, we depend on bin/bash FIXME!!!\ + (logpro-file (conc stepname ".logpro")) + (html-file (conc stepname ".html")) + (tconfig-logpro (configf:lookup testconfig "logpro" stepname)) + (logpro-used (file-exists? logpro-file))) + + (if (and tconfig-logpro + (not logpro-used)) ;; no logpro file found but have a defn in the testconfig + (begin + (with-output-to-file logpro-file + (lambda () + (print ";; logpro file extracted from testconfig\n" + ";;") + (print tconfig-logpro))) + (set! logpro-used #t))) + ;; NB// can safely assume we are in test-area directory (debug:print 4 "ezsteps:\n stepname: " stepname " stepinfo: " stepinfo " stepparts: " stepparts " stepparms: " stepparms " stepcmd: " stepcmd) ;; ;; first source the previous environment @@ -358,11 +370,11 @@ (let loop ((ezstep (car ezstepslst)) (tal (cdr ezstepslst)) (prevstep #f)) ;; check exit-info (vector-ref exit-info 1) (if (vector-ref exit-info 1) - (let ((logpro-used (launch:runstep ezstep run-id test-id exit-info m tal))) + (let ((logpro-used (launch:runstep ezstep run-id test-id exit-info m tal testconfig))) (if (and (steprun-good? logpro-used (vector-ref exit-info 2)) (not (null? tal))) (loop (car tal) (cdr tal) stepname))) (debug:print 4 "WARNING: a prior step failed, stopping at " ezstep)))))))) (monitorjob (lambda () @@ -478,11 +490,12 @@ )) ;; for automated creation of the rollup html file this is a good place... ;; (if (and (not (equal? item-path "")) ;; (< (random (rmt:get-count-tests-running-for-testname run-id test-name)) 5)) (tests:summarize-items run-id test-id test-name #f) - (tests:summarize-test run-id test-id)) ;; don't force - just update if no + (tests:summarize-test run-id test-id) ;; don't force - just update if no + ) (mutex-unlock! m) (debug:print 2 "Output from running " fullrunscript ", pid " (vector-ref exit-info 0) " in work area " work-area ":\n====\n exit code " (vector-ref exit-info 2) "\n" "====\n") (if (not (vector-ref exit-info 1)) (exit 4))))))) @@ -497,11 +510,11 @@ (begin (set! *configinfo* (or (if (get-environment-variable "MT_CMDINFO") ;; we are inside a test - do not reprocess configs (let ((alistconfig (conc (get-environment-variable "MT_LINKTREE") "/" (get-environment-variable "MT_TARGET") "/" (get-environment-variable "MT_RUNNAME") "/" - ".megatest.cfg"))) + ".megatest.cfg-" megatest-version "-" megatest-fossil-hash))) (if (file-exists? alistconfig) (list (configf:read-alist alistconfig) (get-environment-variable "MT_RUN_AREA_HOME")) #f)) #f) ;; no config cached - give up @@ -576,18 +589,19 @@ (create-directory fulldir #t)) ;; need to protect with exception handler (if (and target runname (file-exists? fulldir)) (let ((tmpfile (conc fulldir "/.megatest.cfg." (current-seconds))) - (targfile (conc fulldir "/.megatest.cfg"))) + (targfile (conc fulldir "/.megatest.cfg-" megatest-version "-" megatest-fossil-hash))) (debug:print-info 0 "Caching megatest.config in " fulldir "/.megatest.cfg") (configf:write-alist *configdat* tmpfile) (system (conc "ln -sf " tmpfile " " targfile)) ))))))) -(define (get-best-disk confdat) - (let* ((disks (hash-table-ref/default confdat "disks" #f)) +(define (get-best-disk confdat testconfig) + (let* ((disks (or (and testconfig (hash-table-ref/default testconfig "disks" #f)) + (hash-table-ref/default confdat "disks" #f))) (minspace (let ((m (configf:lookup confdat "setup" "minspace"))) (string->number (or m "10000"))))) (if disks (let ((res (common:get-disk-with-most-free-space disks minspace))) ;; min size of 1000, seems tad dumb (if res @@ -850,11 +864,11 @@ ;; prevent overlapping actions - set to LAUNCHED as early as possible ;; (tests:test-set-status! run-id test-id "LAUNCHED" "n/a" #f #f) ;; (if launch-results launch-results "FAILED")) (rmt:roll-up-pass-fail-counts run-id test-name item-path #f "LAUNCHED") - (set! diskpath (get-best-disk *configdat*)) + (set! diskpath (get-best-disk *configdat* test-conf)) (if diskpath (let ((dat (create-work-area run-id run-info keyvals test-id test-path diskpath test-name itemdat))) (set! work-area (car dat)) (set! toptest-work-area (cadr dat)) (debug:print-info 2 "Using work area " work-area)) Index: megatest-version.scm ================================================================== --- megatest-version.scm +++ megatest-version.scm @@ -1,7 +1,7 @@ ;; Always use two or four digit decimal ;; 1.01, 1.02...1.10,1.11,1,1101 ... 1.99,2.00.. (declare (unit megatest-version)) -(define megatest-version 1.6019) +(define megatest-version 1.6023) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -788,11 +788,12 @@ (let ((data (full-runconfigs-read))) ;; keep this one local (cond ((and (args:get-arg "-section") (args:get-arg "-var")) - (let ((val (configf:lookup data (args:get-arg "-section")(args:get-arg "-var")))) + (let ((val (or (configf:lookup data (args:get-arg "-section")(args:get-arg "-var")) + (configf:lookup data "default" (args:get-arg "-var"))))) (if val (print val)))) ((not (args:get-arg "-dumpmode")) (pp (hash-table->alist data))) ((string=? (args:get-arg "-dumpmode") "json") (json-write data)) Index: multi-dboard.scm ================================================================== --- multi-dboard.scm +++ multi-dboard.scm @@ -68,10 +68,11 @@ (define *runremote* #f) (define *windows* (make-hash-table)) (define *changed-main* (make-hash-table)) ;; set path/... => #t (define *changed-mutex* (make-mutex)) ;; use for all incoming change requests +(define *searchpatts* (make-hash-table)) (debug:setup) (define *tim* (iup:timer)) (define *ord* #f) @@ -773,27 +774,26 @@ ))) (hash-table-set! *windows* window-id data) (iup:show (dashboard:main-panel data window-id)) (iup:main-loop))) - - ;; ease debugging by loading ~/.dashboardrc (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.dashboardrc"))) (if (file-exists? debugcontrolf) (load debugcontrolf))) -(let-values - (((con port)(dboard:server-start #f))) - (let ((portnum (if (string? port)(string->number port) port))) - ;; got here, monitor/dashboard was started - (mddb:register-dashboard portnum) - (thread-start! (make-thread (lambda ()(dboard:server-service con portnum)) "server service")) - (thread-start! (make-thread (lambda () - (let loop () - (dboard:general-updater con portnum) - (thread-sleep! 1) - (loop))) "general updater")) - (dboard:make-window 0) - (mddb:unregister-dashboard (get-host-name) portnum) - (dboard:server-close con port))) +(define (main) + (let-values + (((con port)(dboard:server-start #f))) + (let ((portnum (if (string? port)(string->number port) port))) + ;; got here, monitor/dashboard was started + (mddb:register-dashboard portnum) + (thread-start! (make-thread (lambda ()(dboard:server-service con portnum)) "server service")) + (thread-start! (make-thread (lambda () + (let loop () + (dboard:general-updater con portnum) + (thread-sleep! 1) + (loop))) "general updater")) + (dboard:make-window 0) + (mddb:unregister-dashboard (get-host-name) portnum) + (dboard:server-close con port)))) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -529,10 +529,13 @@ (rmt:send-receive 'roll-up-pass-fail-counts run-id (list run-id test-name item-path state status))) (define (rmt:update-pass-fail-counts run-id test-name) (rmt:general-call 'update-pass-fail-counts run-id (list run-id test-name run-id test-name run-id test-name))) +(define (rmt:top-test-set-per-pf-counts run-id test-name) + (rmt:general-call 'top-test-set-per-pf-counts run-id (list run-id test-name))) + ;;====================================================================== ;; R U N S ;;====================================================================== (define (rmt:get-run-info run-id) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -222,12 +222,19 @@ (all-tests-registry #f) ;; (tests:get-all)) ;; (tests:get-valid-tests (make-hash-table) test-search-path)) ;; all valid tests to check waiton names (all-test-names #f) ;; (hash-table-keys all-tests-registry)) (test-names #f) ;; (tests:filter-test-names all-test-names test-patts)) (required-tests #f) ;; Put fully qualified test/testpath names in this list to be done (task-key (conc (hash-table->alist flags) " " (get-host-name) " " (current-process-id))) - (tdbdat (tasks:open-db))) + (tdbdat (tasks:open-db)) + (config-reruns (let ((x (configf:lookup *configdat* "setup" "reruns"))) + (if x (string->number x) #f)))) + ;; override the number of reruns from the configs + (if (and config-reruns + (> run-count config-reruns)) + (set! run-count config-reruns)) + (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10)) (let ((sighand (lambda (signum) ;; (signal-mask! signum) ;; to mask or not? seems to cause issues in exiting (if (eq? signum signal/stop) @@ -394,16 +401,17 @@ #f ;; spare - used for item-path ))) (for-each (lambda (waiton) (if (and waiton (not (member waiton test-names))) - (let* ((new-test-patts (tests:extend-test-patts test-patts hed waiton #f)) - (waiton-record (hash-table-ref/default test-records waiton #f)) + (let* ((waiton-record (hash-table-ref/default test-records waiton #f)) (waiton-tconfig (if waiton-record (vector-ref waiton-record 1) #f)) (waiton-itemized (and waiton-tconfig (or (hash-table-ref/default waiton-tconfig "items" #f) - (hash-table-ref/default waiton-tconfig "itemstable" #f))))) + (hash-table-ref/default waiton-tconfig "itemstable" #f)))) + (itemmap (configf:lookup config "requirements" "itemmap")) + (new-test-patts (tests:extend-test-patts test-patts hed waiton itemmap))) (debug:print-info 0 "Test " waiton " has " (if waiton-record "a" "no") " waiton-record and" (if waiton-itemized " " " no ") "items") ;; need to account for test-patt here, if I am test "a", selected with a test-patt of "hed/b%" ;; and we are waiting on "waiton" we need to add "waiton/,waiton/b%" to test-patt ;; is this satisfied by merely appending "/" to the waiton name added to the list? ;; @@ -422,11 +430,12 @@ (debug:print-info 0 "New test patts: " new-test-patts ", prev test patts: " test-patts) (set! required-tests (cons (conc waiton "/") required-tests)) (set! test-patts new-test-patts)) (begin (debug:print-info 0 "Adding non-itemized test " waiton " to required-tests") - (set! required-tests (cons waiton required-tests))))) + (set! required-tests (cons waiton required-tests)) + (set! test-patts new-test-patts)))) (begin (debug:print-info 0 "No testconfig info yet for " waiton ", setting up to re-process it") (set! tal (append (cons waiton tal)(list hed))))) ;; (cons (conc waiton "/") required-tests)) ;; NOPE: didn't work. required needs to be plain test names. Try tacking on to test-patts @@ -477,11 +486,11 @@ (thread-start! th2) (thread-join! th1) (set! keep-going #f) (thread-join! th2) ;; if run-count > 0 call, set -preclean and -rerun STUCK/DEAD - (if (> run-count 0) + (if (> run-count 0) ;; handle reruns (begin (if (not (hash-table-ref/default flags "-preclean" #f)) (hash-table-set! flags "-preclean" #t)) (if (not (hash-table-ref/default flags "-rerun" #f)) (hash-table-set! flags "-rerun" "STUCK/DEAD,n/a,ZERO_ITEMS")) @@ -1523,11 +1532,13 @@ (rundat (mt:get-runs-by-patt keys runnamepatt target)) (header (vector-ref rundat 0)) (runs (vector-ref rundat 1)) (states (if state (string-split state ",") '())) (statuses (if status (string-split status ",") '())) - (state-status (if (string? new-state-status) (string-split new-state-status ",") '(#f #f)))) + (state-status (if (string? new-state-status) (string-split new-state-status ",") '(#f #f))) + (rp-mutex (make-mutex)) + (bup-mutex (make-mutex))) (debug:print-info 4 "runs:operate-on => Header: " header " action: " action " new-state-status: " new-state-status) (if (> 2 (length state-status)) (begin (debug:print 0 "ERROR: the parameter to -set-state-status is a comma delimited string. E.g. COMPLETED,FAIL") (exit))) @@ -1556,13 +1567,13 @@ (begin (case action ((remove-runs) (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10)) ;; seek and kill in flight -runtests with % as testpatt here - (if (equal? testpatt "%") - (tasks:kill-runner target run-name) - (debug:print 0 "not attempting to kill any run launcher processes as testpatt is " testpatt)) + ;; (if (equal? testpatt "%") + (tasks:kill-runner target run-name testpatt) + ;; (debug:print 0 "not attempting to kill any run launcher processes as testpatt is " testpatt)) (debug:print 1 "Removing tests for run: " runkey " " (db:get-value-by-header run header "runname"))) ((set-state-status) (if (tasks:need-server run-id)(tasks:start-and-wait-for-server tdbdat run-id 10)) (debug:print 1 "Modifying state and staus for tests for run: " runkey " " (db:get-value-by-header run header "runname"))) ((print-run) @@ -1572,12 +1583,12 @@ (debug:print 1 "Waiting for run " runkey ", run=" runnamepatt " to complete")) ((archive) (debug:print 1 "Archiving/restoring (" (args:get-arg "-archive") ") data for run: " runkey " " (db:get-value-by-header run header "runname")) (set! worker-thread (make-thread (lambda () (case (string->symbol (args:get-arg "-archive")) - ((save save-remove keep-html)(archive:run-bup (args:get-arg "-archive") run-id run-name tests)) - ((restore)(archive:bup-restore (args:get-arg "-archive") run-id run-name tests)) + ((save save-remove keep-html)(archive:run-bup (args:get-arg "-archive") run-id run-name tests rp-mutex bup-mutex)) + ((restore)(archive:bup-restore (args:get-arg "-archive") run-id run-name tests rp-mutex bup-mutex)) (else (debug:print 0 "ERROR: unrecognised sub command to -archive. Run \"megatest\" to see help") (exit)))) "archive-bup-thread")) (thread-start! worker-thread)) Index: tasks.scm ================================================================== --- tasks.scm +++ tasks.scm @@ -723,11 +723,10 @@ '() (sqlite3:first-row db "SELECT id,action,owner,state,target,name,testpatt,keylock,params WHERE params LIKE ? AND state LIKE ? AND action LIKE ? AND testpatt LIKE ?;" param-key state-patt action-patt test-patt))))) - (define (tasks:find-task-queue-records dbstruct target run-name test-patt state-patt action-patt) ;; (handle-exceptions ;; exn ;; '() ;; (sqlite3:first-row @@ -744,15 +743,15 @@ ;; kill any runner processes (i.e. processes handling -runtests) that match target/runname ;; ;; do a remote call to get the task queue info but do the killing as self here. ;; -(define (tasks:kill-runner target run-name) - (let ((records (rmt:tasks-find-task-queue-records target run-name "%" "running" "run-tests")) +(define (tasks:kill-runner target run-name testpatt) + (let ((records (rmt:tasks-find-task-queue-records target run-name testpatt "running" "run-tests")) (hostpid-rx (regexp "\\s+(\\w+)\\s+(\\d+)$"))) ;; host pid is at end of param string (if (null? records) - (debug:print 0 "No run launching processes found for " target " / " run-name) + (debug:print 0 "No run launching processes found for " target " / " run-name " with testpatt " (or testpatt "* no testpatt specified! *")) (debug:print 0 "Found " (length records) " run(s) to kill.")) (for-each (lambda (record) (let* ((param-key (list-ref record 8)) (match-dat (string-search hostpid-rx param-key))) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -74,15 +74,25 @@ (tests:match test-patts testname #f)) test-names))) ;; given test-b that is waiting on test-a extend test-patt appropriately ;; +;; genlib/testconfig sim/testconfig +;; genlib/sch sim/sch/cell1 +;; +;; [requirements] [requirements] +;; mode itemwait +;; # trim off the cell to determine what to run for genlib +;; itemmap /.* +;; +;; test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap (define (tests:extend-test-patts test-patt test-b test-a itemmap) (let* ((patts (string-split test-patt ",")) (test-b-len (+ (string-length test-b) 1)) (patts-b (map (lambda (x) - (let ((newpatt (conc test-a "/" (substring x test-b-len (string-length x))))) + (let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x)) + (newpatt (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt))))) ;; (print "in map, x=" x ", newpatt=" newpatt) newpatt)) (filter (lambda (x) (eq? (substring-index (conc test-b "/") x) 0)) patts)))) @@ -350,10 +360,11 @@ (if have-lock (let ((script (configf:lookup *configdat* "testrollup" test-name))) (print "Obtained lock for " outputfilename) ;; (rmt:top-test-set-per-pf-counts run-id test-name) (rmt:roll-up-pass-fail-counts run-id test-name "" #f #f) + (rmt:top-test-set-per-pf-counts run-id test-name) (if script (system (conc script " > " outputfilename " & ")) (tests:generate-html-summary-for-iterated-test run-id test-id test-name outputfilename)) (common:simple-file-release-lock lockf) (change-directory orig-dir) ADDED tests/dep-tests/common.testconfig Index: tests/dep-tests/common.testconfig ================================================================== --- /dev/null +++ tests/dep-tests/common.testconfig @@ -0,0 +1,34 @@ +[ezsteps] +delay sleep $SPEED;echo "Delayed $SPEED seconds" + +# lookup table for waitons +# +[std] +genlib setup +test1 genlib +aggregate test1 +test2 aggregate +results test2 + +# simple removes the challenging "aggregate" dependency between test1 and test2. +# and the itempatt irregularity from genlib -> test1 +# +[simple] +test1 setup +test2 test1 +results test2 + +[test_meta] +author matt +owner matt +description This is a common testconfig shared by all the tests + +[logpro] +delay ;; Delay step logpro + (expect:required in "LogFileBody" > 0 "Delayed message" #/Delayed \d+ seconds/) + +reviewed 09/10/2011, by Matt + +[requirements] +mode itemwait + ADDED tests/dep-tests/common_itemstable.testconfig Index: tests/dep-tests/common_itemstable.testconfig ================================================================== --- /dev/null +++ tests/dep-tests/common_itemstable.testconfig @@ -0,0 +1,4 @@ +[itemstable] +VIEW layout layout layout schematic schematic schematic +CELL ntran ptran diode ntran ptran diode + ADDED tests/dep-tests/megatest.config Index: tests/dep-tests/megatest.config ================================================================== --- /dev/null +++ tests/dep-tests/megatest.config @@ -0,0 +1,67 @@ +[fields] +# this field changes the dep tree +DEPS TEXT + +# this field changes the test run time; 0 .. N or random +SPEED TEXT + +[dashboard] +pre-command xterm -geometry 180x20 -e " +post-command |& tee results.log ;echo Press any key to continue;bash -c 'read -n 1 -s'" & +testsort -event_time + +[misc] +home #{shell readlink -f $MT_RUN_AREA_HOME} +parent #{shell readlink -f $MT_RUN_AREA_HOME/..} + +[setup] +linktree #{get misc parent}/links +max_concurrent_jobs 100000 +# It is possible (but not recommended) to override the rsync command used +# to populate the test directories. For test development the following +# example can be useful +# +testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log + +# or for hard links + +# testcopycmd cp --remove-destination -rlv TEST_SRC_PATH/. TEST_TARG_PATH/. + +# override the logview command +# +logviewer (%MTCMD%) 2> /dev/null > /dev/null + +# override the html viewer launch command +# +# htmlviewercmd firefox -new-window +htmlviewercmd arora + +[env-override] +# MT_XTERM_CMD overrides the terminal command +# MT_XTERM_CMD xterm -bg lightgreen -fg black + +## disks are: +## name host:/path/to/area +## -or- +## name /path/to/area +[disks] +disk0 #{get misc parent}/runs + +#====================================================================== +# Machine flavors +# +# These specify lists of hosts or scripts to use or call for various +# flavors of task. +# +#====================================================================== + +[flavors] + +plain hosts: xena, phoebe +strong command: NBFAKE_HOST=zeus nbfake +arm hosts: cubian + +# Uncomment these to emulate a job queue with a long time (look in bin/sleeprunner for the time) +[jobtools] +launcher nbfake +maxload 2.0 ADDED tests/dep-tests/runconfigs.config Index: tests/dep-tests/runconfigs.config ================================================================== --- /dev/null +++ tests/dep-tests/runconfigs.config @@ -0,0 +1,8 @@ +[default] + +# [DEPS/SPEED] + +[simple/0] + +[std/0] + ADDED tests/dep-tests/tests/aggregate/testconfig Index: tests/dep-tests/tests/aggregate/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/aggregate/testconfig @@ -0,0 +1,4 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[requirements] +waiton #{get #{getenv DEPS} aggregate} ADDED tests/dep-tests/tests/genlib/testconfig Index: tests/dep-tests/tests/genlib/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/genlib/testconfig @@ -0,0 +1,8 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[itemstable] +VIEWTYPE layout schematic + +[requirements] +waiton #{get #{getenv DEPS} genlib} +# itemmap /.* ADDED tests/dep-tests/tests/results/testconfig Index: tests/dep-tests/tests/results/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/results/testconfig @@ -0,0 +1,5 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[requirements] +waiton #{get #{getenv DEPS} results} + ADDED tests/dep-tests/tests/setup/testconfig Index: tests/dep-tests/tests/setup/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/setup/testconfig @@ -0,0 +1,2 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + ADDED tests/dep-tests/tests/test1/testconfig Index: tests/dep-tests/tests/test1/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/test1/testconfig @@ -0,0 +1,11 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig] + +[requirements] +waiton #{get #{getenv DEPS} test1} + +# itemmap maps these items back to previous test +# NB// mapping is in reverse - NOT forwards! +# +itemmap /.* ADDED tests/dep-tests/tests/test2/testconfig Index: tests/dep-tests/tests/test2/testconfig ================================================================== --- /dev/null +++ tests/dep-tests/tests/test2/testconfig @@ -0,0 +1,7 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig] + +[requirements] +waiton #{get #{getenv DEPS} test2} + ADDED tests/dynamic-waiton-example/common.testconfig Index: tests/dynamic-waiton-example/common.testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/common.testconfig @@ -0,0 +1,16 @@ +[ezsteps] +delay sleep $SPEED;echo "Delayed $SPEED seconds" + +[requirements] +#{getenv WAITON_#{getenv MT_TEST_NAME}} + +[test_meta] +author matt +owner matt +description This is a common testconfig shared by all the tests + +[logpro] +delay ;; Delay step logpro + (expect:required in "LogFileBody" > 0 "Delayed message" #/Delayed \d+ seconds/) + +reviewed 09/10/2011, by Matt ADDED tests/dynamic-waiton-example/common_itemstable.testconfig Index: tests/dynamic-waiton-example/common_itemstable.testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/common_itemstable.testconfig @@ -0,0 +1,4 @@ +[itemstable] +VIEW layout layout layout schematic schematic schematic +CELL ntran ptran diode ntran ptran diode + ADDED tests/dynamic-waiton-example/megatest.config Index: tests/dynamic-waiton-example/megatest.config ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/megatest.config @@ -0,0 +1,67 @@ +[fields] +# this field changes the dep tree +DEPS TEXT + +# this field changes the test run time; 0 .. N or random +SPEED TEXT + +[dashboard] +pre-command xterm -geometry 180x20 -e " +post-command |& tee results.log ;echo Press any key to continue;bash -c 'read -n 1 -s'" & +testsort -event_time + +[misc] +home #{shell readlink -f $MT_RUN_AREA_HOME} +parent #{shell readlink -f $MT_RUN_AREA_HOME/..} + +[setup] +linktree #{get misc parent}/links +max_concurrent_jobs 100000 +# It is possible (but not recommended) to override the rsync command used +# to populate the test directories. For test development the following +# example can be useful +# +testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log + +# or for hard links + +# testcopycmd cp --remove-destination -rlv TEST_SRC_PATH/. TEST_TARG_PATH/. + +# override the logview command +# +logviewer (%MTCMD%) 2> /dev/null > /dev/null + +# override the html viewer launch command +# +# htmlviewercmd firefox -new-window +htmlviewercmd arora + +[env-override] +# MT_XTERM_CMD overrides the terminal command +# MT_XTERM_CMD xterm -bg lightgreen -fg black + +## disks are: +## name host:/path/to/area +## -or- +## name /path/to/area +[disks] +disk0 #{get misc parent}/runs + +#====================================================================== +# Machine flavors +# +# These specify lists of hosts or scripts to use or call for various +# flavors of task. +# +#====================================================================== + +[flavors] + +plain hosts: xena, phoebe +strong command: NBFAKE_HOST=zeus nbfake +arm hosts: cubian + +# Uncomment these to emulate a job queue with a long time (look in bin/sleeprunner for the time) +[jobtools] +launcher nbfake +maxload 2.0 ADDED tests/dynamic-waiton-example/runconfigs.config Index: tests/dynamic-waiton-example/runconfigs.config ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/runconfigs.config @@ -0,0 +1,11 @@ +[default] +WAITON_setup +WAITON_genlib waiton setup +WAITON_test1 waiton genlib +WAITON_aggregate waiton test1 +WAITON_test2 waiton aggregate + +# [DEPS/SPEED] + +[std/0] + ADDED tests/dynamic-waiton-example/tests/aggregate/testconfig Index: tests/dynamic-waiton-example/tests/aggregate/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/aggregate/testconfig @@ -0,0 +1,2 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + ADDED tests/dynamic-waiton-example/tests/genlib/testconfig Index: tests/dynamic-waiton-example/tests/genlib/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/genlib/testconfig @@ -0,0 +1,5 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[itemstable] +VIEWTYPE layout schematic + ADDED tests/dynamic-waiton-example/tests/results/testconfig Index: tests/dynamic-waiton-example/tests/results/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/results/testconfig @@ -0,0 +1,2 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + ADDED tests/dynamic-waiton-example/tests/setup/testconfig Index: tests/dynamic-waiton-example/tests/setup/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/setup/testconfig @@ -0,0 +1,2 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + ADDED tests/dynamic-waiton-example/tests/test1/testconfig Index: tests/dynamic-waiton-example/tests/test1/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/test1/testconfig @@ -0,0 +1,3 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig] ADDED tests/dynamic-waiton-example/tests/test2/testconfig Index: tests/dynamic-waiton-example/tests/test2/testconfig ================================================================== --- /dev/null +++ tests/dynamic-waiton-example/tests/test2/testconfig @@ -0,0 +1,3 @@ +[include #{getenv MT_RUN_AREA_HOME}/common.testconfig] + +[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig] Index: tests/fdktestqa/testqa/configs/megatest.def.config ================================================================== --- tests/fdktestqa/testqa/configs/megatest.def.config +++ tests/fdktestqa/testqa/configs/megatest.def.config @@ -2,7 +2,7 @@ [env-override] EXAMPLE_VAR example value # As you run more tests you may need to add additional disks, the names are arbitrary but must be unique [disks] -disk0 #{scheme (nice-path "#{getenv MT_RUN_AREA_HOME}/../simpleruns")} +disk0 #{scheme (create-directory (nice-path "#{getenv MT_RUN_AREA_HOME}/../simpleruns") #t)} Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -16,10 +16,11 @@ testsort -event_time [misc] home #{shell readlink -f $MT_RUN_AREA_HOME} parent #{shell readlink -f $MT_RUN_AREA_HOME/..} +testsuite #{shell basename $MT_RUN_AREA_HOME} [tests-paths] 1 #{get misc parent}/simplerun/tests [setup] @@ -144,11 +145,11 @@ # RUNDEAD [system exit 56] [server] # force use of server always -required yes +# required yes # Use http instead of direct filesystem access transport http # transport fs # transport nmsg @@ -160,20 +161,19 @@ port 9080 # This server will keep running this number of hours after last access. # Three minutes is 0.05 hours # timeout 0.025 -timeout 0.061 +timeout 0.01 # faststart; unless no, start server but proceed with writes until server started -faststart no -# faststart yes +# faststart no +faststart yes # Start server when average query takes longer than this # server-query-threshold 55500 server-query-threshold 1000 -timeout 0.01 # daemonize yes # hostname #{scheme (get-host-name)} ## disks are: @@ -232,19 +232,20 @@ # /// disk0 /tmp/#{getenv USER}/adisk1 # Uncomment these to emulate a job queue with a long time (look in bin/sleeprunner for the time) [jobtools] -# launcher #{ scheme (case (string->symbol (conc (getenv "datapath"))) \ -# ((none) "nbfake") \ -# ((openlava) "bsub") \ -# (else "sleeprunner"))} +launcher #{scheme (case (string->symbol (conc (getenv "datapath"))) \ + ((none) "nbfake") \ + ((openlava) "bsub -o $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.log") \ + ((sleeprunner) "sleeprunner") \ + (else "nbfake"))} # launcher bsub -q priority -o $MT_TEST_RUN_DIR/openlava.log # launcher #{shell if which bsub > /dev/null;then echo bsub -q priority -o openlava.log;else echo sleeprunner;fi} -launcher nbfake +# launcher nbfake [configf:settings trim-trailing-spaces yes] # Override the rollup for specific tests [testrollup] @@ -255,11 +256,11 @@ 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") \ + ((openlava) "bsub -o $MT_LINKTREE/$MT_TARGET/$MT_RUNNAME.$MT_TESTNAME-$MT_ITEM_PATH.log") \ (else "sleeprunner"))} #================================================================ # Flexi-launcher #================================================================ @@ -285,10 +286,12 @@ [jobtools] flexi-launcher yes [host-types] general nbfake -remote bsub +alt #{get jobtools launcher} +local nbfake +remote #{get jobtools launcher} [launchers] runfirst/sum% remote - +% general ADDED tests/fullrun/multi-dboard-load-all.scm Index: tests/fullrun/multi-dboard-load-all.scm ================================================================== --- /dev/null +++ tests/fullrun/multi-dboard-load-all.scm @@ -0,0 +1,13 @@ + +(require-library margs) +(load "../../common.scm") +(load "../../common_records.scm") +(load "../../margs.scm") +(load "../../megatest-version.scm") +(load "../../portlogger.scm") +(load "../../tasks.scm") +(load "../../db.scm") +(load "../../configf.scm") +(load "../../keys.scm") +(load "../../tree.scm") +(load "../../multi-dboard.scm") ADDED tests/fullrun/multi-dboard.sh Index: tests/fullrun/multi-dboard.sh ================================================================== --- /dev/null +++ tests/fullrun/multi-dboard.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +csi -I ../.. multi-dboard-load-all.scm DELETED tests/fullrun/tests/logpro_required_fail/lookittmp.logpro Index: tests/fullrun/tests/logpro_required_fail/lookittmp.logpro ================================================================== --- tests/fullrun/tests/logpro_required_fail/lookittmp.logpro +++ /dev/null @@ -1,8 +0,0 @@ -;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com -;; -;; License GPL. - -(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/) - -;; (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) -;; (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/.*/)) ;; force an error Index: tests/fullrun/tests/logpro_required_fail/testconfig ================================================================== --- tests/fullrun/tests/logpro_required_fail/testconfig +++ tests/fullrun/tests/logpro_required_fail/testconfig @@ -5,8 +5,19 @@ [test_meta] author matt owner bob description This test runs two ezstep, the first of which is expected to fail using a simple logpro file. + +[logpro] +lookittmp ;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com + ;; + ;; License GPL. + ;; + (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/) + ;; + ;; (expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) + ;; (expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/.*/)) ;; force an error + tags logpro reviewed 09/10/2011, by Matt ADDED tests/release/tests/dependencies/simpleresults.logpro Index: tests/release/tests/dependencies/simpleresults.logpro ================================================================== --- /dev/null +++ tests/release/tests/dependencies/simpleresults.logpro @@ -0,0 +1,110 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + +(define logbody "LogFileBody") + +(define pass-specs '( ;; testname num-expected max-runtime + ("setup" 1 20) + ("test1/layout/ptran" 1 20) + ("test1/schematic/ptran" 1 20) + ("test2/layout/ptran" 1 20) + ("test2/schematic/ptran" 1 20) + )) + +(define fail-specs '( ;; testname num-expected max-runtime + )) + +(define warn-specs '()) + +(define nost-specs '( + )) + +(define (check-one-test estate estatus testname count runtime) + (let* ((rxe (regexp (conc "^\\s+Test: " testname "(\\(.*|\\s+)\\s+State: " estate "\\s+Status: " estatus "\\s+Runtime:\\s+(\\d+)s"))) + (msg1 (conc testname " expecting count of " count)) + (msg2 (conc testname " expecting runtime less than " runtime))) + (expect:required in logbody = count msg1 rxe) + ;;(expect:value in logbody count < msg2 rxe) + )) + +;; Special cases +;; +(expect:ignore in logbody >= 0 "db_sync test might not have run" #/Test: db_sync/) +(expect:ignore in logbody >= 0 "all_toplevel may not yet be done" #/Test: all_toplevel/) +(expect:error in logbody = 0 "tests left in RUNNING state" #/State: RUNNING/) +(expect:required in logbody = 1 "priority_2 is KILLED" #/Test: priority_2\s+State: KILLED\s+Status: KILLED/) +(expect:required in logbody = 1 "priority_5 is either PASS or SKIP" #/Test: priority_5\s+State: COMPLETED\s+Status: (SKIP|PASS)/) +(expect:required in logbody = 1 "priority_7 is either PASS or SKIP" #/Test: priority_7\s+State: COMPLETED\s+Status: (SKIP|PASS)/) +(expect:required in logbody = 1 "testxz has 1 NOT_STARTED test" #/Test: testxz\s+State: NOT_STARTED/) +(expect:required in logbody = 1 "no items" #/Test: no_items\s+State: NOT_STARTED\s+Status: ZERO_ITEMS/) +(expect:warning in logbody = 1 "dynamic waiton" #/Test: dynamic_waiton/) +(expect:required in logbody = 29 "blocktestxz has 29 tests" #/Test: blocktestxz/) + +;; General cases +;; +(for-each + (lambda (testdat) + (apply check-one-test "COMPLETED" "PASS" testdat)) + pass-specs) + +(for-each + (lambda (testdat) + (apply check-one-test "COMPLETED" "FAIL" testdat)) + fail-specs) + +(for-each + (lambda (testdat) + (apply check-one-test "COMPLETED" "WARN" testdat)) + warn-specs) + +(for-each + (lambda (testdat) + (apply check-one-test "NOT_STARTED" "PREQ_DISCARDED" testdat)) + nost-specs) + +;; Catch all. +;; +(expect:error in logbody = 0 "Tests not accounted for" #/Test: /) + + +;; ;; define your hooks +;; (hook:first-error "echo \"Error hook activated: #{escaped errmsg}\"") +;; (hook:first-warning "echo \"Got warning: #{escaped warnmsg}\"") +;; (hook:value "echo \"Value hook activated: expected=#{expected}, measured=#{measured}, tolerance=#{tolerance}, message=#{message}\"") +;; +;; ;; first ensure your run at least started +;; ;; +;; (trigger "Init" #/This is a header/) +;; (trigger "InitEnd" #/^\s*$/) +;; (section "Init" "Init" "InitEnd") +;; +;; (trigger "Body" #/^.*$/) ;; anything starts the body +;; ;; (trigger "EndBody" #/This had better never match/) +;; +;; (section "Body" "Body" "EndBody") +;; +;; (trigger "Blah2" #/^begin Blah2/) +;; (trigger "Blah2End" #/^end Blah2/) +;; (section "Blah2" "Blah2" "Blah2End") +;; +;; (expect:required in "Init" = 1 "Header" #/This is a header/) +;; (expect:required in "LogFileBody" > 0 "Something required but not found" #/This is required but not found/) +;; (expect:value in "LogFileBody" 1.9 0.1 "Output voltage" #/Measured voltage output:\s*([\d\.\+\-e]+)v/) +;; (expect:value in "LogFileBody" 0.5 0.1 "Output current" #/Measured output current:\s*([\d\.\+\-e]+)mA/) +;; (expect:value in "LogFileBody" 110e9 2e9 "A big number (first)" #/Freq:\s*([\d\.\+\-e]+)\s+Hz/) +;; (expect:value in "LogFileBody" 110e9 1e9 "A big number (second), hook not called" #/Freq:\s*([\d\.\+\-e]+)Hz/) +;; (expect:value in "LogFileBody" 110e9 1e9 "A big number (never activated)" #/Freq:\s*([\d\.\+\-e]+)zH/) +;; +;; ;; Using match number +;; (expect:value in "LogFileBody" 1.9 0.1 "Time Voltage" #/out: (\d+)\s+(\d+)/ match: 2) +;; +;; ;; Comparison instead of tolerance +;; (expect:value in "LogFileBody" 1.9 > "Time voltage" #/out: (\d+)\s+(\d+)/ match: 2) +;; +;; (expect:ignore in "Blah2" < 99 "FALSE ERROR" #/ERROR/) +;; (expect:ignore in "Body" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +;; (expect:warning in "Body" = 0 "Any warning" #/WARNING/) +;; (expect:error in "Body" = 0 "ERROR BLAH" (list #/ERROR/ #/error/)) ;; but disallow any other errors +;; +;; ;(expect in "Init" < 1 "Junk" #/This is bogus/) ADDED tests/release/tests/dependencies/testconfig Index: tests/release/tests/dependencies/testconfig ================================================================== --- /dev/null +++ tests/release/tests/dependencies/testconfig @@ -0,0 +1,12 @@ +# test2 from the tests/Makefile + +[var] +tname itemwait + +[ezsteps] + +# Set things up +cleansimple $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -remove-runs -testpatt % -target simple/0 -runname #{get var tname} +simple $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -run -testpatt test2/%/ptran -target simple/0 -runname #{get var tname} +simpleresults $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -list-runs #{get var name} -target simple/0 + Index: tests/unittests/runs.scm ================================================================== --- tests/unittests/runs.scm +++ tests/unittests/runs.scm @@ -320,10 +320,16 @@ (test "server stop" #f (let ((hostname (car *runremote*)) (port (cadr *runremote*))) (tasks:kill-server #t hostname port server-pid 'http) (open-run-close tasks:get-best-server tasks:open-db))) +;;====================================================================== +;; M O R E R E M O T E C A L L S +;;====================================================================== + +(test #f #f (rmt:set-tests-state-status 1 '("runfirst") "RUNNING" "WARN" "COMPLETED" "FAIL")) + ;; (cdb:kill-server *runremote*) ;; (thread-join! th1 th2 th3) ;; ADD ME!!!! (db:get-prereqs-not-met *db* 1 '("runfirst") "" mode: 'normal) Index: utils/Makefile.installall ================================================================== --- utils/Makefile.installall +++ utils/Makefile.installall @@ -1,7 +1,7 @@ -# Copyright 2013,2014 Matthew Welland. +# Copyright 2013-2015 Matthew Welland. # # This program is made available under the GNU GPL version 2.0 or # greater. See the accompanying file COPYING for details. # # This program is distributed WITHOUT ANY WARRANTY; without even the @@ -10,13 +10,18 @@ # make PREFIX=/mfs/pkgs/chicken/chicken-core all help : @echo You may need to do the following first: + @echo @echo sudo apt-get install libreadline-dev - @echo sudo apt-get install libwebkitgtk-dev libfreetype6-dev libx11-dev libxpm-dev libxmu-dev libxft-dev libgtk2.0-dev libgl1-mesa-dev libglu1-mesa-dev libpangox-1.0-dev bison + @echo sudo apt-get install libwebkitgtk-dev libfreetype6-dev libx11-dev libxpm-dev libxmu-dev \ + libxft-dev libgtk2.0-dev libgl1-mesa-dev libglu1-mesa-dev libpangox-1.0-dev bison \ + libwebkitgtk-3.0-dev + @echo -- nb// adding monodevelop gets more packages of which some might be needed... @echo sudo apt-get install libmotif3 + @echo @echo For IUP set IUPBRANCH, currently $(IUPBRANCH) @echo You are using PREFIX=$(PREFIX) @echo You are using PROXY="$(PROXY)" @echo If needed set PROXY to host.dom:port @echo http_proxy=$(http_proxy) @@ -24,11 +29,11 @@ @echo @echo To make all do: make all @echo @echo Note: might need to do CSC_OPTIONS='-C "-fPIC"' make -# FPIC=-C "-fPIC" +FPIC=-C "-fPIC" # Put the installation here ifeq ($(PREFIX),) PREFIX=$(PWD)/target endif @@ -35,17 +40,18 @@ # Set this on the command line of your make call if needed: make PROXY=host.com:1234 PROXY= # http://code.call-cc.org/dev-snapshots/2015/06/07/chicken-4.10.0rc1.tar.gz +# http://code.call-cc.org/releases/4.10.0/chicken-4.10.0.tar.gz # Select version of chicken, sqlite3 etc -CHICKEN_VERSION=4.10.0rc1 -SQLITE3_VERSION=3080500 +CHICKEN_VERSION=4.10.0 +SQLITE3_VERSION=3081101 # http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz - +# http://www.sqlite.org/2015/sqlite-autoconf-3081101.tar.gz # Override IUPBRANCH to use other than trunk -IUPBRANCH=iup-3.10.1 +IUPBRANCH=iup-3.15 # Eggs to install (straightforward ones) EGGS=matchable readline apropos base64 regex-literals format regex-case test coops trace csv \ dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt \ json md5 awful http-client spiffy uri-common intarweb spiffy-request-vars \ @@ -140,10 +146,13 @@ wget http://code.call-cc.org/releases/4.9.0/chicken-4.9.0.1.tar.gz chicken-4.10.0rc1.tar.gz : wget http://code.call-cc.org/dev-snapshots/2015/06/07/chicken-4.10.0rc1.tar.gz +chicken-4.10.0.tar.gz : + wget http://code.call-cc.org/releases/4.10.0/chicken-4.10.0.tar.gz + # git clone git://code.call-cc.org/chicken-core # git clone http://code.call-cc.org/git/chicken-core.git $(CHICKEN_INSTALL) : chicken-core/chicken.scm $(PREFIX)/setup-chicken4x.sh $(PREFIX)/setup-chicken4x.csh cd chicken-core;make PLATFORM=linux PREFIX=$(PREFIX) @@ -167,21 +176,24 @@ #====================================================================== # N A N O M S G #====================================================================== -nanomsg-0.5-beta.tar.gz : - wget http://download.nanomsg.org/nanomsg-0.5-beta.tar.gz - -nanomsg-0.5-beta/COPYING : nanomsg-0.5-beta.tar.gz - tar xfvz nanomsg-0.5-beta.tar.gz - -$(PREFIX)/bin/nanocat : nanomsg-0.5-beta/COPYING - cd nanomsg-0.5-beta;./configure --prefix=$(PREFIX);make;make install +# https://github.com/nanomsg/nanomsg/releases/download/0.6-beta/nanomsg-0.6-beta.tar.gz +nanomsg-0.6-beta.tar.gz : + wget http://download.nanomsg.org/nanomsg-0.6-beta.tar.gz + +nanomsg-0.6-beta/COPYING : nanomsg-0.6-beta.tar.gz + tar xfvz nanomsg-0.6-beta.tar.gz + +$(PREFIX)/bin/nanocat : nanomsg-0.6-beta/COPYING + cd nanomsg-0.6-beta;./configure --prefix=$(PREFIX);make;make install $(PREFIX)/lib/nanomsg.so : $(PREFIX)/bin/nanocat CSC_OPTIONS="-I$(PREFIX)/include -L$(PREFIX)/lib" $(CHICKEN_INSTALL) $(PROX) nanomsg + +# LD_LIBRARY_PATH=/mfs/pkgs/chicken/4.10.0-amd64/lib CSC_OPTIONS="-I/mfs/pkgs/chicken/4.10.0-amd64/include -L/mfs/pkgs/chicken/4.10.0-amd64/lib -C \"-fPIC\"" /mfs/pkgs/chicken/4.10.0-amd64/bin/chicken-install -D no-library-checks nanomsg #====================================================================== # M A T T S U T I L S #====================================================================== @@ -237,11 +249,11 @@ cd ffcall && if [ -e README ];then fossil update; else fossil open ../ffcall.fossil; fi # NOTE: This worked fine *without* the enable-shared # $(PREFIX)/lib/libavcall.a : ffcall/README - cd ffcall;./configure --prefix=$(PREFIX) --enable-shared && make && make install + cd ffcall;./configure --prefix=$(PREFIX) --enable-shared && make CC="gcc -fPIC" && make install iuplib.fossil : fossil clone http://www.kiatoa.com/fossils/iuplib iuplib.fossil iup/installall.sh : iuplib.fossil @@ -256,13 +268,15 @@ # $(PREFIX)/lib/libiup.so : iup/iup/alldone # touch -c $(PREFIX)/lib/libiup.so $(CHICKEN_EGG_DIR)/iup.so : $(PREFIX)/lib/libiup.so $(PREFIX)/lib/libavcall.a - LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CSC_OPTIONS=$(CSC_OPTIONS) $(CHICKEN_INSTALL) $(PROX) -D no-library-checks -feature disable-iup-web iup + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CSC_OPTIONS=$(CSC_OPTIONS) $(CHICKEN_INSTALL) $(PROX) -D no-library-checks iup + +# -feature disable-iup-web $(CHICKEN_EGG_DIR)/canvas-draw.so : $(PREFIX)/lib/libiup.so $(PREFIX)/lib/libavcall.a CSC_OPTIONS=$(CSC_OPTIONS) $(CHICKEN_INSTALL) $(PROX) -D no-library-checks canvas-draw clean : rm -rf chicken-4.8.0 eggflags ffcall sqlite-autoconf-$(SQLITE3_VERSION)