Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -641,10 +641,18 @@ )))))) ;;====================================================================== ;; S Y S T E M S T U F F ;;====================================================================== + +;; lazy-safe get file mod time. on any error (file not existing etc.) return 0 +;; +(define (common:lazy-modification-time fpath) + (handle-exceptions + exn + 0 + (file-modification-time fpath))) ;; return a nice clean pathname made absolute (define (common:nice-path dir) (let ((match (string-match "^(~[^\\/]*)(\\/.*|)$" dir))) (if match ;; using ~ for home? Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -524,11 +524,11 @@ (let* ((db-dir (tasks:get-task-db-path)) (db-pth (conc db-dir "/" run-id ".db"))) (dboard:rundat-db-path-set! run-dat db-pth) db-pth))) (tmptests (if (or do-not-use-db-file-timestamps - (>= (file-modification-time db-path) last-update)) + (>= (common:lazy-modification-time db-path) last-update)) (rmt:get-tests-for-run run-id testnamepatt states statuses ;; run-id testpatt states statuses (dboard:rundat-run-data-offset run-dat) num-to-get (dboard:tabdat-hide-not-hide tabdat) ;; no-in sort-by ;; sort-by Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -14,11 +14,11 @@ ;;====================================================================== ;; dbstruct vector containing all the relevant dbs like main.db, megatest.db, run.db etc (require-extension (srfi 18) extras tcp) ;; RADT => use of require-extension? -(use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64 format dot-locking z3) +(use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64 format dot-locking z3 typed-records) (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) ;; RADT => prefix?? (declare (unit db)) (declare (uses common)) @@ -33,10 +33,29 @@ (include "run_records.scm") (define *rundb-mutex* (make-mutex)) ;; prevent problems opening/closing rundb's (define *number-of-writes* 0) (define *number-non-write-queries* 0) + +;;====================================================================== +;; R E C O R D S +;;====================================================================== + +(defstruct dbr:dbstruct + main + strdb + ((path #f) : string) + ((local #f) : boolean) + rundb + inmem + mtime + rtime + stime + inuse + refdb + ((locdbs (make-hash-table)) : hash-table) + olddb) ;;====================================================================== ;; SQLITE3 HELPERS ;;====================================================================== @@ -45,11 +64,12 @@ ;; check for (exn sqlite3) ((condition-property-accessor 'exn 'message) exn) (print "err-status: " err-status) (debug:print-error 0 *default-log-port* " query " stmt " failed, params: " params ", error: " ((condition-property-accessor 'exn 'message) exn)) (print-call-chain (current-error-port)))) -;; convert to -inline RADT => how inline? +;; convert to -inline +;; (define (db:first-result-default db stmt default . params) (handle-exceptions exn (let ((err-status ((condition-property-accessor 'sqlite3 'status #f) exn))) ;; check for (exn sqlite3) ((condition-property-accessor 'exn 'message) exn) @@ -66,11 +86,11 @@ ;; if #f => get main db ;; if db already open - return inmem ;; if db not open, open inmem, rundb and sync then return inmem ;; inuse gets set automatically for rundb's ;; -(define (db:get-db dbstruct run-id) ;; RADT => Where is dbstruct defined? +(define (db:get-db dbstruct run-id) (if (sqlite3:database? dbstruct) ;; pass sqlite3 databases on through dbstruct (begin (let ((dbdat (if (or (not run-id) (eq? run-id 0)) @@ -77,11 +97,11 @@ (db:open-main dbstruct) (db:open-rundb dbstruct run-id) ))) dbdat)))) -;;RADT => Purpose of dbdat? +;; legacy handling of structure for managing db's. Refactor this into dbr:? ;; (define (db:dbdat-get-db dbdat) (if (pair? dbdat) (car dbdat) dbdat)) @@ -99,31 +119,30 @@ (define (db:done-with dbstruct run-id mod-read) (if (not (sqlite3:database? dbstruct)) (begin (mutex-lock! *rundb-mutex*) (if (eq? mod-read 'mod) - (dbr:dbstruct-set-mtime! dbstruct (current-milliseconds)) - (dbr:dbstruct-set-rtime! dbstruct (current-milliseconds))) - (dbr:dbstruct-set-inuse! dbstruct #f) + (dbr:dbstruct-mtime-set! dbstruct (current-milliseconds)) + (dbr:dbstruct-rtime-set! dbstruct (current-milliseconds))) + (dbr:dbstruct-inuse-set! dbstruct #f) (mutex-unlock! *rundb-mutex*)))) ;; (db:with-db dbstruct run-id sqlite3:exec "select blah from blaz;") ;; r/w is a flag to indicate if the db is modified by this query #t = yes, #f = no ;; (define (db:with-db dbstruct run-id r/w proc . params) - (let* ((dbdat (if (vector? dbstruct) + (let* ((dbdat (if (dbr:dbstruct? dbstruct) (db:get-db dbstruct run-id) dbstruct)) ;; cheat, allow for passing in a dbdat - (db (db:dbdat-get-db dbdat))) ;;RADT => dbdat should already be a database, why need this function - (db:delay-if-busy dbdat) + (db (db:dbdat-get-db dbdat))) (handle-exceptions exn (begin (debug:print-error 0 *default-log-port* "sqlite3 issue in db:with-db, dbstruct=" dbstruct ", run-id=" run-id ", proc=" proc ", params=" params " error: " ((condition-property-accessor 'exn 'message) exn)) (print-call-chain (current-error-port))) (let ((res (apply proc db params))) - (if (vector? dbstruct)(db:done-with dbstruct run-id r/w)) ;; RA => Mark timestamp on defstruct RADT => How come 'mod not passed instead of r/w + (if (vector? dbstruct)(db:done-with dbstruct run-id r/w)) res)))) ;;====================================================================== ;; K E E P F I L E D B I N dbstruct ;;====================================================================== @@ -148,24 +167,26 @@ ;; (let ((fdb (db:get-filedb dbstruct))) ;; (filedb:get-path db id))) ;; NB// #f => return dbdir only ;; (was planned to be; zeroth db with name=main.db) +;; +;; If run-id is #f return to create and retrieve the path where the db will live. ;; (define (db:dbfile-path run-id) (let* ((dbdir (db:get-dbdir)) (fname (if run-id - (if (eq? run-id 0) "main.db" (conc run-id ".db")) ;;main.db is assigned if run-id 0; does it mean main.db same as 1.db??? + (if (eq? run-id 0) "main.db" (conc run-id ".db")) #f))) (handle-exceptions exn (begin (debug:print-error 0 *default-log-port* "Couldn't create path to " dbdir) (exit 1)) (if (not (directory? dbdir))(create-directory dbdir #t))) (if fname - (conc dbdir "/" fname) ;;RADT => why not creating fname db if does not exist here + (conc dbdir "/" fname) dbdir))) ;; Returns the database location as specified in config file ;; (define (db:get-dbdir) @@ -172,11 +193,11 @@ (or (configf:lookup *configdat* "setup" "dbdir") (conc (configf:lookup *configdat* "setup" "linktree") "/.db"))) (define (db:set-sync db) (let ((syncprag (configf:lookup *configdat* "setup" "sychronous"))) - (sqlite3:execute db (conc "PRAGMA synchronous = " (or syncprag 1) ";")))) ;; RADT => advantage of PRAGMA here?? + (sqlite3:execute db (conc "PRAGMA synchronous = " (or syncprag 1) ";")))) ;; open an sql database inside a file lock ;; returns: db existed-prior-to-opening ;; RA => Returns a db handler; sets the lock if opened in writable mode ;; @@ -205,14 +226,14 @@ (sqlite3:open-database fname))))) ;; ) ;; This routine creates the db. It is only called if the db is not already opened ;; (define (db:open-rundb dbstruct run-id #!key (attemptnum 0)(do-not-open #f)) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) - (let* ((local (dbr:dbstruct-get-local dbstruct)) + (let* ((local (dbr:dbstruct-local dbstruct)) (rdb (if local - (dbr:dbstruct-get-localdb dbstruct run-id) - (dbr:dbstruct-get-inmem dbstruct)))) ;; (dbr:dbstruct-get-runrec dbstruct run-id 'inmem))) + (dbr:dbstruct-localdb dbstruct run-id) + (dbr:dbstruct-inmem dbstruct)))) ;; (dbr:dbstruct-runrec dbstruct run-id 'inmem))) (if (or rdb do-not-open) rdb (begin (mutex-lock! *rundb-mutex*) @@ -247,36 +268,36 @@ (write-access (file-write-access? dbpath)) ;; (handler (make-busy-timeout 136000)) ) (if (and dbexists (not write-access)) (set! *db-write-access* #f)) ;; only unset so other db's also can use this control - (dbr:dbstruct-set-rundb! dbstruct (cons db dbpath)) - (dbr:dbstruct-set-inuse! dbstruct #t) - (dbr:dbstruct-set-olddb! dbstruct olddb) - ;; (dbr:dbstruct-set-run-id! dbstruct run-id) + (dbr:dbstruct-rundb-set! dbstruct (cons db dbpath)) + (dbr:dbstruct-inuse-set! dbstruct #t) + (dbr:dbstruct-olddb-set! dbstruct olddb) + ;; (dbr:dbstruct-run-id-set! dbstruct run-id) (mutex-unlock! *rundb-mutex*) (if local (begin - (dbr:dbstruct-set-localdb! dbstruct run-id db) ;; (dbr:dbstruct-set-inmem! dbstruct db) ;; direct access ... + (dbr:dbstruct-localdb-set! dbstruct run-id db) ;; (dbr:dbstruct-inmem-set! dbstruct db) ;; direct access ... db) (begin - (dbr:dbstruct-set-inmem! dbstruct inmem) + (dbr:dbstruct-inmem-set! dbstruct inmem) ;; dec 14, 2014 - keep deleted records available. hunch is that they are needed for id placeholders ;; (sqlite3:execute db "DELETE FROM tests WHERE state='DELETED';") ;; they just slow us down in this context (db:sync-tables db:sync-tests-only db inmem) (db:delay-if-busy refdb) ;; dbpath: (db:dbdat-get-path refdb)) ;; What does delaying here achieve? - (dbr:dbstruct-set-refdb! dbstruct refdb) + (dbr:dbstruct-refdb-set! dbstruct refdb) (db:sync-tables db:sync-tests-only inmem refdb) ;; use inmem as the reference, don't read again from db ;; sync once more to deal with delays? ;; (db:sync-tables db:sync-tests-only db inmem) ;; (db:sync-tables db:sync-tests-only inmem refdb) inmem))))))) ;; This routine creates the db if not already present. It is only called if the db is not already ls opened ;; (define (db:open-main dbstruct) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) - (let ((mdb (dbr:dbstruct-get-main dbstruct))) ;; RA => Returns the first reference in dbstruct + (let ((mdb (dbr:dbstruct-main dbstruct))) ;; RA => Returns the first reference in dbstruct (if mdb mdb (begin (mutex-lock! *rundb-mutex*) (let* ((dbpath (db:dbfile-path 0)) @@ -285,12 +306,12 @@ (olddb (db:open-megatest-db)) (write-access (file-write-access? dbpath)) (dbdat (cons db dbpath))) (if (and dbexists (not write-access)) (set! *db-write-access* #f)) - (dbr:dbstruct-set-main! dbstruct dbdat) - (dbr:dbstruct-set-olddb! dbstruct olddb) ;; olddb is already a (cons db path) + (dbr:dbstruct-main-set! dbstruct dbdat) + (dbr:dbstruct-olddb-set! dbstruct olddb) ;; olddb is already a (cons db path) (mutex-unlock! *rundb-mutex*) (if (and (not dbexists) *db-write-access*) ;; did not have a prior db and do have write access (db:multi-db-sync #f 'old2new)) ;; migrate data from megatest.db automatically dbdat))))) @@ -317,18 +338,18 @@ (cons db dbpath))) ;; sync run to disk if touched ;; (define (db:sync-touched dbstruct run-id #!key (force-sync #f)) - (let ((mtime (dbr:dbstruct-get-mtime dbstruct)) - (stime (dbr:dbstruct-get-stime dbstruct)) - (rundb (dbr:dbstruct-get-rundb dbstruct)) - (inmem (dbr:dbstruct-get-inmem dbstruct)) - (maindb (dbr:dbstruct-get-main dbstruct)) - (refdb (dbr:dbstruct-get-refdb dbstruct)) - (olddb (dbr:dbstruct-get-olddb dbstruct)) - ;; (runid (dbr:dbstruct-get-run-id dbstruct)) + (let ((mtime (dbr:dbstruct-mtime dbstruct)) + (stime (dbr:dbstruct-stime dbstruct)) + (rundb (dbr:dbstruct-rundb dbstruct)) + (inmem (dbr:dbstruct-inmem dbstruct)) + (maindb (dbr:dbstruct-main dbstruct)) + (refdb (dbr:dbstruct-refdb dbstruct)) + (olddb (dbr:dbstruct-olddb dbstruct)) + ;; (runid (dbr:dbstruct-run-id dbstruct)) ) (debug:print-info 4 *default-log-port* "Syncing for run-id: " run-id) ;; (mutex-lock! *http-mutex*) (if (eq? run-id 0) ;; runid equal to 0 is main.db @@ -339,11 +360,11 @@ force-sync) (begin (db:delay-if-busy maindb) (db:delay-if-busy olddb) (let ((num-synced (db:sync-tables (db:sync-main-list maindb) maindb olddb))) - (dbr:dbstruct-set-stime! dbstruct (current-milliseconds)) + (dbr:dbstruct-stime-set! dbstruct (current-milliseconds)) num-synced) 0)) (begin ;; this can occur when using local access (i.e. not in a server) ;; need a flag to turn it off. @@ -356,33 +377,33 @@ (> mtime stime) force-sync) (begin (db:delay-if-busy rundb) (db:delay-if-busy olddb) - (dbr:dbstruct-set-stime! dbstruct (current-milliseconds)) + (dbr:dbstruct-stime-set! dbstruct (current-milliseconds)) (let ((num-synced (db:sync-tables db:sync-tests-only inmem refdb rundb olddb))) ;; (mutex-unlock! *http-mutex*) num-synced) (begin ;; (mutex-unlock! *http-mutex*) 0)))))) (define (db:close-main dbstruct) - (let ((maindb (dbr:dbstruct-get-main dbstruct))) + (let ((maindb (dbr:dbstruct-main dbstruct))) (if maindb (begin (sqlite3:finalize! (db:dbdat-get-db maindb)) - (dbr:dbstruct-set-main! dbstruct #f))))) + (dbr:dbstruct-main-set! dbstruct #f))))) (define (db:close-run-db dbstruct run-id) (let ((rdb (db:open-rundb dbstruct run-id do-not-open: #t))) (if (and rdb (sqlite3:database? rdb)) (begin (sqlite3:finalize! rdb) - (dbr:dbstruct-set-localdb! dbstruct run-id #f) - (dbr:dbstruct-set-inmem! dbstruct #f))))) + (dbr:dbstruct-localdb-set! dbstruct run-id #f) + (dbr:dbstruct-inmem-set! dbstruct #f))))) ;; close all opened run-id dbs (define (db:close-all dbstruct) ;; finalize main.db (db:sync-touched dbstruct 0 force-sync: #t) @@ -389,11 +410,11 @@ ;;(common:db-block-further-queries) ;; (mutex-lock! *db-sync-mutex*) ;; with this perhaps it isn't necessary to use the block-further-queries mechanism? (db:close-main dbstruct) - (let ((locdbs (dbr:dbstruct-get-locdbs dbstruct))) + (let ((locdbs (dbr:dbstruct-locdbs dbstruct))) (if (hash-table? locdbs) (for-each (lambda (run-id) (db:close-run-db dbstruct run-id)) (hash-table-keys locdbs))))) @@ -756,11 +777,11 @@ (db:delay-if-busy mtdb) (let ((testrecs (db:get-all-tests-info-by-run-id mtdb run-id)) (dbstruct (if toppath (make-dbr:dbstruct path: toppath local: #t) #f))) (debug:print 0 *default-log-port* "INFO: Propagating " (length testrecs) " records for run-id=" run-id " to run specific db") (db:replace-test-records dbstruct run-id testrecs) - (sqlite3:finalize! (db:dbdat-get-db (dbr:dbstruct-get-rundb dbstruct))))) + (sqlite3:finalize! (db:dbdat-get-db (dbr:dbstruct-rundb dbstruct))))) run-ids))) ;; now ensure all newdb data are synced to megatest.db ;; do not use the run-ids list passed in to the function ;; @@ -3372,10 +3393,11 @@ (if (null? tal) (map cdr (hash-table->alist tests-hash)) ;; return a list of the most recent tests (loop (car tal)(cdr tal)))))))))) ;; Function recursively checks if .journal exists; if yes means db busy; call itself after delayed interval +;; return the sqlite3 db handle if possible ;; (define (db:delay-if-busy dbdat #!key (count 6)) (if (not (configf:lookup *configdat* "server" "delay-on-busy")) ;;RADT => two conditions in a if block?? also understand what config looked up (and dbdat (db:dbdat-get-db dbdat)) (if dbdat @@ -3385,11 +3407,11 @@ (if (handle-exceptions exn (begin (debug:print-info 0 *default-log-port* "WARNING: failed to test for existance of " dbfj) (thread-sleep! 1) - (db:delay-if-busy count (- count 1))) ;; RADT => Don't we need to sent a dbstruct here? + (db:delay-if-busy count (- count 1))) (file-exists? dbfj)) (case count ((6) (thread-sleep! 0.2) (db:delay-if-busy count: 5)) Index: db_records.scm ================================================================== --- db_records.scm +++ db_records.scm @@ -13,61 +13,61 @@ ;; ;; ;; Accessors for a dbstruct ;; -(define-inline (dbr:dbstruct-get-main vec) (vector-ref vec 0)) ;; ( db path ) -(define-inline (dbr:dbstruct-get-strdb vec) (vector-ref vec 1)) ;; ( db path ) -(define-inline (dbr:dbstruct-get-path vec) (vector-ref vec 2)) -(define-inline (dbr:dbstruct-get-local vec) (vector-ref vec 3)) -(define-inline (dbr:dbstruct-get-rundb vec) (vector-ref vec 4)) ;; ( db path ) -(define-inline (dbr:dbstruct-get-inmem vec) (vector-ref vec 5)) ;; ( db #f ) -(define-inline (dbr:dbstruct-get-mtime vec) (vector-ref vec 6)) -(define-inline (dbr:dbstruct-get-rtime vec) (vector-ref vec 7)) -(define-inline (dbr:dbstruct-get-stime vec) (vector-ref vec 8)) -(define-inline (dbr:dbstruct-get-inuse vec) (vector-ref vec 9)) -(define-inline (dbr:dbstruct-get-refdb vec) (vector-ref vec 10)) ;; ( db path ) -(define-inline (dbr:dbstruct-get-locdbs vec) (vector-ref vec 11)) -(define-inline (dbr:dbstruct-get-olddb vec) (vector-ref vec 12)) ;; ( db path ) -;; (define-inline (dbr:dbstruct-get-main-path vec) (vector-ref vec 13)) -;; (define-inline (dbr:dbstruct-get-rundb-path vec) (vector-ref vec 14)) -;; (define-inline (dbr:dbstruct-get-run-id vec) (vector-ref vec 13)) - -(define-inline (dbr:dbstruct-set-main! vec val)(vector-set! vec 0 val)) -(define-inline (dbr:dbstruct-set-strdb! vec val)(vector-set! vec 1 val)) -(define-inline (dbr:dbstruct-set-path! vec val)(vector-set! vec 2 val)) -(define-inline (dbr:dbstruct-set-local! vec val)(vector-set! vec 3 val)) -(define-inline (dbr:dbstruct-set-rundb! vec val)(vector-set! vec 4 val)) -(define-inline (dbr:dbstruct-set-inmem! vec val)(vector-set! vec 5 val)) -(define-inline (dbr:dbstruct-set-mtime! vec val)(vector-set! vec 6 val)) -(define-inline (dbr:dbstruct-set-rtime! vec val)(vector-set! vec 7 val)) -(define-inline (dbr:dbstruct-set-stime! vec val)(vector-set! vec 8 val)) -(define-inline (dbr:dbstruct-set-inuse! vec val)(vector-set! vec 9 val)) -(define-inline (dbr:dbstruct-set-refdb! vec val)(vector-set! vec 10 val)) -(define-inline (dbr:dbstruct-set-locdbs! vec val)(vector-set! vec 11 val)) -(define-inline (dbr:dbstruct-set-olddb! vec val)(vector-set! vec 12 val)) -(define-inline (dbr:dbstruct-set-main-path! vec val)(vector-set! vec 13 val)) -(define-inline (dbr:dbstruct-set-rundb-path! vec val)(vector-set! vec 14 val)) - -; (define-inline (dbr:dbstruct-set-run-id! vec val)(vector-set! vec 13 val)) +;; (define-inline (dbr:dbstruct-main vec) (vector-ref vec 0)) ;; ( db path ) +;; (define-inline (dbr:dbstruct-strdb vec) (vector-ref vec 1)) ;; ( db path ) +;; (define-inline (dbr:dbstruct-path vec) (vector-ref vec 2)) +;; (define-inline (dbr:dbstruct-local vec) (vector-ref vec 3)) +;; (define-inline (dbr:dbstruct-rundb vec) (vector-ref vec 4)) ;; ( db path ) +;; (define-inline (dbr:dbstruct-inmem vec) (vector-ref vec 5)) ;; ( db #f ) +;; (define-inline (dbr:dbstruct-mtime vec) (vector-ref vec 6)) +;; (define-inline (dbr:dbstruct-rtime vec) (vector-ref vec 7)) +;; (define-inline (dbr:dbstruct-stime vec) (vector-ref vec 8)) +;; (define-inline (dbr:dbstruct-inuse vec) (vector-ref vec 9)) +;; (define-inline (dbr:dbstruct-refdb vec) (vector-ref vec 10)) ;; ( db path ) +;; (define-inline (dbr:dbstruct-locdbs vec) (vector-ref vec 11)) +;; (define-inline (dbr:dbstruct-olddb vec) (vector-ref vec 12)) ;; ( db path ) +;; ;; (define-inline (dbr:dbstruct-main-path vec) (vector-ref vec 13)) +;; ;; (define-inline (dbr:dbstruct-rundb-path vec) (vector-ref vec 14)) +;; ;; (define-inline (dbr:dbstruct-run-id vec) (vector-ref vec 13)) +;; +;; (define-inline (dbr:dbstruct-main-set! vec val)(vector-set! vec 0 val)) +;; (define-inline (dbr:dbstruct-strdb-set! vec val)(vector-set! vec 1 val)) +;; (define-inline (dbr:dbstruct-path-set! vec val)(vector-set! vec 2 val)) +;; (define-inline (dbr:dbstruct-local-set! vec val)(vector-set! vec 3 val)) +;; (define-inline (dbr:dbstruct-rundb-set! vec val)(vector-set! vec 4 val)) +;; (define-inline (dbr:dbstruct-inmem-set! vec val)(vector-set! vec 5 val)) +;; (define-inline (dbr:dbstruct-mtime-set! vec val)(vector-set! vec 6 val)) +;; (define-inline (dbr:dbstruct-rtime-set! vec val)(vector-set! vec 7 val)) +;; (define-inline (dbr:dbstruct-stime-set! vec val)(vector-set! vec 8 val)) +;; (define-inline (dbr:dbstruct-inuse-set! vec val)(vector-set! vec 9 val)) +;; (define-inline (dbr:dbstruct-refdb-set! vec val)(vector-set! vec 10 val)) +;; (define-inline (dbr:dbstruct-locdbs-set! vec val)(vector-set! vec 11 val)) +;; (define-inline (dbr:dbstruct-olddb-set! vec val)(vector-set! vec 12 val)) +;; (define-inline (dbr:dbstruct-main-path-set! vec val)(vector-set! vec 13 val)) +;; (define-inline (dbr:dbstruct-rundb-path-set! vec val)(vector-set! vec 14 val)) +;; +; (define-inline (dbr:dbstruct-run-id-set! vec val)(vector-set! vec 13 val)) ;; constructor for dbstruct ;; -(define (make-dbr:dbstruct #!key (path #f)(local #f)) - (let ((v (make-vector 15 #f))) - (dbr:dbstruct-set-path! v path) - (dbr:dbstruct-set-local! v local) - (dbr:dbstruct-set-locdbs! v (make-hash-table)) - v)) +;; (define (make-dbr:dbstruct #!key (path #f)(local #f)) +;; (let ((v (make-vector 15 #f))) +;; (dbr:dbstruct-path-set! v path) +;; (dbr:dbstruct-local-set! v local) +;; (dbr:dbstruct-locdbs-set! v (make-hash-table)) +;; v)) ;; Returns the database for a particular run-id fron the dbstruct:localdbs ;; -(define (dbr:dbstruct-get-localdb v run-id) - (hash-table-ref/default (dbr:dbstruct-get-locdbs v) run-id #f)) +(define (dbr:dbstruct-localdb v run-id) + (hash-table-ref/default (dbr:dbstruct-locdbs v) run-id #f)) -(define (dbr:dbstruct-set-localdb! v run-id db) - (hash-table-set! (dbr:dbstruct-get-locdbs v) run-id db)) +(define (dbr:dbstruct-localdb-set! v run-id db) + (hash-table-set! (dbr:dbstruct-locdbs v) run-id db)) (require-extension typed-records) (defstruct db:test-rec ((id -1) : number) ((run_id -1) : number) ((testname "") : string) Index: dcommon.scm ================================================================== --- dcommon.scm +++ dcommon.scm @@ -12,11 +12,11 @@ (use format) (require-library iup) (import (prefix iup iup:)) (use canvas-draw) (import canvas-draw-iup) -(use regex defstruct) +(use regex typed-records) (declare (unit dcommon)) (declare (uses megatest-version)) (declare (uses gutils)) Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -12,11 +12,11 @@ ;; launch a task - this runs on the originating host, tests themselves ;; ;;====================================================================== (use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv) -(use defstruct pathname-expand) +(use typed-records pathname-expand) (import (prefix base64 base64:)) (import (prefix sqlite3 sqlite3:)) (declare (unit launch)) @@ -68,11 +68,14 @@ (csvr (db:logpro-dat->csv dat stepname)) (csvt (let-values (( (fmt-cell fmt-record fmt-csv) (make-format ","))) (fmt-csv (map list->csv-record csvr)))) (status (configf:lookup dat "final" "exit-status")) (msg (configf:lookup dat "final" "message"))) - (rmt:csv->test-data run-id test-id csvt) + ;;(if csvt ;; this if blocked stack dump caused by .dat file from logpro being 0-byte. fixed by upgrading logpro + (rmt:csv->test-data run-id test-id csvt) + ;; (BB> "Error: run-id/test-id/stepname="run-id"/"test-id"/"stepname" => bad csvr="csvr) + ;; ) (cond ((equal? status "PASS") "PASS") ;; skip the message part if status is pass (status (conc (configf:lookup dat "final" "exit-status") ": " (if msg msg "no message"))) (else #f))) #f))) Index: tdb.scm ================================================================== --- tdb.scm +++ tdb.scm @@ -209,11 +209,13 @@ (define (tdb:load-test-data run-id test-id) (let loop ((lin (read-line))) (if (not (eof-object? lin)) (begin (debug:print 4 *default-log-port* lin) - (rmt:csv->test-data run-id test-id lin) + ;;(when lin ;; this when blocked stack dump caused by .dat file from logpro being 0-byte. fixed by upgrading logpro + (rmt:csv->test-data run-id test-id lin) + ;;) (loop (read-line))))) ;; roll up the current results. ;; FIXME: Add the status too (rmt:test-data-rollup run-id test-id #f)) @@ -221,11 +223,13 @@ (define (tdb:load-logpro-data run-id test-id) (let loop ((lin (read-line))) (if (not (eof-object? lin)) (begin (debug:print 4 *default-log-port* lin) - (rmt:csv->test-data run-id test-id lin) + ;;(when lin ;; this when blocked stack dump caused by .dat file from logpro being 0-byte. fixed by upgrading logpro + (rmt:csv->test-data run-id test-id lin) + ;;) (loop (read-line))))) ;; roll up the current results. ;; FIXME: Add the status too (rmt:test-data-rollup run-id test-id #f)) Index: utils/installall.sh ================================================================== --- utils/installall.sh +++ utils/installall.sh @@ -12,20 +12,59 @@ # PURPOSE. echo You may need to do the following first: echo sudo apt-get install libreadline-dev echo sudo apt-get install libwebkitgtk-dev +echo sudo apt-get install libpangox-1.0-0 zlib1g-dev libfreetype6-dev cmake echo sudo apt-get install libssl-dev echo sudo apt-get install libmotif3 -OR- set KTYPE=26g4 -echo KTYPE can be 26, 26g4, or 32 -echo -echo KTYPE=$KTYPE +echo +echo Set OPTION to std, currently OPTION=$OPTION +echo +echo Additionally, if you want mysql-client, you will need to make sure +echo mysql_config is in your path +echo echo You are using PREFIX=$PREFIX echo You are using proxy="$proxy" echo echo "Set additional_libpath to help find gtk or other libraries, don't forget a leading :" +SYSTEM_TYPE=$(lsb_release -irs |tr ' ' '_' |tr '\n' '-')$(uname -i)-$OPTION + +# Set up variables +# +case $SYSTEM_TYPE in +Ubuntu-16.04-x86_64-std) + KTYPE=32 + CDVER=5.10 + IUPVER=3.17 + IMVER=3.11 + ;; +Ubuntu-16.04-i686-std) + KTYPE=32 + CDVER=5.10 + IUPVER=3.17 + IMVER=3.11 + ;; +SUSE_LINUX_11-x86_64-std) + KTYPE=26g4 + CDVER=5.10 + IUPVER=3.17 + IMVER=3.11 + ;; +CentOS_5.11-x86_64-std) + KTYPE=24g3 + CDVER=5.4.1 + IUPVER=3.5 + IMVER=3.6.3 + ;; +esac + +echo KTYPE=$KTYPE +echo CDVER=$CDVER +echo IUPVER=$IUPVER +echo IMVER=$IMVER # NOTES: # # Centos with security setup may need to do commands such as following as root: # # NB// fix the paths first @@ -55,21 +94,21 @@ export PROX="-proxy $proxy" fi if [[ $KTYPE == "" ]]; then echo 'Using KTYPE=26' - export KTYPE=26 + export KTYPE=26g4 else echo Using KTYPE=$KTYPE fi # Put all the downloaded tar files in tgz mkdir -p tgz # http://code.call-cc.org/releases/4.8.0/chicken-4.8.0.5.tar.gz -export CHICKEN_VERSION=4.8.0.5 -export CHICKEN_BASEVER=4.8.0 +export CHICKEN_VERSION=4.11.0 +export CHICKEN_BASEVER=4.11.0 chicken_targz=chicken-${CHICKEN_VERSION}.tar.gz if ! [[ -e tgz/$chicken_targz ]]; then wget http://code.call-cc.org/releases/${CHICKEN_BASEVER}/${chicken_targz} mv $chicken_targz tgz fi @@ -80,167 +119,235 @@ if [[ $PREFIX == "" ]]; then PREFIX=$PWD/inst fi export PATH=$PREFIX/bin:$PATH -export LIBPATH=$PREFIX/lib$ADDITIONAL_LIBPATH +export LIBPATH=$PREFIX/lib:$PREFIX/lib64:$ADDITIONAL_LIBPATH export LD_LIBRARY_PATH=$LIBPATH export CHICKEN_INSTALL=$PREFIX/bin/chicken-install -echo "export PATH=$PREFIX/bin:\$PATH" > setup-chicken4x.sh -echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> setup-chicken4x.sh +mkdir -p $PREFIX +echo "export PATH=$PREFIX/bin:\$PATH" > $PREFIX/setup-chicken4x.sh +echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\$LD_LIBRARY_PATH" >> $PREFIX/setup-chicken4x.sh +echo "export CHICKEN_DOC_PAGER=cat" >> $PREFIX/setup-chicken4x.sh + +echo "setenv PATH $PREFIX/bin:\$PATH" > $PREFIX/setup-chicken4x.csh +echo "setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:\$LD_LIBRARY_PATH" >> $PREFIX/setup-chicken4x.csh +echo "setenv CHICKEN_DOC_PAGER cat" >> $PREFIX/setup-chicken4x.csh echo PATH=$PATH echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH if ! [[ -e $PREFIX/bin/csi ]]; then - tar xfvz tgz/$chicken_targz + tar xfz tgz/$chicken_targz cd chicken-${CHICKEN_VERSION} # make PLATFORM=linux PREFIX=$PREFIX spotless make PLATFORM=linux PREFIX=$PREFIX make PLATFORM=linux PREFIX=$PREFIX install cd $BUILDHOME fi +cd $BUILDHOME +#wget --no-check-certificate https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz +#mv 1.0.0 1.0.0.tar.gz +if ! [[ -e $PREFIX/lib64/libnanomsg.so.1.0.0 ]]; then + wget --no-check-certificate https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz + mv 1.0.0 1.0.0.tar.gz + tar xf 1.0.0.tar.gz + cd nanomsg-1.0.0 + ./configure --prefix=$PREFIX + make + make install +fi +cd $BUILDHOME + +export SQLITE3_VERSION=3090200 +if ! [[ -e $PREFIX/bin/sqlite3 ]]; then + echo Install sqlite3 + sqlite3_tgz=sqlite-autoconf-$SQLITE3_VERSION.tar.gz + if ! [[ -e tgz/$sqlite3_tgz ]]; then + wget http://www.sqlite.org/2015/$sqlite3_tgz + mv $sqlite3_tgz tgz + fi + + if ! [[ -e $PREFIX/bin/sqlite3 ]] ; then + if [[ -e tgz/sqlite-autoconf-$SQLITE3_VERSION.tar.gz ]]; then + tar xfz tgz/sqlite-autoconf-$SQLITE3_VERSION.tar.gz + (cd sqlite-autoconf-$SQLITE3_VERSION;./configure --prefix=$PREFIX;make;make install) + fi + fi +fi +cd $BUILDHOME # Some eggs are quoted since they are reserved to Bash # for f in matchable readline apropos base64 regex-literals format "regex-case" "test" coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp rpc csv-xml fmt json md5; do # $CHICKEN_INSTALL $PROX -keep-installed matchable readline apropos base64 regex-literals format "regex-case" "test" coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp rpc csv-xml fmt json md5 awful http-client spiffy uri-common intarweb http-client spiffy-request-vars md5 message-digest http-client spiffy-directory-listing -$CHICKEN_INSTALL $PROX -keep-installed matchable readline apropos base64 regex-literals format "regex-case" "test" coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp rpc csv-xml fmt json md5 awful http-client spiffy uri-common intarweb http-client spiffy-request-vars s md5 message-digest piffy-directory-listing ssax sxml-serializer sxml-modifications logpro -# if ! [[ -e $PREFIX/lib/chicken/6/$f.so ]];then -# $CHICKEN_INSTALL $PROX $f -# # $CHICKEN_INSTALL -deploy -prefix $DEPLOYTARG $PROX $f -# else -# echo Skipping install of egg $f as it is already installed -# fi -# done - -cd $BUILDHOME - -for a in `ls */*.meta|cut -f1 -d/` ; do - echo $a - (cd $a;$CHICKEN_INSTALL) -done - -export LIBPATH=$PREFIX/lib$ADDITIONAL_LIBPATH -export LD_LIBRARY_PATH=$LIBPATH - -export SQLITE3_VERSION=3071401 -echo Install sqlite3 -sqlite3_tgz=sqlite-autoconf-$SQLITE3_VERSION.tar.gz -if ! [[ -e tgz/$sqlite3_tgz ]]; then - wget http://www.sqlite.org/$sqlite3_tgz - mv $sqlite3_tgz tgz -fi - -if ! [[ -e $PREFIX/bin/sqlite3 ]] ; then - if [[ -e tgz/sqlite-autoconf-$SQLITE3_VERSION.tar.gz ]]; then - tar xfz tgz/sqlite-autoconf-$SQLITE3_VERSION.tar.gz - (cd sqlite-autoconf-$SQLITE3_VERSION;./configure --prefix=$PREFIX;make;make install) - # CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" $CHICKEN_INSTALL -prefix $DEPLOYTARG -deploy $PROX sqlite3 - CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" $CHICKEN_INSTALL $PROX sqlite3 - fi -fi +for egg in matchable readline apropos base64 regex-literals format "regex-case" "test" \ + coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo \ + tcp rpc csv-xml fmt json md5 awful http-client spiffy uri-common intarweb http-client \ + spiffy-request-vars s md5 message-digest spiffy-directory-listing ssax sxml-serializer \ + sxml-modifications logpro z3 call-with-environment-variables \ + pathname-expand typed-records simple-exceptions numbers crypt parley srfi-42 \ + alist-lib ansi-escape-sequences args basic-sequences bindings chicken-doc chicken-doc-cmd \ + cock condition-utils debug define-record-and-printer easyffi easyffi-base \ + expand-full ezxdisp filepath foof-loop ini-file irc lalr lazy-seq \ + locale locale-builtin locale-categories locale-components locale-current locale-posix \ + locale-timezone loops low-level-macros procedural-macros refdb rfc3339 scsh-process \ + sexp-diff sha1 shell slice srfi-101 srfi-19 srfi-19-core srfi-19-date srfi-19-io \ + srfi-19-period srfi-19-support srfi-19-time srfi-19-timezone srfi-29 srfi-37 srfi-78 syslog \ + udp uuid uuid-lib zlib + +do + echo "Installing $egg" + $CHICKEN_INSTALL $PROX -keep-installed $egg + #$CHICKEN_INSTALL $PROX $egg + if [ $? -ne 0 ]; then + echo "$egg failed to install" + exit 1 + fi +done + +if [[ -e `which mysql_config` ]]; then + $CHICKEN_INSTALL $PROX -keep-installed mysql-client +fi + +for egg in "sqlite3" sql-de-lite nanomsg +do + echo "Installing $egg" + CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib -L$PREFIX/lib64" $CHICKEN_INSTALL $PROX -keep-installed $egg + #CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib -L$PREFIX/lib64" $CHICKEN_INSTALL $PROX $egg + if [ $? -ne 0 ]; then + echo "$egg failed to install" + exit 1 + fi +done +cd $BUILDHOME +cd `$PREFIX/bin/csi -p '(chicken-home)'` +curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | tar zx +cd $BUILDHOME + + # $CHICKEN_INSTALL $PROX sqlite3 - -# IUP versions -if [[ x$USEOLDIUP == "x" ]];then - CDVER=5.7 - IUPVER=3.8 - IMVER=3.8 -else - CDVER=5.7 - IUPVER=3.8 - IMVER=3.8 -fi +cd $BUILDHOME +# # IUP versions +# if [[ x$USEOLDIUP == "x" ]];then +# CDVER=5.10 +# IUPVER=3.17 +# IMVER=3.11 +# else +# CDVER=5.10 +# IUPVER=3.17 +# IMVER=3.11 +# fi +# if [[ x$KTYPE == "x24g3" ]];then +# CDVER=5.4.1 +# IUPVER=3.5 +# IMVER=3.6.3 +# fi if [[ `uname -a | grep x86_64` == "" ]]; then export ARCHSIZE='' else export ARCHSIZE=64_ fi # export files="cd-5.4.1_Linux${KTYPE}_lib.tar.gz im-3.6.3_Linux${KTYPE}_lib.tar.gz iup-3.5_Linux${KTYPE}_lib.tar.gz" if [[ x$USEOLDIUP == "x" ]];then - export files="cd-${CDVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz im-${IMVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz iup-${IUPVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz" + export files="cd/cd-${CDVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz im/im-${IMVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz iup/iup-${IUPVER}_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz" else echo WARNING: Using old IUP libraries - export files="cd-5.4.1_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz im-3.6.3_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz iup-3.5_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz" + export files="cd/cd-5.4.1_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz im/im-3.6.3_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz iup/iup-3.5_Linux${KTYPE}_${ARCHSIZE}lib.tar.gz" fi +echo $files mkdir -p $PREFIX/iuplib +mkdir -p iup/ for a in `echo $files` ; do if ! [[ -e tgz/$a ]] ; then - wget http://www.kiatoa.com/matt/iup/$a - mv $a tgz/$a + echo wget -c -O tgz/$a http://www.kiatoa.com/matt/chicken-build/$a + wget -c http://www.kiatoa.com/matt/chicken-build/$a + mv `echo $a | cut -d'/' -f2` tgz/ fi echo Untarring tgz/$a into $BUILDHOME/lib - (cd $PREFIX/lib;tar xfvz $BUILDHOME/tgz/$a;mv include/* ../include) + tar -xzf tgz/`echo $a | cut -d'/' -f2` -C iup/ + #(cd $PREFIX/lib;tar xfvz $BUILDHOME/tgz/$a;mv include/* ../include) # (cd $DEPLOYTARG;tar xfvz $BUILDHOME/$a) done - +cp iup/include/* $PREFIX/include/ +cp iup/*.so $PREFIX/lib/ +cp iup/*.a $PREFIX/lib/ +cp iup/ftgl/lib/*/* $PREFIX/lib/ +cd $BUILDHOME # ffcall obtained from: # cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/libffcall co ffcall - -if ! [[ -e tgz/ffcall.tar.gz ]] ; then - wget http://www.kiatoa.com/matt/iup/ffcall.tar.gz - mv ffcall.tar.gz tgz +#exit +if ! [[ -e $PREFIX/include/callback.h ]] ; then + #fossil clone http://www.kiatoa.com/fossils/ffcall ffcall.fossil + wget -c -O ffcall.tar.gz 'http://www.kiatoa.com/fossils/ffcall/tarball?name=ffcall&uuid=trunk' + tar -xzf ffcall.tar.gz + #mkdir -p ffcall + cd ffcall + #fossil open ../ffcall.fossil + ./configure --prefix=$PREFIX --enable-shared + make CC="gcc -fPIC" + make install +fi +cd $BUILDHOME +#wget -c -O opensrc.tar.gz 'http://www.kiatoa.com/fossils/opensrc/tarball?name=opensrc&uuid=trunk' +# Not working due to login problems. +if ! [[ -e $PREFIX/bin/hs ]] ; then + #fossil clone http://www.kiatoa.com/fossils/opensrc opensrc.fossil + #mkdir -p opensrc + wget -c -O opensrc.tar.gz 'http://www.kiatoa.com/fossils/opensrc/tarball?name=opensrc&uuid=trunk' + tar -xzf opensrc.tar.gz + cd opensrc + #fossil open ../opensrc.fossil + cd histstore + $PREFIX/bin/csc histstore.scm -o hs + cp -f hs $PREFIX/bin/hs + cd ../mutils + $PREFIX/bin/chicken-install + cd ../dbi + $PREFIX/bin/chicken-install + cd ../margs + $PREFIX/bin/chicken-install fi - -tar xfvz tgz/ffcall.tar.gz - -cd ffcall -./configure --prefix=$PREFIX --enable-shared -make -make install - +cd $BUILDHOME + +if ! [[ -e $PREFIX/bin/stmlrun ]] ; then + #fossil clone http://www.kiatoa.com/fossils/stml stml.fossil + wget -c -O stml.tar.gz 'http://www.kiatoa.com/fossils/stml/tarball?name=stml&uuid=trunk' + tar -xzf stml.tar.gz + cd stml + #fossil open ../stml.fossil + cp install.cfg.template install.cfg + echo "TARGDIR=$PREFIX/bin" > install.cfg + echo "LOGDIR=/tmp/stmlrun" >> install.cfg + echo "SQLITE3=$PREFIX/bin/sqlite3" >> install.cfg + cp requirements.scm.template requirements.scm + which csc + make clean + CSCOPTS="-C -fPIC" make +fi cd $BUILDHOME export CSCLIBS=`echo $LD_LIBRARY_PATH | sed 's/:/ -L/g'` -CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks -feature disable-iup-web iup +IUPEGGVER='iup' +if [[ $IUPVER == "3.5" ]]; then + IUPEGGVER='iup:1.2.1' +fi + +#CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks -feature disable-iup-web iup +CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" $CHICKEN_INSTALL $PROX -D no-library-checks -feature disable-iup-web $IUPEGGVER + # CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks -feature disable-iup-web -deploy -prefix $DEPLOYTARG iup # iup:1.0.2 -CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks canvas-draw +CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" $CHICKEN_INSTALL $PROX -D no-library-checks canvas-draw # CSC_OPTIONS="-I$PREFIX/include -L$CSCLIBS" $CHICKEN_INSTALL $PROX -D no-library-checks -deploy -prefix $DEPLOYTARG canvas-draw -# NB// Removed bunch of zmq compiling tricks. Look at older versions of this file if you need to recreate... - cd $BUILDHOME -# git clone https://bitbucket.org/DerGuteMoritz/zmq/commits/branch/3.2 zmq-3.2 -# cd zmq-3.2 -# chicken-install -# -# cd $BUILDHOME - -## WEBKIT=WebKit-r131972 -## if ! [[ -e ${WEBKIT}.tar.bz2 ]] ; then -## # http://builds.nightly.webkit.org/files/trunk/src/WebKit-r131972.tar.bz2 -## wget http://builds.nightly.webkit.org/files/trunk/src/${WEBKIT}.tar.bz2 -## fi -## -## if [[ x$only_it_worked == $I_wish ]] ;then -## if [[ -e ${WEBKIT}.tar.bz2 ]] ; then -## tar xfj ${WEBKIT}.tar.bz2 -## cd $WEBKIT -## ./autogen.sh -## ./configure --prefix=$PREFIX -## make -## make install -## fi -## fi -## -## cd $BUILHOME - -# export CD_REL=d704525ebe1c6d08 -# if ! [[ -e Canvas_Draw-$CD_REL.zip ]]; then -# wget http://www.kiatoa.com/matt/iup/Canvas_Draw-$CD_REL.zip -# fi -# -# unzip -o Canvas_Draw-$CD_REL.zip -# -# cd "Canvas Draw-$CD_REL/chicken" -# CSC_OPTIONS="-I$PREFIX/include -L$LIBPATH" $CHICKEN_INSTALL $PROX -D no-library-checks - echo You may need to add $LD_LIBRARY_PATH to your LD_LIBRARY_PATH variable, a setup-chicken4x.sh echo file can be found in the current directory which should work for setting up to run chicken4x echo Testing iup $PREFIX/bin/csi -b -eval '(use iup)(print "Success")' + +