Index: .mtutil.scm ================================================================== --- .mtutil.scm +++ .mtutil.scm @@ -1,8 +1,11 @@ ;; example of how to set up and write target mappers ;; (define *target-mappers* - `((prefix-contour . ,(lambda (target run-name area area-path reason contour mode-patt) - (conc contour "/" target))))) + `((prefix-contour . ,(lambda (target run-name area area-path reason contour mode-patt) + (conc contour "/" target))) + (prefix-area-contour . ,(lambda (target run-name area area-path reason contour mode-patt) + (conc area "/" contour "/" target))))) + ;; (print "Yep, got here!") Index: mt-pg.sql ================================================================== --- mt-pg.sql +++ mt-pg.sql @@ -1,11 +1,29 @@ -CREATE TABLE IF NOT EXISTS keys ( - id INTEGER PRIMARY KEY, - fieldname TEXT, - fieldtype TEXT, - CONSTRAINT keyconstraint UNIQUE (fieldname)); - +-- CREATE TABLE IF NOT EXISTS keys ( +-- id INTEGER PRIMARY KEY, +-- fieldname TEXT, +-- fieldtype TEXT, +-- CONSTRAINT keyconstraint UNIQUE (fieldname)); + +DROP TABLE IF EXISTS areas; +DROP TABLE IF EXISTS ttype; +DROP TABLE IF EXISTS runs; +DROP TABLE IF EXISTS run_stats; +DROP TABLE IF EXISTS test_meta; +DROP TABLE IF EXISTS tasks_queue; +DROP TABLE IF EXISTS archive_disks; +DROP TABLE IF EXISTS archive_blocks; +DROP TABLE IF EXISTS archive_allocations; +DROP TABLE IF EXISTS extradat; +DROP TABLE IF EXISTS metadat; +DROP TABLE IF EXISTS access_log; +DROP TABLE IF EXISTS tests; +DROP TABLE IF EXISTS test_steps; +DROP TABLE IF EXISTS test_data; +DROP TABLE IF EXISTS test_rundat; +DROP TABLE IF EXISTS archives; + CREATE TABLE IF NOT EXISTS areas ( id INTEGER PRIMARY KEY, areaname TEXT DEFAULT 'local', areapath TEXT DEFAULT '.', last_sync INTEGER DEFAULT 0, @@ -106,11 +124,11 @@ id INTEGER PRIMARY KEY, "user" TEXT, accessed TIMESTAMP, args TEXT); -CREATE TABLE tests ( +CREATE TABLE IF NOT EXISTS tests ( id INTEGER PRIMARY KEY, run_id INTEGER DEFAULT -1, testname TEXT DEFAULT 'noname', host TEXT DEFAULT 'n/a', cpuload REAL DEFAULT -1, Index: mtut.scm ================================================================== --- mtut.scm +++ mtut.scm @@ -32,10 +32,12 @@ ;; this needs some thought regarding security implications. ;; ;; i. Check that owner of the file and calling user are same? ;; ii. Check that we are in a legal megatest area? ;; iii. Have some form of authentication or record of the md5sum or similar of the file? +;; iv. Use compiled version in preference to .scm version. Thus there is a manual "blessing" +;; required to use .mtutil.scm. ;; (if (file-exists? "megatest.config") (if (file-exists? ".mtutil.so") (load ".mtutil.so") (if (file-exists? ".mtutil.scm")