Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -31,11 +31,11 @@ # cgisetup/models/pgdb.scm # module source files MSRCFILES = dbmod.scm dbfile.scm debugprint.scm mtargs.scm commonmod.scm \ - ducttape-lib.scm pkts.scm dbi.scm autoload.scm + ducttape-lib.scm pkts.scm dbi.scm autoload.scm stml2.scm # ftail.scm rmtmod.scm commonmod.scm removed # MSRCFILES = ducttape-lib.scm pkts.scm stml2.scm cookie.scm mutils.scm \ # mtargs.scm commonmod.scm dbmod.scm adjutant.scm ulex.scm \ # rmtmod.scm apimod.scm @@ -44,10 +44,19 @@ dashboard-guimonitor.scm gutils.scm dcommon.scm tree.scm \ vg.scm OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) + +TMPMODS = $(SRCFILES:%.scm=tmpmods/%.scm) +OTMPMODS = $(SRCFILES:%.scm=tmpmods/%.o) + +tmpmods/%.scm : %.scm utils/makemodulewrap.sh + ./utils/makemodulewrap.sh $* + +tmpmods/%.o : tmpmods/%.scm + csc $(CSCOPTS) -J -c $< -o tmpmods/$*.o MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) # compiled import files MOIMPFILES = $(MSRCFILES:%.scm=%.import.o) @@ -217,11 +226,11 @@ echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new if ! diff -q megatest-fossil-hash.new megatest-fossil-hash.scm ; then echo copying .new to .scm;cp -f megatest-fossil-hash.new megatest-fossil-hash.scm;fi $(OFILES) $(GOFILES) : common_records.scm -%.o : %.scm $(MOFILES) +%.o : %.scm $(MOFILES) tmpmods/%.o csc $(CSCOPTS) -c $< $(MOFILES) $(PREFIX)/bin/.$(ARCHSTR)/mtest : mtest utils/mk_wrapper @echo Installing to PREFIX=$(PREFIX) $(INSTALL) mtest $(PREFIX)/bin/.$(ARCHSTR)/mtest Index: api.scm ================================================================== --- api.scm +++ api.scm @@ -18,11 +18,16 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(use srfi-69 posix) +(import srfi-69 + ;; posix + chicken.process-context.posix + chicken.time + chicken.string + ) (declare (unit api)) (declare (uses rmt)) (declare (uses db)) (declare (uses dbmod)) Index: archive.scm ================================================================== --- archive.scm +++ archive.scm @@ -16,11 +16,28 @@ ;; along with Megatest. If not, see . ;; ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use (prefix sqlite3 sqlite3:) srfi-1 posix regex regex-case srfi-69 format md5 message-digest srfi-18) +(import + (prefix sqlite3 sqlite3:) srfi-1 + ;; posix + regex regex-case srfi-69 format md5 message-digest srfi-18 + srfi-13 + + chicken.file + chicken.io + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.string + chicken.time + chicken.time.posix + chicken.condition + + ) (declare (unit archive)) (declare (uses db)) (declare (uses common)) Index: cgisetup/models/pgdb.scm ================================================================== --- cgisetup/models/pgdb.scm +++ cgisetup/models/pgdb.scm @@ -18,10 +18,20 @@ ;;====================================================================== ;; (declare (unit pgdb)) + +(import + chicken.sort + chicken.string + srfi-1 + srfi-69 + chicken.condition + typed-records + ) + ;; (declare (uses configf)) ;; ;; ;; I don't know how to mix compilation units and modules, so no module here. ;; ;; ;; ;; (module pgdb Index: client.scm ================================================================== --- client.scm +++ client.scm @@ -18,13 +18,28 @@ ;;====================================================================== ;; C L I E N T S ;;====================================================================== -(use srfi-18 extras tcp s11n srfi-1 posix regex srfi-69 hostinfo md5 - message-digest matchable spiffy uri-common intarweb http-client - spiffy-request-vars uri-common intarweb directory-utils) +(import srfi-18 + ;; extras tcp s11n + srfi-1 + ;; posix + regex srfi-69 + ;; hostinfo + md5 + message-digest matchable spiffy uri-common intarweb http-client + spiffy-request-vars uri-common intarweb + ;; directory-utils) + chicken.port + chicken.pretty-print + chicken.process-context.posix + chicken.string + chicken.time + system-information + + ) (declare (unit client)) (declare (uses common)) (declare (uses db)) Index: codescanlib.scm ================================================================== --- codescanlib.scm +++ codescanlib.scm @@ -16,18 +16,18 @@ ;; along with Megatest. If not, see . ;; ;; gotta compile with csc, doesn't work with csi -s for whatever reason -(use srfi-69) -(use matchable) -(use utils) -(use ports) -(use extras) -(use srfi-1) -(use posix) -(use srfi-12) +(import srfi-69) +(import matchable) +(import utils) +(import ports) +(import extras) +(import srfi-1) +(import posix) +(import srfi-12) ;; turn scheme file to a list of sexps, sexps of interest will be in the form of (define ( ) ) (define (load-scm-file scm-file) ;;(print "load "scm-file) (handle-exceptions Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -16,26 +16,67 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;;====================================================================== -(use srfi-1 data-structures posix regex-case (prefix base64 base64:) - format dot-locking csv-xml z3 udp ;; sql-de-lite - hostinfo md5 message-digest typed-records directory-utils stack - matchable regex posix (srfi 18) extras ;; tcp - (prefix nanomsg nmsg:) - (prefix sqlite3 sqlite3:) - pkts (prefix dbi dbi:) - ) - (declare (unit common)) (declare (uses commonmod)) +(declare (uses pkts)) +(declare (uses dbi)) + +(import + srfi-1 + srfi-69 + ;; data-structures posix + regex-case (prefix base64 base64:) + chicken.condition + chicken.file + chicken.file.posix + chicken.format + chicken.io + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.process.signal + chicken.string + chicken.sort + chicken.time + chicken.time.posix + + ;; dot-locking + ;; csv-xml + z3 + ;; udp ;; sql-de-lite + ;; hostinfo + md5 + message-digest typed-records + ;; directory-utils + sparse-vectors + stack + matchable regex + ;; posix + (srfi 18) + srfi-13 + + system-information + ;; extras ;; tcp + (prefix nanomsg nmsg:) + (prefix sqlite3 sqlite3:) + pkts + (prefix dbi dbi:) + ) + +;; (import posix-extras pathname-expand files) + (import commonmod) (include "common_records.scm") - +(define setenv set-environment-variable!) ;; (require-library margs) ;; (include "margs.scm") ;; (define old-exit exit) ;; @@ -199,12 +240,10 @@ ;; Miscellaneous (define *triggers-mutex* (make-mutex)) ;; block overlapping processing of triggers (define *numcpus-cache* (make-hash-table)) -(use posix-extras pathname-expand files) - ;; this plugs a hole in posix-extras in recent chicken versions > 4.9) #;(let-values (( (chicken-release-number chicken-major-version) (apply values (map string->number (take @@ -214,11 +253,11 @@ (or (> chicken-release-number 4) (and (eq? 4 chicken-release-number) (> chicken-major-version 9))))) (if resolve-pathname-broken? (define ##sys#expand-home-path pathname-expand)))) -(define (realpath x) (resolve-pathname (pathname-expand (or x "/dev/null")) )) +;; (define (realpath x) (resolve-pathname (pathname-expand (or x "/dev/null")) )) (define (common:get-this-exe-fullpath #!key (argv (argv))) (let* ((this-script (cond ((and (> (length argv) 2) Index: common_records.scm ================================================================== --- common_records.scm +++ common_records.scm @@ -16,11 +16,11 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -;; (use trace) +;; (import trace) (include "altdb.scm") ;; Some of these routines use: ;; @@ -205,11 +205,11 @@ ;; Brandon's pretty printer. It expands hashes and custom types in addition to regular pp (define (BBpp arg) (pp (BBpp_ arg))) -;(use define-macro) +;(import define-macro) (define-syntax inspect (syntax-rules () [(_ x) ;; (with-output-to-port (current-error-port) (printf "~a is: ~a\n" 'x (with-output-to-string (lambda () (BBpp x)))) Index: commonmod.scm ================================================================== --- commonmod.scm +++ commonmod.scm @@ -18,11 +18,11 @@ ;;====================================================================== (declare (unit commonmod)) -(use srfi-69) +(import srfi-69) (module commonmod * (import Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -20,15 +20,32 @@ ;;====================================================================== ;; Config file handling ;;====================================================================== -(use regex regex-case matchable) ;; directory-utils) (declare (unit configf)) (declare (uses process)) (declare (uses env)) (declare (uses keys)) + +(import + regex regex-case matchable + chicken.condition + chicken.file + chicken.io + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.sort + chicken.string + chicken.time + srfi-1 + srfi-13 + srfi-69 +) (include "common_records.scm") ;; return list (path fullpath configname) (define (find-config configname #!key (toppath #f)) Index: dashboard-context-menu.scm ================================================================== --- dashboard-context-menu.scm +++ dashboard-context-menu.scm @@ -21,18 +21,33 @@ ;;====================================================================== ;; implementation of context menu that pops up on ;; right click on test cell in Runs & Runs Summary Tabs ;;====================================================================== -(use format fmt) +(import format fmt) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) + +(import + srfi-1 + ;; posix + regex regex-case srfi-69 + +chicken.pathname +chicken.port +chicken.pretty-print +chicken.process +chicken.string +chicken.time +chicken.condition +chicken.process-context + + ) -(use srfi-1 posix regex regex-case srfi-69) -(use (prefix sqlite3 sqlite3:)) +(import (prefix sqlite3 sqlite3:)) (declare (unit dashboard-context-menu)) (declare (uses common)) (declare (uses db)) (declare (uses gutils)) Index: dashboard-guimonitor.scm ================================================================== --- dashboard-guimonitor.scm +++ dashboard-guimonitor.scm @@ -20,19 +20,31 @@ ;;====================================================================== ;; Test info panel ;;====================================================================== -(use format) +(import format) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) + +(import sqlite3 srfi-1 + ;; posix + regex regex-case srfi-69) -(use sqlite3 srfi-1 posix regex regex-case srfi-69) -(import (prefix sqlite3 sqlite3:)) +(import + (prefix sqlite3 sqlite3:) + chicken.file.posix + chicken.port + chicken.pretty-print + chicken.string + chicken.time + + +) (declare (unit dashboard-guimonitor)) (declare (uses common)) (declare (uses keys)) (declare (uses db)) (declare (uses tasks)) Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -20,18 +20,33 @@ ;;====================================================================== ;; Test info panel ;;====================================================================== -(use format fmt) +(import format fmt) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) -(use srfi-1 posix regex regex-case srfi-69) -(use (prefix sqlite3 sqlite3:)) +(import + srfi-1 + ;; posix + regex regex-case srfi-69 + chicken.file + chicken.file.posix + chicken.port + chicken.pretty-print + chicken.string + chicken.time + srfi-18 + chicken.condition + chicken.process-context + +) + +(import (prefix sqlite3 sqlite3:)) (declare (unit dashboard-tests)) (declare (uses common)) (declare (uses db)) (declare (uses gutils)) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -16,19 +16,22 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(use format) +(import format) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) (import canvas-draw-iup) -(use ducttape-lib) -(use sqlite3 srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors) ;; defstruct +(import ducttape-lib) +(import + sqlite3 srfi-1 + ;; posix + regex regex-case srfi-69 typed-records sparse-vectors) ;; defstruct (import (prefix sqlite3 sqlite3:)) (import dbfile) (declare (uses common)) (declare (uses margs)) Index: datashare.scm ================================================================== --- datashare.scm +++ datashare.scm @@ -15,29 +15,29 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ==> (module datashare -;; ==> (use ssax) -;; ==> (use sxml-serializer) -;; ==> (use sxml-modifications) -;; ==> (use regex) -;; ==> (use srfi-69) -;; ==> (use regex-case) -;; ==> (use posix) -;; ==> (use json) -;; ==> (use csv) -;; ==> (use srfi-18) -;; ==> (use format) +;; ==> (import ssax) +;; ==> (import sxml-serializer) +;; ==> (import sxml-modifications) +;; ==> (import regex) +;; ==> (import srfi-69) +;; ==> (import regex-case) +;; ==> (import posix) +;; ==> (import json) +;; ==> (import csv) +;; ==> (import srfi-18) +;; ==> (import format) ;; ==> -;; ==> (use (prefix iup iup:)) +;; ==> (import (prefix iup iup:)) ;; ==> (import (prefix ini-file ini:)) ;; ==> -;; ==> (use canvas-draw) +;; ==> (import canvas-draw) ;; ==> (import canvas-draw-iup) ;; ==> -;; ==> (use sqlite3 srfi-1 posix regex regex-case srfi-69) +;; ==> (import sqlite3 srfi-1 posix regex regex-case srfi-69) ;; ==> (import (prefix sqlite3 sqlite3:)) ;; ==> ;; ==> (declare (uses configf)) ;; ==> (declare (uses tree)) ;; ==> (declare (uses margs)) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -22,31 +22,53 @@ ;; Database access ;;====================================================================== ;; dbstruct vector containing all the relevant dbs like main.db, megatest.db, run.db etc -(use (srfi 18) - extras - tcp - stack - (prefix sqlite3 sqlite3:) - srfi-1 - posix - regex - regex-case - srfi-69 - csv-xml - s11n - md5 - message-digest - (prefix base64 base64:) - format - dot-locking - z3 - typed-records - matchable - files) +(import + (srfi 18) + ;; extras + ;; tcp + stack + (prefix sqlite3 sqlite3:) + srfi-1 + ;; posix + regex + regex-case + srfi-69 + ;; csv-xml + s11n + md5 + message-digest + (prefix base64 base64:) + ;; format + ;; dot-locking + z3 + typed-records + matchable + ;; files + srfi-13 + + chicken.condition + chicken.file + chicken.file.posix + chicken.format + chicken.io + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.sort + chicken.string + chicken.time + chicken.time.posix + + + + ) (declare (unit db)) (declare (uses common)) (declare (uses dbmod)) ;; (declare (uses debugprint)) Index: dcommon.scm ================================================================== --- dcommon.scm +++ dcommon.scm @@ -16,16 +16,33 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(use format) +(import format) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) (import canvas-draw-iup) -(use regex typed-records matchable) +(import regex typed-records matchable + + chicken.condition + chicken.file + chicken.file.posix + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.sort + chicken.string + chicken.time + srfi-1 + srfi-18 + srfi-69 + + ) (declare (unit dcommon)) (declare (uses gutils)) (declare (uses db)) Index: diff-report.scm ================================================================== --- diff-report.scm +++ diff-report.scm @@ -19,15 +19,28 @@ (declare (unit diff-report)) (declare (uses common)) (declare (uses rmt)) (declare (uses ducttape-lib)) -(include "common_records.scm") (import matchable fmt - ducttape-lib) + ducttape-lib + + chicken.port + chicken.pretty-print + chicken.sort + chicken.string + chicken.time + chicken.time.posix + srfi-1 + srfi-69 + srfi-13 + + ) + +(include "common_records.scm") (define css "") (define (diff:tests-mindat->hash tests-mindat) (let* ((res (make-hash-table))) Index: env.scm ================================================================== --- env.scm +++ env.scm @@ -18,11 +18,17 @@ ;;====================================================================== (declare (unit env)) -(use sql-de-lite) ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables) +(import + sql-de-lite ;; srfi-1 posix regex regex-case srfi-69 srfi-18 call-with-environment-variables) +chicken.string +srfi-1 +srfi-69 +chicken.process-context +) (define (env:open-db fname) (let* ((db-exists (common:file-exists? fname)) (db (open-database fname))) (if (not db-exists) Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -17,12 +17,29 @@ ;; along with Megatest. If not, see . ;; ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use srfi-1 posix regex srfi-69 directory-utils call-with-environment-variables posix-extras - z3 csv typed-records pathname-expand matchable) +(import + srfi-1 + ;; posix regex srfi-69 + ;; directory-utils + ;; call-with-environment-variables posix-extras + z3 + ;; csv + typed-records pathname-expand matchable + chicken.file + chicken.port + chicken.pretty-print + chicken.process + chicken.string + chicken.time + srfi-18 + srfi-69 + chicken.process-context + regex + ) (declare (unit ezsteps)) (declare (uses db)) (declare (uses common)) (declare (uses items)) Index: gen-data-for-graph.scm ================================================================== --- gen-data-for-graph.scm +++ gen-data-for-graph.scm @@ -13,11 +13,11 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use foof-loop sql-de-lite posix) +(import foof-loop sql-de-lite posix) (define beginning-2016 1451636435.0) (define now (current-seconds)) (define one-year-ago (- now (* 365 24 60 60))) Index: genexample.scm ================================================================== --- genexample.scm +++ genexample.scm @@ -17,11 +17,23 @@ ;; along with Megatest. If not, see . ;;====================================================================== (declare (unit genexample)) -(use posix regex matchable) +(import + regex matchable + chicken.file + chicken.file.posix + chicken.io + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.string + srfi-1 + srfi-69 + srfi-13 + ) (include "db_records.scm") (define genexample:example-logpro #<. ;; -(use (prefix sqlite3 sqlite3:) srfi-18) +(import + (prefix sqlite3 sqlite3:) srfi-18 + chicken.file + chicken.process + chicken.time + sqlite3 + chicken.condition + chicken.string + ) (declare (unit lock-queue)) (declare (uses common)) (declare (uses tasks)) @@ -247,7 +255,7 @@ (loop (lock-queue:any-younger? dbdat mystart test-id))))))))) (sqlite3:finalize! db) result)))))) -;; (use trace) +;; (import trace) ;; (trace lock-queue:get-lock lock-queue:release-lock lock-queue:wait-turn lock-queue:any-younger? lock-queue:set-state) Index: margs.scm ================================================================== --- margs.scm +++ margs.scm @@ -16,10 +16,15 @@ ;; along with Megatest. If not, see . (declare (unit margs)) ;; (declare (uses common)) + +(import chicken.process-context + srfi-1 + srfi-69 + ) (define args:arg-hash (make-hash-table)) (define (args:get-arg arg . default) (if (null? default) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -58,10 +58,32 @@ ;; (import ftail) (import dbmod commonmod dbfile) + +(import +chicken.condition + chicken.file + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.process.signal + chicken.repl + chicken.sort + chicken.string + chicken.time + chicken.time.posix + srfi-1 + srfi-13 + srfi-69 + system-information + + ) (define *db* #f) ;; this is only for the repl, do not use in general!!!! (include "common_records.scm") (include "key_records.scm") @@ -89,11 +111,11 @@ (define *usage-log-file* #f) ;; put path to file for logging usage in this var in the ~/.megatestrc file (define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file (dbfile:db-init-proc db:initialize-main-db) -;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file +;; load the ~/.megatestrc file, put (import trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file ;; (let ((debugcontrolf (conc (get-environment-variable "HOME") "/.megatestrc"))) (if (common:file-exists? debugcontrolf) (load debugcontrolf))) @@ -170,11 +192,11 @@ -tagexpr tag1,tag2%,.. : select tests with tags matching expression Test helpers (for use inside tests) -step stepname - -test-status : set the state and status of a test (use :state and :status) + -test-status : set the state and status of a test (import :state and :status) -setlog logfname : set the path/filename to the final log relative to the test directory. may be used with -test-status -set-toplog logfname : set the overall log for a suite of sub-tests -summarize-items : for an itemized test create a summary html -m comment : insert a comment for this test @@ -253,11 +275,11 @@ will substitute %s for the sheet name in generating multiple sheets) -o : output file for refdb2dat (defaults to stdout) -archive cmd : archive runs specified by selectors to one of disks specified in the [archive-disks] section. - cmd: keep-html, restore, save, save-remove, get, replicate-db (use + cmd: keep-html, restore, save, save-remove, get, replicate-db (import -dest to set destination), -include path1,path2... to get or save specific files -generate-html : create a simple html dashboard for browsing your runs -generate-html-structure : create a top level html veiw to list targets/runs and a Run view within each run directory. -list-run-time : list time requered to complete runs. It supports following switches -run-patt -target-patt -dumpmode Index: mlaunch.scm ================================================================== --- mlaunch.scm +++ mlaunch.scm @@ -23,11 +23,11 @@ ;; take jobs from the given queue and keep launching them keeping ;; the cpu load at the targeted level ;; ;;====================================================================== -(use sqlite3 srfi-1 posix regex regex-case srfi-69 format) +(import sqlite3 srfi-1 posix regex regex-case srfi-69 format) (declare (unit mlaunch)) (declare (uses db)) (declare (uses common)) Index: monitor.scm ================================================================== --- monitor.scm +++ monitor.scm @@ -15,11 +15,11 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking) +(import sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking) (import (prefix sqlite3 sqlite3:)) (declare (unit runs)) (declare (uses db)) (declare (uses common)) Index: mt.scm ================================================================== --- mt.scm +++ mt.scm @@ -15,11 +15,26 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking (srfi 18) posix-extras directory-utils call-with-environment-variables) +(import sqlite3 srfi-1 + ;; posix + regex regex-case srfi-69 + ;; dot-locking + (srfi 18) + ;; posix-extras directory-utils call-with-environment-variables + chicken.file + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context.posix + chicken.string + chicken.time + chicken.condition + chicken.process-context + ) (import (prefix sqlite3 sqlite3:)) (declare (unit mt)) (declare (uses db)) (declare (uses common)) Index: mtexec.scm ================================================================== --- mtexec.scm +++ mtexec.scm @@ -36,11 +36,11 @@ ;; (declare (uses common)) (declare (uses margs)) (declare (uses configf)) ;; (declare (uses rmt)) -;; (use ducttape-lib) +;; (import ducttape-lib) (include "megatest-version.scm") (include "megatest-fossil-hash.scm") ;; (require-library stml) Index: mtut.scm ================================================================== --- mtut.scm +++ mtut.scm @@ -39,11 +39,11 @@ (prefix dbi dbi:) (prefix sqlite3 sqlite3:) nanomsg) -(use ducttape-lib) +(import ducttape-lib) (include "megatest-fossil-hash.scm") (require-library stml) @@ -832,11 +832,11 @@ (with-output-to-file (conc pktsdir "/" uuid ".pkt") (lambda () (print pkt)))))) -;; (use trace)(trace create-run-pkt) +;; (import trace)(trace create-run-pkt) (define (contains list x) (cond ((null? list) #f) ((eq? (car list) x) #t) (else (contains (cdr list) x)))) ;; collect all needed data and create run pkts for contours with changed inputs ;; (define (generate-run-pkts mtconf toppath) @@ -1337,11 +1337,11 @@ "") (if (member action '("-run" "-rerun-clean" "-rerun-all" "-kill-rerun")) "-rerun DEAD,ABORT,KILLED" "")) pkta))) -;; (use trace)(trace pkt->cmdline) +;; (import trace)(trace pkt->cmdline) (define (write-pkt pktsdir uuid pkt) (if pktsdir (with-output-to-file (conc pktsdir "/" uuid ".pkt") Index: newdashboard.scm ================================================================== --- newdashboard.scm +++ newdashboard.scm @@ -16,18 +16,18 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;;====================================================================== -(use format) +(import format) -(use (prefix iup iup:)) +(import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) (import canvas-draw-iup) -(use sql-de-lite srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors ;; defstruct +(import sql-de-lite srfi-1 posix regex regex-case srfi-69 typed-records sparse-vectors ;; defstruct (prefix dbi dbi:)) (declare (uses common)) (declare (uses megatest-version)) (declare (uses margs)) Index: ods.scm ================================================================== --- ods.scm +++ ods.scm @@ -14,11 +14,18 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use csv-xml regex) +(import ;; csv-xml + chicken.port + chicken.process + chicken.string + regex + srfi-13 + ) + (declare (unit ods)) (declare (uses common)) (define ods:dirs '("Configurations2" Index: portlogger.scm ================================================================== --- portlogger.scm +++ portlogger.scm @@ -26,11 +26,19 @@ ;; posix srfi-69 ;; hostinfo ;; dot-locking z3 - (prefix sqlite3 sqlite3:)) + (prefix sqlite3 sqlite3:) + +chicken.condition +chicken.file +chicken.process +chicken.process-context.posix +chicken.string + + ) (declare (unit portlogger)) (declare (uses db)) ;; lsof -i Index: process.scm ================================================================== --- process.scm +++ process.scm @@ -20,11 +20,20 @@ ;;====================================================================== ;; Process convience utils ;;====================================================================== -(use regex directory-utils) +(import + regex directory-utils + chicken.condition + chicken.file + chicken.io + chicken.process + chicken.process-context.posix + chicken.string + srfi-18 +) (declare (unit process)) (define (process:conservative-read port) (let loop ((res "")) (if (not (eof-object? (peek-char port))) Index: records-vs-vectors-vs-coops.scm ================================================================== --- records-vs-vectors-vs-coops.scm +++ records-vs-vectors-vs-coops.scm @@ -17,11 +17,11 @@ ;; (include "vg.scm") ;; (declare (uses vg)) -(use foof-loop defstruct coops) +(import foof-loop defstruct coops) (defstruct obj type fill-color angle) (define (make-vg:obj)(make-vector 3)) (define-inline (vg:obj-get-type vec) (vector-ref vec 0)) @@ -29,11 +29,11 @@ (define-inline (vg:obj-get-angle vec) (vector-ref vec 2)) (define-inline (vg:obj-set-type! vec val)(vector-set! vec 0 val)) (define-inline (vg:obj-set-fill-color! vec val)(vector-set! vec 1 val)) (define-inline (vg:obj-set-angle! vec val)(vector-set! vec 2 val)) -(use simple-exceptions) +(import simple-exceptions) (define vgs:obj-exn (make-exception "wrong record type, expected vgs:obj." 'assert)) (define (make-vgs:obj)(let ((v (make-vector 4)))(vector-set! v 0 'vgs:obj) v)) (define-inline (vgs:obj-type vec)(if (eq? (vector-ref vec 0) 'vgs:obj)(vector-ref vec 1)(raise (vgs:obj-exn 'vgs:obj-type 'xpr)))) (define-inline (vgs:obj-fill-color vec)(if (eq? (vector-ref vec 0) 'vgs:obj)(vector-ref vec 2)(raise (vgs:obj-exn 'vgs:obj-fill-color 'xpr)))) (define-inline (vgs:obj-angle vec)(if (eq? (vector-ref vec 0) 'vgs:obj)(vector-ref vec 3)(raise (vgs:obj-exn 'vgs:obj-angle 'xpr)))) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -16,11 +16,23 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(use format typed-records) ;; RADT => purpose of json format?? +(import + format typed-records + chicken.condition + chicken.port + chicken.pretty-print + chicken.sort + chicken.string + chicken.time + srfi-1 + srfi-18 + srfi-69 + + ) ;; RADT => purpose of json format?? (declare (unit rmt)) (declare (uses api)) (declare (uses http-transport)) (declare (uses dbfile)) Index: runconfig.scm ================================================================== --- runconfig.scm +++ runconfig.scm @@ -18,11 +18,18 @@ ;;====================================================================== ;; read a config file, loading only the section pertinent ;; to this run field1val/field2val/field3val ... ;;====================================================================== -(use format directory-utils) +(import format directory-utils + chicken.port + chicken.pretty-print + chicken.string + chicken.time + srfi-1 + srfi-69 + chicken.process-context) (declare (unit runconfig)) (declare (uses common)) (include "common_records.scm") Index: runs-launch-loop-test.scm ================================================================== --- runs-launch-loop-test.scm +++ runs-launch-loop-test.scm @@ -13,11 +13,11 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use srfi-69) +(import srfi-69) (define (runs:queue-next-hed tal reg n regful) (if regful (car reg) (car tal))) @@ -36,11 +36,11 @@ (cdr reg) (if (eq? (length tal) 1) '() reg))) -(use trace) +(import trace) (trace runs:queue-next-hed runs:queue-next-tal runs:queue-next-reg) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -18,14 +18,31 @@ ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') (import (prefix sqlite3 sqlite3:) srfi-1 ;; posix - regex regex-case srfi-69 (srfi 18) + regex regex-case srfi-69 (srfi 18) + srfi-13 ;; posix-extras directory-utils pathname-expand typed-records format sxml-serializer - sxml-modifications matchable) + sxml-modifications matchable + chicken.condition + chicken.file + chicken.file.posix + chicken.io + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.process.signal + chicken.sort + chicken.string + chicken.time + chicken.time.posix + system-information +) (declare (unit runs)) (declare (uses db)) (declare (uses common)) (declare (uses items)) Index: sauthorize.scm ================================================================== --- sauthorize.scm +++ sauthorize.scm @@ -15,18 +15,18 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use defstruct) -(use scsh-process) - -(use srfi-18) -(use srfi-19) -(use refdb) - -(use sql-de-lite srfi-1 posix regex regex-case srfi-69) +(import defstruct) +(import scsh-process) + +(import srfi-18) +(import srfi-19) +(import refdb) + +(import sql-de-lite srfi-1 posix regex regex-case srfi-69) ;(declare (uses common)) ;(declare (uses configf)) (declare (uses margs)) (include "megatest-version.scm") Index: serialize-env.scm ================================================================== --- serialize-env.scm +++ serialize-env.scm @@ -1,7 +1,7 @@ -(use z3) -(use base64) +(import z3) +(import base64) (let* ((env-str (with-output-to-string (lambda () (pp (get-environment-variables))))) (zipped-env-str (z3:encode-buffer env-str)) (b64-env-str (base64-encode zipped-env-str))) (print b64-env-str)) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -15,11 +15,25 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; (import - (srfi 18) + chicken.file + chicken.file.posix + chicken.io + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.sort + chicken.string + chicken.time + srfi-4 + system-information + + (srfi 18) ;; extras chicken.tcp s11n srfi-1 @@ -28,11 +42,12 @@ ;; hostinfo md5 message-digest ;; directory-utils posix-extras matchable ;; utils - + chicken.condition + spiffy uri-common intarweb http-client spiffy-request-vars ) (declare (unit server)) Index: sharedat.scm ================================================================== --- sharedat.scm +++ sharedat.scm @@ -15,28 +15,28 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . -(use defstruct) - -;; (use ssax) -;; (use sxml-serializer) -;; (use sxml-modifications) -;; (use regex) -;; (use srfi-69) -;; (use regex-case) -;; (use posix) -;; (use json) -;; (use csv) -(use srfi-18) -(use format) +(import defstruct) + +;; (import ssax) +;; (import sxml-serializer) +;; (import sxml-modifications) +;; (import regex) +;; (import srfi-69) +;; (import regex-case) +;; (import posix) +;; (import json) +;; (import csv) +(import srfi-18) +(import format) (require-library ini-file) (import (prefix ini-file ini:)) -(use sql-de-lite srfi-1 posix regex regex-case srfi-69) +(import sql-de-lite srfi-1 posix regex regex-case srfi-69) ;; (import (prefix sqlite3 sqlite3:)) ;; (declare (uses configf)) ;; (declare (uses tree)) (declare (uses margs)) Index: spublish.scm ================================================================== --- spublish.scm +++ spublish.scm @@ -14,17 +14,17 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . -(use defstruct) -(use scsh-process) -(use refdb) -(use srfi-18) -(use srfi-19) -(use format) -(use sql-de-lite srfi-1 posix regex regex-case srfi-69) +(import defstruct) +(import scsh-process) +(import refdb) +(import srfi-18) +(import srfi-19) +(import format) +(import sql-de-lite srfi-1 posix regex regex-case srfi-69) ;(declare (uses configf)) ;; (declare (uses tree)) (declare (uses margs)) @@ -32,11 +32,11 @@ (include "megatest-fossil-hash.scm") ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. (include "sauth-paths.scm") (include "sauth-common.scm") (define (toplevel-command . args) #f) -(use readline) +(import readline) ;; ;; GLOBALS ;; (define *spublish:current-tab-number* 0) @@ -505,11 +505,11 @@ (define (toplevel-command . args) #f) (define (spublish:shell area) ; (print area) - (use readline) + (import readline) (let* ((path '()) (prompt "spublish> ") (args (argv)) (usr (current-user-name) ) Index: sretrieve.scm ================================================================== --- sretrieve.scm +++ sretrieve.scm @@ -15,16 +15,16 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use defstruct) -(use scsh-process) -(use srfi-18) -(use srfi-19) -(use refdb) -(use sql-de-lite srfi-1 posix regex regex-case srfi-69) +(import defstruct) +(import scsh-process) +(import srfi-18) +(import srfi-19) +(import refdb) +(import sql-de-lite srfi-1 posix regex regex-case srfi-69) ;(declare (uses common)) ;(declare (uses configf)) (declare (uses margs)) (include "megatest-version.scm") @@ -32,11 +32,11 @@ ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. (include "sauth-paths.scm") (include "sauth-common.scm") (define (toplevel-command . args) #f) -(use readline) +(import readline) ;; @@ -719,11 +719,11 @@ Version: " megatest-fossil-hash) ) ;(define (toplevel-command . args) #f) (define (sretrieve:shell area) ; (print area) - (use readline) + (import readline) (let* ((path '()) (prompt "sretrieve> ") (args (argv)) (usr (current-user-name) ) (top-areas (sretrieve:get-accessable-projects area)) @@ -916,11 +916,11 @@ ; res))) (define (toplevel-command . args) #f) (define (sretrieve:process-action action . args) ; (print action) - ; (use readline) + ; (import readline) (case (string->symbol action) ((get) (if (< (length args) 2) (begin (sauth:print-error "Missing arguments; " ) Index: stml2/cookie.scm ================================================================== --- stml2/cookie.scm +++ stml2/cookie.scm @@ -45,11 +45,11 @@ ;; (declare (unit cookie)) (module cookie * -(import chicken scheme data-structures extras srfi-13 ports posix) +(import (chicken base) scheme queues srfi-13 (chicken port) (chicken io)(chicken file) (chicken format) (chicken string) (chicken time posix)) (require-extension srfi-1 srfi-13 srfi-14 regex) ;; (use srfi-1 srfi-13 srfi-14 regex) ;; (declare (export parse-cookie-string construct-cookie-string)) Index: stml2/formdat.scm ================================================================== --- stml2/formdat.scm +++ stml2/formdat.scm @@ -10,12 +10,11 @@ ;; (declare (unit formdat)) (module formdat * -(import chicken scheme data-structures extras srfi-13 ports ) -(use html-filter) +(import chicken scheme data-structures extras srfi-13 ports html-filter) -(use regex) -(require-extension srfi-69) +(import regex) +(import srfi-69) ) Index: stml2/html-filter.scm ================================================================== --- stml2/html-filter.scm +++ stml2/html-filter.scm @@ -11,11 +11,11 @@ (module html-filter * (import chicken scheme data-structures extras srfi-13 ports ) -(use misc-stml) +(import misc-stml) -(require-extension regex) +(import regex) ;; ) Index: stml2/misc-stml.scm ================================================================== --- stml2/misc-stml.scm +++ stml2/misc-stml.scm @@ -16,9 +16,8 @@ (module misc-stml * (import chicken scheme data-structures extras srfi-13 ports posix) -(use regex (prefix dbi dbi:)) -(use (prefix crypt c:)) -(use (prefix dbi dbi:)) +(import regex (prefix dbi dbi:)) +(import (prefix crypt c:)) ) Index: stml2/rollup-pages.scm ================================================================== --- stml2/rollup-pages.scm +++ stml2/rollup-pages.scm @@ -1,6 +1,6 @@ -(use regex posix srfi-69 srfi-1) +(import regex posix srfi-69 srfi-1) (define extract-rx (regexp "pages\\/(.*)_(view|ctrl).scm")) (define (print-page-wrapper lookup page) (print "(define (pages:" page " session db shared)") Index: stml2/session.scm ================================================================== --- stml2/session.scm +++ stml2/session.scm @@ -11,10 +11,9 @@ (module session * (import chicken scheme data-structures extras srfi-13 ports posix files srfi-1) -(use (prefix dbi dbi:) srfi-69) -(require-extension regex) -(use cookie stmlcommon) ;; (declare (uses cookie)) +(import (prefix dbi dbi:) srfi-69 regex) +(import cookie stmlcommon) ;; (declare (uses cookie)) ) Index: stml2/setup.scm ================================================================== --- stml2/setup.scm +++ stml2/setup.scm @@ -9,13 +9,12 @@ (module setup * (import chicken scheme data-structures extras srfi-13 ports posix) -(uses session misc-stml) +(import session misc-stml) ;; (declare (unit setup))se ;; (declare (uses session)) -(require-extension srfi-69) -(require-extension regex) +(import srfi-69 regex) ) Index: stml2/spiffyserver.scm ================================================================== --- stml2/spiffyserver.scm +++ stml2/spiffyserver.scm @@ -1,8 +1,8 @@ ;; This doesn't work yet ;; -(use spiffy cgi-handler) +(import spiffy cgi-handler) (spiffy-debug-mode #t) (spiffy-file-ext-handlers `(("drcdb" . ,(cgi-handler* "/path/to/drcdb")))) Index: stml2/sqlite3.scm ================================================================== --- stml2/sqlite3.scm +++ stml2/sqlite3.scm @@ -9,11 +9,11 @@ ;; ;; I used this to get a simple interactive sqlite editor on the nokia n800 ;; since I couldn't get sqlite3 to install (for reasons I can't remember). -(use sqlite3) +(import sqlite3) (define args (argv)) (define num-args (length args)) (define dbname #f) Index: stml2/stml2.scm ================================================================== --- stml2/stml2.scm +++ stml2/stml2.scm @@ -12,17 +12,39 @@ ;; (declare (unit stml)) (module stml2 * -(import chicken scheme data-structures extras srfi-13 ports posix srfi-69 files srfi-1) + (import -(import cookie) -(use (prefix dbi dbi:) (prefix crypt c:) typed-records) + (chicken base) + (chicken blob) + (chicken condition) + (chicken file) + (chicken format) + (chicken io) + (chicken pathname) + (chicken port) + (chicken process) + (chicken process-context posix) + (chicken process-context) + (chicken random) + (chicken string) + (chicken time posix) + (chicken time) + (prefix crypt c:) + (prefix dbi dbi:) + cookie + queues + regex + scheme + srfi-1 + srfi-13 + srfi-69 + typed-records -;; (declare (uses misc-stml)) -(use regex) + ) ;; The (usually global) sdat contains everything about the session ;; (defstruct sdat ;; database @@ -421,11 +443,11 @@ ;; (s:get-key 'n 1) => "n99e1882" n=number 99e is the week number since 1970, remainder is random ;; (s:key->val "n1882") => 1 ;; ;; first letter is a type: n=number, s=string, b=boolean (define (s:get-key key-type val) - (let ((mkrandstr (lambda (innum)(number->string (random innum) 16))) + (let ((mkrandstr (lambda (innum)(number->string (pseudo-random-integer innum) 16))) (week (number->string (quotient (current-seconds) (* 7 24 60 60)) 16))) (let loop ((siz 1000) (key (conc key-type week (mkrandstr 100))) (num 0)) (if (s:session-var-get key) ;; have a collision @@ -649,11 +671,11 @@ #;(define (session:get-nth-char nth) (substring session:valid-chars nth (+ nth 1))) #;(define (session:get-rand-char) - (session:get-nth-char (random session:num-valid-chars))) + (session:get-nth-char (pseudo-random-integer session:num-valid-chars))) #;(define (session:make-rand-string len) (let loop ((res "") (n 1)) (if (> n len) res @@ -664,11 +686,11 @@ ;; #;(define (session:generic-make-rand-string len seed-string) (let ((num-chars (string-length seed-string))) (let loop ((res "") (n 1)) - (let ((char-num (random num-chars))) + (let ((char-num (pseudo-random-integer num-chars))) (if (> n len) res (loop (string-append res (substring seed-string char-num (+ char-num 1))) (+ n 1))))))) ;; Rely on crypt egg's default settings being secure enough, accept @@ -732,12 +754,12 @@ (else #f))) ;; NB// this is *illegal* pgint (define (s:illegal-pgint val) (cond - ((> val 2147483647) 1) - ((< val -2147483648) -1) + ((> val 2147483640.0) 1) ;; 2147483647 + ((< val -2147483640.0) -1) ;; -2147483648 (else #f))) (define (s:any->pgint val) (let ((n (s:any->number val))) (if n @@ -1105,16 +1127,16 @@ ;; (s:process-cgi-input (caaar dat)) (define (formdat:load-all-port inp) (let* ((formdat (make-formdat:formdat)) (debugp #f)) - ;; (open-output-file (conc "/tmp/delme-" (current-user-id) ".log")))) + ;; (open-output-file (conc "/tmp/delme-" (current-user-id) ".log")))) ;; (write-string (read-string #f inp) #f debugp) ;; destroys all data! (formdat:initialize formdat) - (let ((alldats (formdat:dat->list inp 10e6 debug-port: debugp))) + (let ((alldats (formdat:dat->list inp 10e6 debug-port: #f debugp))) - (if debugp (format debugp "formdat : alldats: ~A\n" alldats)) + #;(if debugp (format debugp "formdat : alldats: ~A\n" alldats)) (let ((firstitem (car alldats)) (multipass #f)) (if (and (not (null? firstitem)) (not (null? (car firstitem)))) @@ -1150,11 +1172,11 @@ (if (and (not (null? alldats)) (not (null? (car alldats))) (not (null? (caar alldats)))) (formdat:load formdat (s:process-cgi-input (caaar alldats))))) ;; munged)) ;; (format debugp "formdat : name: ~A content: ~A\n" name content) - (if debugp (close-output-port debugp)) + #;(if debugp (close-output-port debugp)) ;; (sdat-formdat-set! s:session formdat) formdat)))) #| (define inp (open-input-file "tests/example.post.in")) @@ -1429,11 +1451,11 @@ (define (session:get-nth-char nth) (substring session:valid-chars nth (+ nth 1))) (define (session:get-rand-char) - (session:get-nth-char (random session:num-valid-chars))) + (session:get-nth-char (pseudo-random-integer session:num-valid-chars))) (define (session:make-rand-string len) (let loop ((res "") (n 1)) (if (> n len) res @@ -1444,11 +1466,11 @@ ;; (define (session:generic-make-rand-string len seed-string) (let ((num-chars (string-length seed-string))) (let loop ((res "") (n 1)) - (let ((char-num (random num-chars))) + (let ((char-num (pseudo-random-integer num-chars))) (if (> n len) res (loop (string-append res (substring seed-string char-num (+ char-num 1))) (+ n 1))))))) @@ -1707,11 +1729,11 @@ ;; The 'auto method will distribute dbs across the disk using hash ;; of user host and user. TODO ;; (if (eq? dbfname 'auto) ;; This is the auto assignment of a db based on hash of IP (let ((dbpath (pathname-directory dbfname))) ;; do a couple sanity checks here to make setting up easier (if debugmode (session:log self "INFO: setting up for sqlite3 db access to " dbfname)) - (if (not (file-write-access? dbpath)) + (if (not (file-writable? dbpath)) (session:log self "WARNING: Cannot write to " dbpath) (if debugmode (session:log self "INFO: " dbpath " is writeable"))) (if (file-exists? dbfname) (begin ;; (session:log self "setting dbexists to #t") Index: stml2/stmlcommon.scm ================================================================== --- stml2/stmlcommon.scm +++ stml2/stmlcommon.scm @@ -13,8 +13,8 @@ (module stmlcommon * (import chicken scheme data-structures extras srfi-13 ports posix) -(use (prefix dbi dbi:) regex (prefix crypt c:) srfi-69) +(import (prefix dbi dbi:) regex (prefix crypt c:) srfi-69) ) Index: stml2/stmlrun.scm ================================================================== --- stml2/stmlrun.scm +++ stml2/stmlrun.scm @@ -11,9 +11,9 @@ ;; (require-extension syntax-case) ;; (declare (run-time-macros)) ;; (include "stmlcommon.scm") -(require-library stml) +(import stml) (stml:main #f) Index: stml2/test.scm ================================================================== --- stml2/test.scm +++ stml2/test.scm @@ -1,8 +1,7 @@ -(use test md5) +(import test md5) -(require-extension sqlite3) (import (prefix sqlite3 sqlite3:)) (require-library dbi) ;; (declare (uses stml)) Index: subrun.scm ================================================================== --- subrun.scm +++ subrun.scm @@ -16,13 +16,28 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use (prefix sqlite3 sqlite3:) srfi-1 posix regex regex-case srfi-69 (srfi 18) - posix-extras directory-utils pathname-expand typed-records format - call-with-environment-variables) +(import + (prefix sqlite3 sqlite3:) srfi-1 + ;; posix + regex regex-case srfi-69 (srfi 18) + ;; posix-extras directory-utils pathname-expand + typed-records + ;; format + ;; call-with-environment-variables + +chicken.file +chicken.file.posix +chicken.irregex +chicken.process +chicken.string +chicken.time +chicken.process-context + + ) (declare (unit subrun)) ;;(declare (uses runs)) (declare (uses db)) (declare (uses common)) ;;(declare (uses items)) Index: synchash.scm ================================================================== --- synchash.scm +++ synchash.scm @@ -20,12 +20,12 @@ ;;====================================================================== ;; A hash of hashes that can be kept in sync by sending minial deltas ;;====================================================================== -(use format) -(use srfi-1 srfi-69 sqlite3) +(import format) +(import srfi-1 srfi-69 sqlite3) (import (prefix sqlite3 sqlite3:)) (declare (unit synchash)) (declare (uses db)) (declare (uses server)) Index: tasks.scm ================================================================== --- tasks.scm +++ tasks.scm @@ -23,12 +23,29 @@ (declare (uses db)) (declare (uses rmt)) (declare (uses common)) (declare (uses pgdb)) -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking format) -(import (prefix sqlite3 sqlite3:)) +(import + sqlite3 srfi-1 + ;; posix + regex regex-case srfi-69 + ;; dot-locking + format + (prefix sqlite3 sqlite3:) + chicken.condition + chicken.file + chicken.file.posix + chicken.process + chicken.process-context.posix + chicken.process.signal + chicken.string + chicken.time + srfi-18 + srfi-13 + system-information + ) (import dbfile) ;; (import pgdb) ;; pgdb is a module (include "task_records.scm") Index: tcmt.scm ================================================================== --- tcmt.scm +++ tcmt.scm @@ -21,13 +21,16 @@ ;; ;; 1. Run the megatest process and pass it all the needed parameters ;; 2. Every five seconds check for state/status changes and print the info ;; -(use srfi-1 posix srfi-69 srfi-18 regex defstruct) +(import + srfi-1 + ;; posix + srfi-69 srfi-18 regex defstruct) -(use trace) +(import trace) ;; (trace-call-sites #t) (declare (uses margs)) (declare (uses rmt)) (declare (uses common)) Index: tdb.scm ================================================================== --- tdb.scm +++ tdb.scm @@ -28,11 +28,21 @@ sqlite3 srfi-1 ;; posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64 (prefix sqlite3 sqlite3:) - (prefix base64 base64:)) + (prefix base64 base64:) + chicken.file.posix + chicken.io + chicken.port + chicken.pretty-print + chicken.sort + chicken.string + chicken.time + chicken.condition + srfi-69 +) (declare (unit tdb)) (declare (uses common)) (declare (uses keys)) (declare (uses ods)) Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -30,15 +30,40 @@ ;; (declare (uses dcommon)) ;; needed for the steps processing (declare (uses items)) (declare (uses runconfig)) ;; (declare (uses sdb)) (declare (uses server)) -;;(declare (uses stml2)) +(declare (uses stml2)) -(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) -(import (prefix sqlite3 sqlite3:)) -(require-library stml) +(import + sqlite3 srfi-1 + ;; posix regex regex-case srfi-69 + ;; dot-locking + ;; tcp directory-utils + (prefix sqlite3 sqlite3:) + stml2 + chicken.condition + chicken.file + chicken.file.posix + chicken.format + chicken.io + chicken.pathname + chicken.port + chicken.pretty-print + chicken.process + chicken.process-context + chicken.process-context.posix + chicken.sort + chicken.string + chicken.time + srfi-13 + srfi-18 + srfi-69 + system-information + regex + + ) (include "common_records.scm") (include "key_records.scm") (include "db_records.scm") (include "run_records.scm") Index: tree.scm ================================================================== --- tree.scm +++ tree.scm @@ -16,17 +16,28 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(use format) +(import format) (require-library iup) (import (prefix iup iup:)) -(use canvas-draw) +(import canvas-draw) -(use sqlite3 srfi-1 posix regex regex-case srfi-69) -(import (prefix sqlite3 sqlite3:)) +(import + sqlite3 srfi-1 + ;; posix + regex regex-case srfi-69 + (prefix sqlite3 sqlite3:) + chicken.port + chicken.pretty-print + chicken.string + chicken.time + srfi-13 + chicken.bitwise + srfi-69 + ) (declare (unit tree)) (declare (uses margs)) (declare (uses launch)) ;; (declare (uses megatest-version)) ADDED utils/makemodulewrap.sh Index: utils/makemodulewrap.sh ================================================================== --- /dev/null +++ utils/makemodulewrap.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +MODNAME=$1 + +mkdir -p tmpmods + +echo "(module $MODNAME + * + +(import + scheme + chicken.base) + +(include \"$MODNAME.scm\") +)" > tmpmods/$MODNAME.scm Index: vg-test.scm ================================================================== --- vg-test.scm +++ vg-test.scm @@ -13,21 +13,21 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use canvas-draw iup foof-loop) +(import canvas-draw iup foof-loop) (import canvas-draw-iup) (load "vg.scm") (define numtorun 1000) ;; (if (> (length (argv)) 1) ;; (string->number (cadr (argv))) ;; 1000)) - (use trace) + (import trace) ;; (trace ;; ;; vg:draw-rect ;; ;; vg:grow-rect ;; vg:get-extents-for-objs ;; vg:components-get-extents Index: vg.scm ================================================================== --- vg.scm +++ vg.scm @@ -16,15 +16,20 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') -(use typed-records srfi-1) +(import typed-records srfi-1) (declare (unit vg)) -(use canvas-draw iup) -(import canvas-draw-iup) +(import canvas-draw iup) +(import + canvas-draw-iup + chicken.bitwise + srfi-69 + chicken.string + ) (include "vg_records.scm") ;; ;; structs ;; ;; Index: vg_records.scm ================================================================== --- vg_records.scm +++ vg_records.scm @@ -17,11 +17,11 @@ ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; -(use simple-exceptions) +(import simple-exceptions) (define vg:lib-exn (make-exception "wrong record type, expected vg:lib." 'assert)) (define (pmake-vg:lib . params)(let ((v (if (null? params)(make-vector 2)(apply vector 'vg:lib params)))) v)) (define (make-vg:lib #!key (comps #f) ) @@ -30,11 +30,11 @@ (define-inline (vg:lib-comps vec)(if (eq? (vector-ref vec 0) 'vg:lib)(vector-ref vec 1)(raise (vg:lib-exn 'vg:lib-comps 'xpr)))) (define-inline (vg:lib-comps-set! vec val)(if (eq? (vector-ref vec 0) 'vg:lib)(vector-set! vec 1 val)(raise (vg:lib-exn 'comps)))) ;; Generated using make-vector-record -safe vg comp objs name file -(use simple-exceptions) +(import simple-exceptions) (define vg:comp-exn (make-exception "wrong record type, expected vg:comp." 'assert)) (define (pmake-vg:comp . params)(let ((v (if (null? params)(make-vector 4)(apply vector 'vg:comp params)))) v)) (define (make-vg:comp #!key (objs #f) (name #f) @@ -49,11 +49,11 @@ (define-inline (vg:comp-objs-set! vec val)(if (eq? (vector-ref vec 0) 'vg:comp)(vector-set! vec 1 val)(raise (vg:comp-exn 'objs)))) (define-inline (vg:comp-name-set! vec val)(if (eq? (vector-ref vec 0) 'vg:comp)(vector-set! vec 2 val)(raise (vg:comp-exn 'name)))) (define-inline (vg:comp-file-set! vec val)(if (eq? (vector-ref vec 0) 'vg:comp)(vector-set! vec 3 val)(raise (vg:comp-exn 'file)))) ;; Generated using make-vector-record -safe vg obj type pts fill-color text line-color call-back angle font attrib extents proc -(use simple-exceptions) +(import simple-exceptions) (define vg:obj-exn (make-exception "wrong record type, expected vg:obj." 'assert)) (define (pmake-vg:obj . params)(let ((v (if (null? params)(make-vector 12)(apply vector 'vg:obj params)))) v)) (define (make-vg:obj #!key (type #f) (pts #f) @@ -92,11 +92,11 @@ (define-inline (vg:obj-attrib-set! vec val)(if (eq? (vector-ref vec 0) 'vg:obj)(vector-set! vec 9 val)(raise (vg:obj-exn 'attrib)))) (define-inline (vg:obj-extents-set! vec val)(if (eq? (vector-ref vec 0) 'vg:obj)(vector-set! vec 10 val)(raise (vg:obj-exn 'extents)))) (define-inline (vg:obj-proc-set! vec val)(if (eq? (vector-ref vec 0) 'vg:obj)(vector-set! vec 11 val)(raise (vg:obj-exn 'proc)))) ;; Generated using make-vector-record -safe vg inst libname compname theta xoff yoff scalex scaley mirrx mirry call-back cache -(use simple-exceptions) +(import simple-exceptions) (define vg:inst-exn (make-exception "wrong record type, expected vg:inst." 'assert)) (define (pmake-vg:inst . params)(let ((v (if (null? params)(make-vector 12)(apply vector 'vg:inst params)))) v)) (define (make-vg:inst #!key (libname #f) (compname #f) @@ -135,11 +135,11 @@ (define-inline (vg:inst-mirry-set! vec val)(if (eq? (vector-ref vec 0) 'vg:inst)(vector-set! vec 9 val)(raise (vg:inst-exn 'mirry)))) (define-inline (vg:inst-call-back-set! vec val)(if (eq? (vector-ref vec 0) 'vg:inst)(vector-set! vec 10 val)(raise (vg:inst-exn 'call-back)))) (define-inline (vg:inst-cache-set! vec val)(if (eq? (vector-ref vec 0) 'vg:inst)(vector-set! vec 11 val)(raise (vg:inst-exn 'cache)))) ;; Generated using make-vector-record -safe vg drawing libs insts scalex scaley xoff yoff cnv cache -(use simple-exceptions) +(import simple-exceptions) (define vg:drawing-exn (make-exception "wrong record type, expected vg:drawing." 'assert)) (define (pmake-vg:drawing . params)(let ((v (if (null? params)(make-vector 9)(apply vector 'vg:drawing params)))) v)) (define (make-vg:drawing #!key (libs #f) (insts #f)