Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -35,10 +35,13 @@ csc $(OFILES) dashboard.scm $(GOFILES) -o dboard newdboard : newdashboard.scm $(OFILES) $(GOFILES) csc $(OFILES) $(GOFILES) newdashboard.scm -o newdboard +$(PREFIX)/bin/revtagfsl : utils/revtagfsl.scm + csc utils/revtagfsl.scm -o $(PREFIX)/bin/revtagfsl + deploytarg/libiupcd.so : $(CKPATH)/lib/libiupcd.so for i in iup im cd av call sqlite; do \ cp $(CKPATH)/lib/lib$$i* deploytarg/ ; \ done cp $(CKPATH)/include/*.h deploytarg @@ -122,11 +125,11 @@ $(INSTALL) dboard $(PREFIX)/bin/dboard utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard chmod a+x $(PREFIX)/bin/dashboard install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake \ - $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb $(PREFIX)/bin/mt_xterm + $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb $(PREFIX)/bin/mt_xterm $(PREFIX)/bin/revtagfsl deploytarg/apropos.so : Makefile for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \ chicken-install -prefix deploytarg -deploy $$i;done Index: NOTES ================================================================== --- NOTES +++ NOTES @@ -1,5 +1,17 @@ +# FROM andyjpg on #chicken + +(let ((original-exit (exit-handler))) + (exit-handler (lambda (#!optional (exit-code 0)) + (printf "Preparing to exit...\n" exit-code) + (for-each (lambda (pid) + (printf "Sending signal/term to ~A\n" pid) + (process-signal pid signal/term)) (children)) + (original-exit exit-code)))) + + + 1. All run control access to db is direct. 2. All test machines must have megatest available 3. Tests may or may not have file system access to the originating run area. rsync is used to pull the test area to the home host if and only if the originating area can not be seen via file Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -87,11 +87,28 @@ (set! *test-info* (make-hash-table)) (set! *run-info-cache* (make-hash-table)) (set! *env-vars-by-run-id* (make-hash-table)) (set! *test-id-cache* (make-hash-table))) -;; Debugging stuff +;;====================================================================== +;; S T A T E S A N D S T A T U S E S +;;====================================================================== + +(define *common:std-states* + (list "COMPLETED" "NOT_STARTED" "RUNNING" "REMOTEHOSTSTART" "LAUNCHED" "KILLED" "KILLREQ" "STUCK")) + +(define *common:std-statuses* + (list "PASS" "WARN" "FAIL" "CHECK" "n/a" "WAIVED" "SKIP" "DELETED" "STUCK/DEAD")) + +;; These are stopping conditions that prevent a test from being run +(define *common:cant-run-states-sym* + '(COMPLETED KILLED WAIVED UNKNOWN INCOMPLETE)) + +;;====================================================================== +;; D E B U G G I N G S T U F F +;;====================================================================== + (define *verbosity* 1) (define *logging* #f) (define (get-with-default val default) (let ((val (args:get-arg val))) @@ -300,26 +317,28 @@ (uname #f)) (if (null? (car uname-res)) "unknown" (caar uname-res)))) -(define (save-environment-as-files fname) +(define (save-environment-as-files fname #!key (ignorevars (list "DISPLAY" "LS_COLORS" "XKEYSYMDB" "EDITOR"))) (let ((envvars (get-environment-variables)) (whitesp (regexp "[^a-zA-Z0-9_\\-:;,.\\/%$]"))) (with-output-to-file (conc fname ".csh") (lambda () (for-each (lambda (key) - (let* ((val (cdr key)) - (sval (if (string-search whitesp val)(conc "\"" val "\"") val))) - (print "setenv " (car key) " " sval))) - envvars))) + (if (not (member key ignorevars)) + (let* ((val (cdr key)) + (sval (if (string-search whitesp val)(conc "\"" val "\"") val))) + (print "setenv " (car key) " " sval)))) + envvars))) (with-output-to-file (conc fname ".sh") (lambda () (for-each (lambda (key) - (let* ((val (cdr key)) - (sval (if (string-search whitesp val)(conc "\"" val "\"") val))) - (print "export " (car key) "=" sval))) + (if (not (member key ignorevars)) + (let* ((val (cdr key)) + (sval (if (string-search whitesp val)(conc "\"" val "\"") val))) + (print "export " (car key) "=" sval)))) envvars))))) ;; set some env vars from an alist, return an alist with original values ;; (("VAR" "value") ...) (define (alist->env-vars lst) Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -221,11 +221,11 @@ #:expand "HORIZONTAL" #:size "50x" #:font "Courier New, -10" #:action (lambda (x) (open-run-close db:test-set-state-status-by-id db test-id state #f #f) (db:test-set-state! testdat state))))) btn)) - (list "COMPLETED" "NOT_STARTED" "RUNNING" "REMOTEHOSTSTART" "KILLED" "KILLREQ")))) + *common:std-states*))) ;; (list "COMPLETED" "NOT_STARTED" "RUNNING" "REMOTEHOSTSTART" "LAUNCHED" "KILLED" "KILLREQ")))) (vector-set! *state-status* 0 (lambda (state color) (for-each (lambda (btn) (let* ((name (iup:attribute btn "TITLE")) @@ -241,11 +241,11 @@ #:expand "HORIZONTAL" #:size "50x" #:font "Courier New, -10" #:action (lambda (x) (open-run-close db:test-set-state-status-by-id db test-id #f status #f) (db:test-set-status! testdat status))))) btn)) - (list "PASS" "WARN" "FAIL" "CHECK" "n/a" "WAIVED" "SKIP")))) + *common:std-statuses*))) ;; (list "PASS" "WARN" "FAIL" "CHECK" "n/a" "WAIVED" "SKIP")))) (vector-set! *state-status* 1 (lambda (status color) (for-each (lambda (btn) (let* ((name (iup:attribute btn "TITLE")) @@ -272,11 +272,11 @@ (iup:button "Re-run" #:expand "HORIZONTAL" #:action (lambda (obj) (thread-start! (make-thread (lambda () - (ezsteps:run-from testdat stepname #f)) + (ezsteps:run-from testdat stepname #t)) (conc "ezstep run single step " stepname))))) (iup:button "Re-run and continue" #:expand "HORIZONTAL" #:action (lambda (obj) (thread-start! Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -158,10 +158,13 @@ (define (get-curr-sort) (vector-ref *tests-sort-options* *tests-sort-reverse*)) (define *tests-sort-reverse* 3) (define *hide-empty-runs* #f) +(define *hide-not-hide* #t) ;; toggle for hide/not hide +(define *hide-not-hide-button* #f) +(define *hide-not-hide-tabs* #f) (define *current-tab-number* 0) (define *updaters* (make-hash-table)) (debug:setup) @@ -219,11 +222,14 @@ ;; ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) - (tests (mt:get-tests-for-run run-id testnamepatt states statuses sort-by: sort-by sort-order: sort-order)) + (tests (mt:get-tests-for-run run-id testnamepatt states statuses + not-in: *hide-not-hide* + sort-by: sort-by + sort-order: sort-order)) ;; NOTE: bubble-up also sets the global *all-item-test-names* ;; (tests (bubble-up tmptests priority: bubble-type)) (key-vals (cdb:remote-run db:get-key-vals #f run-id))) ;; Not sure this is needed? (set! referenced-run-ids (cons run-id referenced-run-ids)) @@ -476,14 +482,28 @@ (set! coln (+ coln 1)))) runs))) (define (mkstr . x) (string-intersperse (map conc x) ",")) + +(define (set-bg-on-filter) + (let ((search-changed (not (null? (filter (lambda (key) + (not (equal? (hash-table-ref *searchpatts* key) "%"))) + (hash-table-keys *searchpatts*))))) + (state-changed (not (null? (hash-table-keys *state-ignore-hash*)))) + (status-changed (not (null? (hash-table-keys *status-ignore-hash*))))) + (iup:attribute-set! *hide-not-hide-tabs* "BGCOLOR" + (if (or search-changed + state-changed + status-changed) + "190 180 190" + "190 190 190" + )))) (define (update-search x val) - ;; (print "Setting search for " x " to " val) - (hash-table-set! *searchpatts* x val)) + (hash-table-set! *searchpatts* x val) + (set-bg-on-filter)) (define (mark-for-update) (set! *last-db-update-time* 0) (set! *delayed-update* 1)) @@ -847,19 +867,19 @@ ;; Text box for STATES (iup:frame #:title "States" (dashboard:text-list-toggle-box ;; Move these definitions to common and find the other useages and replace! - '("COMPLETED" "RUNNING" "STUCK" "INCOMPLETE" "LAUNCHED" "REMOTEHOSTSTART" "KILLED") + *common:std-states* ;; '("COMPLETED" "RUNNING" "STUCK" "INCOMPLETE" "LAUNCHED" "REMOTEHOSTSTART" "KILLED") (lambda (all) (dboard:data-set-states! *data* all) (dashboard:update-run-command)))) ;; Text box for STATES (iup:frame #:title "Statuses" (dashboard:text-list-toggle-box - '("PASS" "FAIL" "n/a" "CHECK" "WAIVED" "SKIP" "DELETED" "STUCK/DEAD") + *common:std-statuses* ;; '("PASS" "FAIL" "n/a" "CHECK" "WAIVED" "SKIP" "DELETED" "STUCK/DEAD") (lambda (all) (dboard:data-set-statuses! *data* all) (dashboard:update-run-command)))))))) (iup:frame @@ -1022,11 +1042,15 @@ #:expand "YES")) (updater (lambda () (let* ((runs-dat (mt:get-runs-by-patt *keys* "%" #f)) (runs-header (vector-ref runs-dat 0)) ;; 0 is header, 1 is list of records (run-id (dboard:data-get-curr-run-id *data*)) - (tests-dat (let ((tdat (mt:get-tests-for-run run-id "%" '() '() + (tests-dat (let ((tdat (mt:get-tests-for-run run-id + (hash-table-ref/default *searchpatts* "test-name" "%/%") + (hash-table-keys *state-ignore-hash*) ;; '() + (hash-table-keys *status-ignore-hash*) ;; '() + not-in: *hide-not-hide* qryvals: "id,testname,item_path,state,status"))) ;; get 'em all (sort tdat (lambda (a b) (let* ((aval (vector-ref a 2)) (bval (vector-ref b 2)) (anum (string->number aval)) @@ -1176,12 +1200,18 @@ (next-sort-option) (iup:attribute-set! obj "TITLE" (vector-ref (vector-ref *tests-sort-options* *tests-sort-reverse*) 0)) (mark-for-update))) (iup:button "HideEmpty" #:action (lambda (obj) (set! *hide-empty-runs* (not *hide-empty-runs*)) - (iup:attribute-set! obj "TITLE" (if *hide-empty-runs* "+Hide" "-Hide")) - (mark-for-update)))) + (iup:attribute-set! obj "TITLE" (if *hide-empty-runs* "+HideE" "-HideE")) + (mark-for-update))) + (let ((hideit (iup:button "HideTests" #:action (lambda (obj) + (set! *hide-not-hide* (not *hide-not-hide*)) + (iup:attribute-set! obj "TITLE" (if *hide-not-hide* "HideTests" "NotHide")) + (mark-for-update))))) + (set! *hide-not-hide-button* hideit) + hideit)) (iup:hbox (iup:button "Quit" #:action (lambda (obj)(if *db* (sqlite3:finalize! *db*))(exit))) (iup:button "Refresh" #:action (lambda (obj) (mark-for-update))) (iup:button "Collapse" #:action (lambda (obj) @@ -1197,40 +1227,44 @@ (hash-table-delete! *collapsed* tname)) (hash-table-keys *collapsed*)) (iup:attribute-set! obj "TITLE" "Collapse")))) (mark-for-update)))))) (iup:frame - #:title "hide" + #:title "state/status filter" (iup:vbox (apply iup:hbox (map (lambda (status) (iup:toggle status #:action (lambda (obj val) (mark-for-update) (if (eq? val 1) (hash-table-set! *status-ignore-hash* status #t) - (hash-table-delete! *status-ignore-hash* status))))) - '("PASS" "FAIL" "WARN" "CHECK" "WAIVED" "STUCK/DEAD" "n/a" "SKIP"))) + (hash-table-delete! *status-ignore-hash* status)) + (set-bg-on-filter)))) + *common:std-statuses*)) ;; '("PASS" "FAIL" "WARN" "CHECK" "WAIVED" "STUCK/DEAD" "n/a" "SKIP"))) (apply iup:hbox (map (lambda (state) (iup:toggle state #:action (lambda (obj val) (mark-for-update) (if (eq? val 1) (hash-table-set! *state-ignore-hash* state #t) - (hash-table-delete! *state-ignore-hash* state))))) - '("RUNNING" "COMPLETED" "INCOMPLETE" "LAUNCHED" "NOT_STARTED" "KILLED" "DELETED"))) + (hash-table-delete! *state-ignore-hash* state)) + (set-bg-on-filter)))) + *common:std-states*)) ;; '("RUNNING" "COMPLETED" "INCOMPLETE" "LAUNCHED" "NOT_STARTED" "KILLED" "DELETED"))) (iup:valuator #:valuechanged_cb (lambda (obj) (let ((val (inexact->exact (round (/ (string->number (iup:attribute obj "VALUE")) 10)))) (oldmax (string->number (iup:attribute obj "MAX"))) (maxruns *tot-run-count*)) (set! *start-run-offset* val) (mark-for-update) (debug:print 6 "*start-run-offset* " *start-run-offset* " maxruns: " maxruns ", val: " val " oldmax: " oldmax) (iup:attribute-set! obj "MAX" (* maxruns 10)))) - #:expand "YES" - #:max (* 10 (length *allruns*))))) + #:expand "HORIZONTAL" + #:max (* 10 (length *allruns*)) + #:min 0 + #:step 0.01))) ;(iup:button "inc rows" #:action (lambda (obj)(set! *num-tests* (+ *num-tests* 1)))) ;(iup:button "dec rows" #:action (lambda (obj)(set! *num-tests* (if (> *num-tests* 0)(- *num-tests* 1) 0)))) ) ) @@ -1263,11 +1297,13 @@ (debug:print 6 "*start-test-offset* " *start-test-offset* " val: " val " newmax: " newmax " oldmax: " oldmax) (if (< val 10) (iup:attribute-set! obj "MAX" newmax)) )) #:expand "VERTICAL" - #:orientation "VERTICAL") + #:orientation "VERTICAL" + #:min 0 + #:step 0.01) (apply iup:vbox (reverse res))))))) (else (let ((labl (iup:button "" #:flat "YES" #:alignment "ALEFT" @@ -1349,10 +1385,12 @@ ;; (set! (iup:callback tabs tabchange-cb:) (lambda (a b c)(print "SWITCHED TO TAB: " a " " b " " c))) (iup:attribute-set! tabs "TABTITLE0" "Summary") (iup:attribute-set! tabs "TABTITLE1" "Runs") (iup:attribute-set! tabs "TABTITLE2" "Run Summary") (iup:attribute-set! tabs "TABTITLE3" "Run Control") + (iup:attribute-set! tabs "BGCOLOR" "190 190 190") + (set! *hide-not-hide-tabs* tabs) tabs))) (vector keycol lftcol header runsvec))) (if (or (args:get-arg "-rows") (get-environment-variable "DASHBOARDROWS" )) @@ -1470,12 +1508,12 @@ (if (not update-is-running) (set! *update-is-running* #t)) (mutex-unlock! *update-mutex*) (if (not update-is-running) (begin - (dashboard:run-update x) + (dashboard:run-update x) (mutex-lock! *update-mutex*) (set! *update-is-running* #f) (mutex-unlock! *update-mutex*)))) 1)))) (iup:main-loop) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -259,11 +259,11 @@ (string->number (args:get-arg "-override-timeout")) 136000)))) (handle-exceptions exn (begin - (debug:print 0 "ERROR: problem accessing test db " work-area ", you probably should clean and re-run this test" + (debug:print 2 "ERROR: problem accessing test db " work-area ", you probably should clean and re-run this test" ((condition-property-accessor 'exn 'message) exn)) (set! db (sqlite3:open-database ":memory:"))) ;; open an in-memory db to allow readonly access (set! db (sqlite3:open-database dbpath))) (sqlite3:set-busy-handler! db handler) (if (not dbexists) @@ -482,11 +482,11 @@ ;; delete all tests that belong to runs that are 'deleted' "DELETE FROM tests WHERE run_id in (SELECT id FROM runs WHERE state='deleted');" ;; delete all tests that are 'DELETED' "DELETE FROM tests WHERE state='DELETED';" ;; delete all tests that have no run - "DELETE FROM tests WHERE run_id NOT IN (SELECT DISTINCT run_id FROM runs);" + "DELETE FROM tests WHERE run_id NOT IN (SELECT DISTINCT id FROM runs);" ;; delete all runs that are state='deleted' "DELETE FROM runs WHERE state='deleted';" ;; delete empty runs "DELETE FROM runs WHERE id NOT IN (SELECT DISTINCT r.id FROM runs AS r INNER JOIN tests AS t ON t.run_id=r.id);" )))) @@ -645,11 +645,11 @@ db (let ((qry (conc "SELECT id FROM runs WHERE (runname=? " andstr key=?str ");"))) ;(debug:print 4 "qry: " qry) qry) qryvals) - (sqlite3:execute db "UPDATE runs SET state=?,status=?,event_time=strftime('%s','now') WHERE id=?;" state status res) + (sqlite3:execute db "UPDATE runs SET state=?,status=?,event_time=strftime('%s','now') WHERE id=? AND state='deleted';" state status res) res) (begin (debug:print 0 "ERROR: Called without all necessary keys") #f)))) @@ -818,12 +818,12 @@ ;; does not (obviously!) removed dependent data. But why not!!? (define (db:delete-run db run-id) (common:clear-caches) ;; don't trust caches after doing any deletion ;; First set any related tests to DELETED - (let ((stmt1 (sqlite3:prepare db "UPDATE tests SET state='DELETED' WHERE run_id=?;")) - (stmt2 (sqlite3:prepare db "UPDATE runs SET state='deleted' WHERE id=?;"))) + (let ((stmt1 (sqlite3:prepare db "UPDATE tests SET state='DELETED',comment='' WHERE run_id=?;")) + (stmt2 (sqlite3:prepare db "UPDATE runs SET state='deleted',comment='' WHERE id=?;"))) (sqlite3:with-transaction db (lambda () (sqlite3:execute stmt1 run-id) (sqlite3:execute stmt2 run-id))) (sqlite3:finalize! stmt1) @@ -1047,11 +1047,11 @@ (begin (sqlite3:execute db "DELETE FROM test_steps WHERE test_id=?;" test-id) (sqlite3:execute db "DELETE FROM test_data WHERE test_id=?;" test-id) (if force (sqlite3:execute db "DELETE FROM tests WHERE id=?;" test-id) - (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a' WHERE id=?;" test-id))))) + (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a',comment='' WHERE id=?;" test-id))))) (define (db:delete-tests-for-run db run-id) (common:clear-caches) (sqlite3:execute db "DELETE FROM tests WHERE run_id=?;" run-id)) @@ -1153,11 +1153,11 @@ (sqlite3:for-each-row (lambda (count) (set! res count)) db "SELECT count(id) FROM tests WHERE state = 'RUNNING' OR state = 'LAUNCHED' OR state = 'REMOTEHOSTSTART' - AND testname in (SELECT testname FROM test_meta WHERE jobgroup=?;" + AND testname in (SELECT testname FROM test_meta WHERE jobgroup=?);" jobgroup) res))) ;; done with run when: ;; 0 tests in LAUNCHED, NOT_STARTED, REMOTEHOSTSTART, RUNNING @@ -1649,11 +1649,11 @@ '(top-test-set-per-pf-counts "UPDATE tests SET state=CASE WHEN (SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' - AND state in ('RUNNING','NOT_STARTED')) > 0 THEN 'RUNNING' + AND state in ('RUNNING','NOT_STARTED','LAUNCHED','REMOTEHOSTSTART')) > 0 THEN 'RUNNING' ELSE 'COMPLETED' END, status=CASE WHEN fail_count > 0 THEN 'FAIL' WHEN pass_count > 0 AND fail_count=0 THEN 'PASS' WHEN (SELECT count(id) FROM tests Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -90,11 +90,11 @@ (vector-set! exit-info 1 exit-status) (vector-set! exit-info 2 exit-code) (mutex-unlock! run-mutex) (if (eq? pid-val 0) (begin - (thread-sleep! 2) + (thread-sleep! 1) (processloop (+ i 1)))) )) (let ((exinfo (vector-ref exit-info 2)) (logfna (if logpro-used (conc stepname ".html") ""))) ;; testing if procedures called in a remote call cause problems (ans: no or so I suspect) ADDED index-tree.scm Index: index-tree.scm ================================================================== --- /dev/null +++ index-tree.scm @@ -0,0 +1,50 @@ +;;====================================================================== +;; Copyright 2006-2013, Matthew Welland. +;; +;; This program is made available under the GNU GPL version 2.0 or +;; greater. See the accompanying file COPYING for details. +;; +;; This program is distributed WITHOUT ANY WARRANTY; without even the +;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. +;;====================================================================== + +;;====================================================================== +;; Tests +;;====================================================================== + +(use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking tcp directory-utils) +(import (prefix sqlite3 sqlite3:)) + +(declare (unit tests)) +(declare (uses lock-queue)) +(declare (uses db)) +(declare (uses common)) +(declare (uses items)) +(declare (uses runconfig)) + +(include "common_records.scm") +(include "key_records.scm") +(include "db_records.scm") +(include "run_records.scm") +(include "test_records.scm") + +;; Populate the links tree with index.html files +;; +;; - start from most recent tests and work towards oldest -OR- +;; start from deepest hierarchy and work way up +;; - look up tests in megatest.db +;; - cross-reference the tests to stats.db +;; - if newer than event_time in stats.db or not registered in stats.db regenerate +;; - run du and store in stats.db +;; - when all tests at that level done generate next level up index.html +;; +;; include in rollup html index.html: +;; sum of du +;; counts of PASS, FAIL, RUNNING, REMOTEHOSTSTART, LAUNCHED, CHECK etc. +;; overall status +;; +;; include in test specific index.html: +;; host, uname, cpu graph, disk avail graph, steps, data +;; meta data, state, status, du +;; Index: launch.scm ================================================================== --- launch.scm +++ launch.scm @@ -136,11 +136,15 @@ (set-megatest-env-vars run-id) (set-item-env-vars itemdat) (save-environment-as-files "megatest") ;; open-run-close not needed for test-set-meta-info (tests:set-full-meta-info #f test-id run-id 0 work-area) - (tests:test-set-status! test-id "REMOTEHOSTSTART" "n/a" (args:get-arg "-m") #f) + + ;; (tests:test-set-status! test-id "REMOTEHOSTSTART" "n/a" (args:get-arg "-m") #f) + (tests:test-force-state-status! test-id "REMOTEHOSTSTART" "n/a") + (thread-sleep! 0.3) ;; NFS slowness has caused grief here + (if (args:get-arg "-xterm") (set! fullrunscript "xterm") (if (and fullrunscript (not (file-execute-access? fullrunscript))) (system (conc "chmod ug+x " fullrunscript)))) ;; We are about to actually kick off the test @@ -155,11 +159,20 @@ (keep-going #t) (runit (lambda () ;; (let-values ;; (((pid exit-status exit-code) ;; (run-n-wait fullrunscript))) - (tests:test-set-status! test-id "RUNNING" "n/a" #f #f) + ;; (tests:test-set-status! test-id "RUNNING" "n/a" #f #f) + ;; Since we should have a clean slate at this time there is no need to do + ;; any of the other stuff that tests:test-set-status! does. Let's just + ;; force RUNNING/n/a + + + (thread-sleep! 0.3) + (tests:test-force-state-status! test-id "RUNNING" "n/a") + (thread-sleep! 0.3) ;; NFS slowness has caused grief here + ;; if there is a runscript do it first (if fullrunscript (let ((pid (process-run fullrunscript))) (let loop ((i 0)) (let-values @@ -170,11 +183,11 @@ (vector-set! exit-info 2 exit-code) (set! rollup-status exit-code) (mutex-unlock! m) (if (eq? pid-val 0) (begin - (thread-sleep! 1) + (thread-sleep! 2) (loop (+ i 1))) ))))) ;; then, if runscript ran ok (or did not get called) ;; do all the ezsteps (if any) (if ezsteps @@ -224,11 +237,11 @@ (vector-set! exit-info 1 exit-status) (vector-set! exit-info 2 exit-code) (mutex-unlock! m) (if (eq? pid-val 0) (begin - (thread-sleep! 1) + (thread-sleep! 2) (processloop (+ i 1)))) )) (let ((exinfo (vector-ref exit-info 2)) (logfna (if logpro-used (conc stepname ".html") ""))) ;; testing if procedures called in a remote call cause problems (ans: no or so I suspect) @@ -330,28 +343,29 @@ (set! kill-tries (+ 1 kill-tries)) (mutex-unlock! m))) ;; (sqlite3:finalize! db) (if keep-going (begin - (thread-sleep! (+ 10 (random 10))) ;; add some jitter to the call home time to spread out the db accesses + (thread-sleep! 3) ;; (+ 3 (random 6))) ;; add some jitter to the call home time to spread out the db accesses (if keep-going (loop (calc-minutes)))))))))) ;; NOTE: Checking twice for keep-going is intentional (th1 (make-thread monitorjob "monitor job")) (th2 (make-thread runit "run job"))) (set! job-thread th2) (thread-start! th1) (thread-start! th2) (thread-join! th2) (set! keep-going #f) - (thread-sleep! 1) - (thread-terminate! th1) ;; Not sure if this is a good idea - (thread-sleep! 0.1) ;; give thread th1 a chance to be done TODO: Verify this is needed. At 0.1 I was getting fail to stop, increased to total of 1.1 sec. + (thread-join! th1) + ;; (thread-sleep! 1) + ;; (thread-terminate! th1) ;; Not sure if this is a good idea + (thread-sleep! 1) ;; give thread th1 a chance to be done TODO: Verify this is needed. At 0.1 I was getting fail to stop, increased to total of 1.1 sec. (mutex-lock! m) (let* ((item-path (item-list->path itemdat)) (testinfo (cdb:get-test-info-by-id *runremote* test-id))) ;; )) ;; run-id test-name item-path))) ;; Am I completed? - (if (equal? (db:test-get-state testinfo) "RUNNING") ;; (not (equal? (db:test-get-state testinfo) "COMPLETED")) + (if (member (db:test-get-state testinfo) '("REMOTEHOSTSTART" "RUNNING")) ;; NOTE: It should *not* be REMOTEHOSTSTART but for reasons I don't yet understand it sometimes gets stuck in that state ;; (not (equal? (db:test-get-state testinfo) "COMPLETED")) (let ((new-state (if kill-job? "KILLED" "COMPLETED") ;; (if (eq? (vector-ref exit-info 2) 0) ;; exited with "good" status ;; "COMPLETED" ;; (db:test-get-state testinfo))) ;; else preseve the state as set within the test ) (new-status (cond Index: lock-queue.scm ================================================================== --- lock-queue.scm +++ lock-queue.scm @@ -25,11 +25,11 @@ (define (lock-queue:open-db fname) (let* ((actualfname (conc fname ".lockdb")) (dbexists (file-exists? actualfname)) (db (sqlite3:open-database actualfname)) - (handler (make-busy-timeout 3600))) + (handler (make-busy-timeout 136000))) (if dbexists db (begin (sqlite3:execute db Index: megatest-version.scm ================================================================== --- megatest-version.scm +++ megatest-version.scm @@ -1,7 +1,7 @@ ;; Always use two digit decimal ;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00.. (declare (unit megatest-version)) -(define megatest-version 1.5511) +(define megatest-version 1.5512) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -252,10 +252,34 @@ (begin (print megatest-version) (exit))) (define *didsomething* #f) + +;; Overall exit handling setup immediately +;; +(if (or (args:get-arg "-process-reap")) + ;; (args:get-arg "-runtests") + ;; (args:get-arg "-execute") + ;; (args:get-arg "-remove-runs") + ;; (args:get-arg "-runstep")) + (let ((original-exit (exit-handler))) + (exit-handler (lambda (#!optional (exit-code 0)) + (printf "Preparing to exit with exit code ~A ...\n" exit-code) + (for-each + (lambda (pid) + (handle-exceptions + exn + #t + (let-values (((pid-val exit-status exit-code) (process-wait pid #t))) + (if (or (eq? pid-val pid) + (eq? pid-val 0)) + (begin + (printf "Sending signal/term to ~A\n" pid) + (process-signal pid signal/term)))))) + (process:children #f)) + (original-exit exit-code))))) ;; Force default transport to fs ;; (if ;; (and (or (args:get-arg "-list-targets") ;; ;; (args:get-arg "-list-db-targets")) ;; (not (args:get-arg "-transport")) Index: mt.scm ================================================================== --- mt.scm +++ mt.scm @@ -107,11 +107,14 @@ (pop-directory) (for-each (lambda (trigger) (let ((cmd (configf:lookup tconfig "triggers" trigger)) (logf (conc test-rundir "/last-trigger.log"))) (if cmd - (let ((fullcmd (conc "(" cmd " " test-id " " test-rundir " " trigger ") >> " logf " 2>&1"))) + ;; Putting the commandline into ( )'s means no control over the shell. + ;; stdout and stderr will be caught in the NBFAKE or mt_launch.log files + ;; or equivalent. No need to do this. Just run it? + (let ((fullcmd (conc cmd " " test-id " " test-rundir " " trigger "&"))) (debug:print-info 0 "TRIGGERED on " trigger ", running command " fullcmd) (process-run fullcmd))))) (list (conc state "/" status) (conc state "/") Index: process.scm ================================================================== --- process.scm +++ process.scm @@ -109,5 +109,21 @@ (begin (thread-sleep! 2) (loop (+ i 1))) (values pid-val exit-status exit-code)))))) +;;====================================================================== +;; MISC PROCESS RELATED STUFF +;;====================================================================== + +(define (process:children proc) + (with-input-from-pipe + (conc "ps h --ppid " (current-process-id) " -o pid") + (lambda () + (let loop ((inl (read-line)) + (res '())) + (if (eof-object? inl) + (reverse res) + (let ((pid (string->number inl))) + (if proc (proc pid)) + (loop (read-line) (cons pid res)))))))) + Index: runconfig.scm ================================================================== --- runconfig.scm +++ runconfig.scm @@ -40,11 +40,14 @@ (if section-dat (for-each (lambda (envvar) (let ((val (cadr (assoc envvar section-dat)))) (hash-table-set! whatfound section (+ (hash-table-ref/default whatfound section 0) 1)) - (if change-env (setenv envvar val)) + (if (and (string? envvar) + (string? val) + change-env) + (setenv envvar val)) (hash-table-set! finaldat envvar val))) (map car section-dat))))) sections) (if already-seen (begin Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -135,10 +135,30 @@ ;; (define *last-num-running-tests* 0) (define *runs:can-run-more-tests-count* 0) (define (runs:shrink-can-run-more-tests-count) ;; the db is a dummy var so we can use cdb:remote-run (set! *runs:can-run-more-tests-count* 0)) ;; (/ *runs:can-run-more-tests-count* 2))) + +;; Temporary globals. Move these into the logic or into common +;; +(define *seen-cant-run-tests* (make-hash-table)) ;; use to track tests that we suspect cannot be run +(define (runs:inc-cant-run-tests testname) + (hash-table-set! *seen-cant-run-tests* testname + (+ (hash-table-ref/default *seen-cant-run-tests* testname 0) 1))) +(define (runs:can-keep-running? testname n) + (< (hash-table-ref/default *seen-cant-run-tests* testname 0) n)) + +(define *runs:denoise* (make-hash-table)) ;; key => last-time-ran + +(define (runs:lownoise key waitval) + (let ((lasttime (hash-table-ref/default *runs:denoise* key 0)) + (currtime (current-seconds))) + (if (> (- currtime lasttime) waitval) + (begin + (hash-table-set! *runs:denoise* key currtime) + #t) + #f))) (define (runs:can-run-more-tests jobgroup max-concurrent-jobs) (thread-sleep! (cond ((> *runs:can-run-more-tests-count* 20) 2);; obviously haven't had any work to do for a while (else 0))) @@ -155,12 +175,13 @@ (list #f num-running num-running-in-jobgroup max-concurrent-jobs job-group-limit) (let ((can-not-run-more (cond ;; if max-concurrent-jobs is set and the number running is greater ;; than it than cannot run more jobs ((and max-concurrent-jobs (>= num-running max-concurrent-jobs)) - (debug:print 0 "WARNING: Max running jobs exceeded, current number running: " num-running - ", max_concurrent_jobs: " max-concurrent-jobs) + (if (runs:lownoise "mcj msg" 60) + (debug:print 0 "WARNING: Max running jobs exceeded, current number running: " num-running + ", max_concurrent_jobs: " max-concurrent-jobs)) #t) ;; if job-group-limit is set and number of jobs in the group is greater ;; than the limit then cannot run more jobs of this kind ((and job-group-limit (>= num-running-in-jobgroup job-group-limit)) @@ -344,11 +365,13 @@ (cdr reg) (if (null? tal) ;; if tal is null and reg not full then '() as reg contents moved to tal '() reg))) -(define (runs:expand-items hed tal reg reruns regfull newtal jobgroup max-concurrent-jobs run-id waitons item-path testmode test-record can-run-more items runname tconfig reglen) +(define runs:nothing-left-in-queue-count 0) + +(define (runs:expand-items hed tal reg reruns regfull newtal jobgroup max-concurrent-jobs run-id waitons item-path testmode test-record can-run-more items runname tconfig reglen test-registry) (let* ((loop-list (list hed tal reg reruns)) (prereqs-not-met (mt:get-prereqs-not-met run-id waitons item-path mode: testmode)) (fails (runs:calc-fails prereqs-not-met)) (non-completed (runs:calc-not-completed prereqs-not-met))) (debug:print-info 4 "START OF INNER COND #2 " @@ -361,13 +384,37 @@ "\n (eq? testmode 'toplevel): " (eq? testmode 'toplevel) "\n (null? non-completed): " (null? non-completed) "\n reruns: " reruns "\n items: " items "\n can-run-more: " can-run-more) + (cond ;; all prereqs met, fire off the test ;; or, if it is a 'toplevel test and all prereqs not met are COMPLETED then launch + + ((member (hash-table-ref/default test-registry (runs:make-full-test-name hed item-path) 'n/a) + '(DONOTRUN removed)) ;; *common:cant-run-states-sym*) ;; '(COMPLETED KILLED WAIVED UNKNOWN INCOMPLETE)) ;; try to catch repeat processing of COMPLETED tests here + (debug:print-info 1 "Test " hed " set to \"" (hash-table-ref test-registry (runs:make-full-test-name hed item-path)) "\". Removing it from the queue") + (if (or (not (null? tal)) + (not (null? reg))) + (list (runs:queue-next-hed tal reg reglen regfull) + (runs:queue-next-tal tal reg reglen regfull) + (runs:queue-next-reg tal reg reglen regfull) + reruns) + (begin + (debug:print-info 0 "Nothing left in the queue!") + ;; If get here twice then we know we've tried to expand all items + ;; since there must be a logic issue with the handling of loops in the + ;; items expand phase we will brute force an exit here. + (if (> runs:nothing-left-in-queue-count 2) + (begin + (debug:print 0 "WARNING: this condition is triggered when there were no items to expand and nothing to run. Please check your run for completeness") + (exit 0)) + (set! runs:nothing-left-in-queue-count (+ runs:nothing-left-in-queue-count 1))) + #f))) + + ;; ((or (null? prereqs-not-met) (and (eq? testmode 'toplevel) (null? non-completed))) (debug:print-info 4 "runs:expand-items: (or (null? prereqs-not-met) (and (eq? testmode 'toplevel)(null? non-completed)))") (let ((test-name (tests:testqueue-get-testname test-record))) @@ -381,36 +428,151 @@ (list hed tal reg reruns)) (begin (debug:print 0 "ERROR: The proc from reading the setup did not yield a list - please report this") (exit 1)))))) - ((null? fails) - (debug:print-info 4 "fails is null, moving on in the queue but keeping " hed " for now") - ;; num-retries code was here - ;; we use this opportunity to move contents of reg to tal - (list (car newtal)(append (cdr newtal) reg) '() reruns)) ;; an issue with prereqs not yet met? + ((and (null? fails) + (not (null? non-completed))) + (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x))) + (append newtal reruns))) + ;; prereqstrs is a list of test names as strings that are prereqs for hed + (prereqstrs (delete-duplicates (map (lambda (x)(if (string? x) x (db:test-get-testname x))) + prereqs-not-met))) + ;; a prereq that is not found in allinqueue will be put in the notinqueue list + ;; + ;; (notinqueue (filter (lambda (x) + ;; (not (member x allinqueue))) + ;; prereqstrs)) + (give-up #f)) + + ;; We can get here when a prereq has not been run due to *it* having a prereq that failed. + ;; We need to use this to dequeue this item as CANNOTRUN + (for-each (lambda (prereq) + (if (eq? (hash-table-ref/default test-registry prereq 'justfine) 'CANNOTRUN) + (set! give-up #t))) + prereqstrs) + (if (and give-up + (not (and (null? tal)(null? reg)))) + (begin + (debug:print 1 "WARNING: test " hed " has no discarded prerequisites, removing it from the queue") + (list (runs:queue-next-hed tal reg reglen regfull) + (runs:queue-next-tal tal reg reglen regfull) + (runs:queue-next-reg tal reg reglen regfull) + reruns)) + (list (car newtal)(append (cdr newtal) reg) '() reruns)))) + + + ;; (debug:print-info 1 "allinqueue: " allinqueue) + ;; (debug:print-info 1 "prereqstrs: " prereqstrs) + ;; (debug:print-info 1 "notinqueue: " notinqueue) + ;; (debug:print-info 1 "tal: " tal) + ;; (debug:print-info 1 "newtal: " newtal) + ;; (debug:print-info 1 "reg: " reg) + +;; == == ;; num-retries code was here +;; == == ;; we use this opportunity to move contents of reg to tal +;; == == ;; but also lets check that the prerequisites are all in the newtal or reruns lists +;; == == +;; == == (let* ((allinqueue (map (lambda (x)(if (string? x) x (db:test-get-testname x))) +;; == == (append newtal reruns))) +;; == == ;; prereqstrs is a list of test names as strings that are prereqs for hed +;; == == (prereqstrs (map (lambda (x)(if (string? x) x (db:test-get-testname x))) +;; == == prereqs-not-met)) +;; == == ;; a prereq that is not found in allinqueue will be put in the notinqueue list +;; == == ;; +;; == == (notinqueue (filter (lambda (x) +;; == == (not (member x allinqueue))) +;; == == prereqstrs))) +;; == == (if (not (null? notinqueue)) +;; == == (if (runs:can-keep-running? hed 5) ;; try five times +;; == == (begin +;; == == (debug:print-info 4 "increment cant-run-tests for " hed) +;; == == (runs:inc-cant-run-tests hed) +;; == == (list (car newtal)(append (cdr newtal) reg) '() reruns)) +;; == == (begin +;; == == +;; == == (if (runs:lownoise (conc "no fails prereq, null notinqueue " hed) 30) +;; == == (begin +;; == == (debug:print 1 "WARNING: test " hed " has no failed prerequisites but does have prerequistes that are NOT in the queue: " (string-intersperse notinqueue ", ")) +;; == == (debug:print-info 4 "allinqueue: " allinqueue) +;; == == (debug:print-info 4 "prereqstrs: " prereqstrs) +;; == == (debug:print-info 4 "notinqueue: " notinqueue))) +;; == == (if (and (null? tal)(null? reg)) +;; == == (list (car newtal)(append (cdr newtal) reg) '() reruns) +;; == == (list (runs:queue-next-hed tal reg reglen regfull) +;; == == (runs:queue-next-tal tal reg reglen regfull) +;; == == (runs:queue-next-reg tal reg reglen regfull) +;; == == reruns)))) +;; == == ;; have prereqs in queue, keep going. +;; == == (begin +;; == == (if (runs:lownoise (conc "no fails prereq " hed) 30) +;; == == (debug:print-info 1 "no fails in prerequisites for " hed ", waiting on tests; " +;; == == (string-intersperse (map (lambda (x) +;; == == (if (string? x) +;; == == x +;; == == (runs:make-full-test-name (db:test-get-testname x) +;; == == (db:test-get-item-path x)))) +;; == == non-completed) ", ") +;; == == ". Delaying launch of " hed ".")) +;; == == (list (car newtal)(append (cdr newtal) reg) '() reruns))))) ;; an issue with prereqs not yet met? + + ((and (null? fails) + (null? non-completed)) + (if (runs:can-keep-running? hed 5) + (begin + (runs:inc-cant-run-tests hed) + (debug:print-info 1 "no fails in prerequisites for " hed " but also none running, keeping " hed " for now. Try count: " (hash-table-ref/default *seen-cant-run-tests* hed 0)) + ;; num-retries code was here + ;; we use this opportunity to move contents of reg to tal + (list (car newtal)(append (cdr newtal) reg) '() reruns)) ;; an issue with prereqs not yet met? + (begin + (debug:print-info 1 "no fails in prerequisites for " hed " but nothing seen running in a while, dropping test " hed " from the run queue") + (list (runs:queue-next-hed tal reg reglen regfull) + (runs:queue-next-tal tal reg reglen regfull) + (runs:queue-next-reg tal reg reglen regfull) + reruns)))) ((and (not (null? fails))(eq? testmode 'normal)) (debug:print-info 1 "test " hed " (mode=" testmode ") has failed prerequisite(s); " (string-intersperse (map (lambda (t)(conc (db:test-get-testname t) ":" (db:test-get-state t)"/"(db:test-get-status t))) fails) ", ") ", removing it from to-do list") (if (or (not (null? reg))(not (null? tal))) - (list (runs:queue-next-hed tal reg reglen regfull) - (runs:queue-next-tal tal reg reglen regfull) - (runs:queue-next-reg tal reg reglen regfull) - (cons hed reruns)) + (begin + (hash-table-set! test-registry hed 'CANNOTRUN) + (list (runs:queue-next-hed tal reg reglen regfull) + (runs:queue-next-tal tal reg reglen regfull) + (runs:queue-next-reg tal reg reglen regfull) + (cons hed reruns))) #f)) ;; #f flags do not loop + ((and (not (null? fails))(eq? testmode 'toplevel)) + (if (or (not (null? reg))(not (null? tal))) + (list (car newtal)(append (cdr newtal) reg) '() reruns) + #f)) (else - (debug:print 4 "ERROR: No handler for this condition.") - (list (car newtal)(cdr newtal) reg reruns))))) + (debug:print 1 "WARNING: FAILS or incomplete tests are preventing completion of this run. Dropping test " hed " from the run queue") + (list (runs:queue-next-hed tal reg reglen regfull) + (runs:queue-next-tal tal reg reglen regfull) + (runs:queue-next-reg tal reg reglen regfull) + reruns))))) ;; (list (car newtal)(cdr newtal) reg reruns))))) + +(define (runs:mixed-list-testname-and-testrec->list-of-strings inlst) + (map (lambda (t) + (cond + ((vector? t) + (conc (db:test-get-state t) "/" (db:test-get-status t))) + ((string? t) + t) + (else + (conc t)))) + inlst)) (define (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal all-tests-registry) (let* ((run-limits-info (runs:can-run-more-tests jobgroup max-concurrent-jobs)) ;; look at the test jobgroup and tot jobs running (have-resources (car run-limits-info)) (num-running (list-ref run-limits-info 1)) - (num-running-in-jobgroup (list-ref run-limits-info 2)) + (num-running-in-jobgroup (list-ref run-limits-info 2)) (max-concurrent-jobs (list-ref run-limits-info 3)) (job-group-limit (list-ref run-limits-info 4)) (prereqs-not-met (mt:get-prereqs-not-met run-id waitons item-path mode: testmode)) (fails (runs:calc-fails prereqs-not-met)) (non-completed (runs:calc-not-completed prereqs-not-met)) @@ -421,10 +583,13 @@ (if (vector? t) (conc (db:test-get-state t) "/" (db:test-get-status t)) (conc " WARNING: t is not a vector=" t ))) prereqs-not-met) ", ") ") fails: " fails) + (if (not (null? prereqs-not-met)) + (debug:print-info 1 "waiting on tests; " (string-intersperse (runs:mixed-list-testname-and-testrec->list-of-strings prereqs-not-met) ", "))) + ;; Don't know at this time if the test have been launched at some time in the past ;; i.e. is this a re-launch? (debug:print-info 4 "run-limits-info = " run-limits-info) (cond @@ -444,23 +609,27 @@ ;; Register tests ;; ((not (hash-table-ref/default test-registry (runs:make-full-test-name test-name item-path) #f)) (debug:print-info 4 "Pre-registering test " test-name "/" item-path " to create placeholder" ) - (let ((th (make-thread (lambda () - (mutex-lock! registry-mutex) - (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'start) - (mutex-unlock! registry-mutex) - ;; If haven't done it before register a top level test if this is an itemized test - (if (not (eq? (hash-table-ref/default test-registry (runs:make-full-test-name test-name "") #f) 'done)) - (cdb:tests-register-test *runremote* run-id test-name "")) - (cdb:tests-register-test *runremote* run-id test-name item-path) - (mutex-lock! registry-mutex) - (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'done) - (mutex-unlock! registry-mutex)) - (conc test-name "/" item-path)))) - (thread-start! th)) + (if (eq? *transport-type* 'fs) ;; no point in parallel registration if use fs + (begin + (cdb:tests-register-test *runremote* run-id test-name item-path) + (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'done)) + (let ((th (make-thread (lambda () + (mutex-lock! registry-mutex) + (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'start) + (mutex-unlock! registry-mutex) + ;; If haven't done it before register a top level test if this is an itemized test + (if (not (eq? (hash-table-ref/default test-registry (runs:make-full-test-name test-name "") #f) 'done)) + (cdb:tests-register-test *runremote* run-id test-name "")) + (cdb:tests-register-test *runremote* run-id test-name item-path) + (mutex-lock! registry-mutex) + (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'done) + (mutex-unlock! registry-mutex)) + (conc test-name "/" item-path)))) + (thread-start! th))) (runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?) (if (and (null? tal)(null? reg)) (list hed tal (append reg (list hed)) reruns) (list (runs:queue-next-hed tal reg reglen regfull) (runs:queue-next-tal tal reg reglen regfull) @@ -485,11 +654,12 @@ (list hed tal reg reruns)) ;; If no resources are available just kill time and loop again ;; ((not have-resources) ;; simply try again after waiting a second - (debug:print-info 1 "no resources to run new tests, waiting ...") + (if (runs:lownoise "no resources" 60) + (debug:print-info 1 "no resources to run new tests, waiting ...")) ;; Have gone back and forth on this but db starvation is an issue. ;; wait one second before looking again to run jobs. (thread-sleep! 1) ;; could have done hed tal here but doing car/cdr of newtal to rotate tests (list (car newtal)(cdr newtal) reg reruns)) @@ -515,10 +685,14 @@ ;; (else (debug:print 4 "FAILS: " fails) ;; If one or more of the prereqs-not-met are FAIL then we can issue ;; a message and drop hed from the items to be processed. + + (if (not (null? prereqs-not-met)) + (debug:print-info 1 "waiting on tests; " (string-intersperse prereqs-not-met ", "))) + (if (null? fails) (begin ;; couldn't run, take a breather (debug:print-info 0 "Waiting for more work to do...") (thread-sleep! 1) @@ -566,19 +740,21 @@ (for-each (lambda (trec) (let ((id (db:test-get-id trec)) (tn (db:test-get-testname trec)) (ip (db:test-get-item-path trec)) (st (db:test-get-state trec))) - (hash-table-set! test-registry (runs:make-full-test-name tn ip) (string->symbol st)))) + (if (not (equal? st "DELETED")) + (hash-table-set! test-registry (runs:make-full-test-name tn ip) (string->symbol st))))) tests-info) (set! max-retries (if (and max-retries (string->number max-retries))(string->number max-retries) 100)) (let loop ((hed (car sorted-test-names)) (tal (cdr sorted-test-names)) (reg '()) ;; registered, put these at the head of tal (reruns '())) (if (not (null? reruns))(debug:print-info 4 "reruns=" reruns)) + ;; (print "Top of loop, hed=" hed ", tal=" tal " ,reruns=" reruns) (let* ((test-record (hash-table-ref test-records hed)) (test-name (tests:testqueue-get-testname test-record)) (tconfig (tests:testqueue-get-testconfig test-record)) (jobgroup (config-lookup tconfig "requirements" "jobgroup")) @@ -591,15 +767,23 @@ (item-path (item-list->path itemdat)) (tfullname (runs:make-full-test-name test-name item-path)) (newtal (append tal (list hed))) (regfull (>= (length reg) reglen))) - ;; Fast skip of tests that are already "COMPLETED" + ;; Ensure all top level tests get registered. This way they show up as "NOT_STARTED" on the dashboard + ;; and it is clear they *should* have run but did not. + (if (not (hash-table-ref/default test-registry (runs:make-full-test-name test-name "") #f)) + (begin + (cdb:tests-register-test *runremote* run-id test-name "") + (hash-table-set! test-registry (runs:make-full-test-name test-name "") 'done))) + + ;; Fast skip of tests that are already "COMPLETED" - NO! Cannot do that as the items may not have been expanded yet :( ;; - (if (equal? (hash-table-ref/default test-registry tfullname #f) 'COMPLETED) + (if (member (hash-table-ref/default test-registry tfullname #f) + '(DONOTRUN removed)) ;; *common:cant-run-states-sym*) ;; '(COMPLETED KILLED WAIVED UNKNOWN INCOMPLETE)) (begin - (debug:print-info 0 "Skipping COMPLETED test " tfullname) + (debug:print-info 0 "Skipping test " tfullname " as it has been marked do not run due to being completed or not runnable") (if (or (not (null? tal))(not (null? reg))) (loop (runs:queue-next-hed tal reg reglen regfull) (runs:queue-next-tal tal reg reglen regfull) (runs:queue-next-reg tal reg reglen regfull) reruns)))) @@ -690,11 +874,11 @@ ;; EXPAND ITEMS ((or (procedure? items)(eq? items 'have-procedure)) (let ((can-run-more (runs:can-run-more-tests jobgroup max-concurrent-jobs))) (if (and (list? can-run-more) (car can-run-more)) - (let ((loop-list (runs:expand-items hed tal reg reruns regfull newtal jobgroup max-concurrent-jobs run-id waitons item-path testmode test-record can-run-more items runname tconfig reglen))) + (let ((loop-list (runs:expand-items hed tal reg reruns regfull newtal jobgroup max-concurrent-jobs run-id waitons item-path testmode test-record can-run-more items runname tconfig reglen test-registry))) (if loop-list (apply loop loop-list))) ;; if can't run more just loop with next possible test (loop (car newtal)(cdr newtal) reg reruns)))) @@ -839,14 +1023,14 @@ ((member (test:get-state testdat) '("DELETED" "NOT_STARTED"))(set! runflag #t)) ;; not -rerun and PASS, WARN or CHECK, do no run ((and (or (not rerun) keepgoing) ;; Require to force re-run for COMPLETED or *anything* + PASS,WARN or CHECK - (or (member (test:get-status testdat) '("PASS" "WARN" "CHECK" "SKIP")) + (or (member (test:get-status testdat) '("PASS" "WARN" "CHECK" "SKIP" "WAIVED")) (member (test:get-state testdat) '("COMPLETED")))) (debug:print-info 2 "running test " test-name "/" item-path " suppressed as it is " (test:get-state testdat) " and " (test:get-status testdat)) - (hash-table-set! test-registry full-test-name 'COMPLETED) + (hash-table-set! test-registry full-test-name 'DONOTRUN) ;; COMPLETED) (set! runflag #f)) ;; -rerun and status is one of the specifed, run it ((and rerun (let* ((rerunlst (string-split rerun ",")) (must-rerun (member (test:get-status testdat) rerunlst))) @@ -894,20 +1078,27 @@ (begin (print "ERROR: Failed to launch the test. Exiting as soon as possible") (set! *globalexitstatus* 1) ;; (process-signal (current-process-id) signal/kill)))))))) ((KILLED) - (debug:print 1 "NOTE: " full-test-name " is already running or was explictly killed, use -force to launch it.")) + (debug:print 1 "NOTE: " full-test-name " is already running or was explictly killed, use -force to launch it.") + (hash-table-set! test-registry (runs:make-full-test-name test-name test-path) 'DONOTRUN)) ;; KILLED)) ((LAUNCHED REMOTEHOSTSTART RUNNING) (if (> (- (current-seconds)(+ (db:test-get-event_time testdat) (db:test-get-run_duration testdat))) 600) ;; i.e. no update for more than 600 seconds (begin (debug:print 0 "WARNING: Test " test-name " appears to be dead. Forcing it to state INCOMPLETE and status STUCK/DEAD") (tests:test-set-status! test-id "INCOMPLETE" "STUCK/DEAD" "Test is stuck or dead" #f)) (debug:print 2 "NOTE: " test-name " is already running"))) - (else (debug:print 0 "ERROR: Failed to launch test " full-test-name ". Unrecognised state " (test:get-state testdat))))))) + (else + (debug:print 0 "ERROR: Failed to launch test " full-test-name ". Unrecognised state " (test:get-state testdat)) + (case (string->symbol (test:get-state testdat)) + ((COMPLETED INCOMPLETE) + (hash-table-set! test-registry (runs:make-full-test-name test-name test-path) 'DONOTRUN)) + (else + (hash-table-set! test-registry (runs:make-full-test-name test-name test-path) 'DONOTRUN)))))))) ;;====================================================================== ;; END OF NEW STUFF ;;====================================================================== Index: tests.scm ================================================================== --- tests.scm +++ tests.scm @@ -278,10 +278,13 @@ (loop (car tal)(cdr tal))) #f)))))) (pop-directory) result))))) +(define (tests:test-force-state-status! test-id state status) + (cdb:test-set-status-state *runremote* test-id status state #f) + (mt:process-triggers test-id state status)) ;; Do not rpc this one, do the underlying calls!!! (define (tests:test-set-status! test-id state status comment dat #!key (work-area #f)) (debug:print-info 4 "tests:test-set-status! test-id=" test-id ", state=" state ", status=" status ", dat=" dat) (let* ((db #f) @@ -391,11 +394,12 @@ (orig-dir (current-directory)) (logf-info (cdb:remote-run db:test-get-logfile-info #f run-id test-name)) (logf (if logf-info (cadr logf-info) #f)) (path (if logf-info (car logf-info) #f))) ;; This query finds the path and changes the directory to it for the test - (if (directory? path) + (if (and (string? path) + (directory? path)) ;; can get #f here under some wierd conditions. why, unknown ... (begin (debug:print 4 "Found path: " path) (change-directory path)) ;; (set! outputfilename (conc path "/" outputfilename))) (print "No such path: " path)) @@ -556,27 +560,32 @@ (test-id (cdb:remote-run db:get-test-id #f run-id test-name item-path)) (tdat (cdb:get-test-info-by-id *runremote* test-id))) (if tdat (begin ;; Look at the test state and status - (if (or (member (db:test-get-status tdat) - '("PASS" "WARN" "WAIVED" "CHECK" "SKIP")) + (if (or (and (member (db:test-get-status tdat) + '("PASS" "WARN" "WAIVED" "CHECK" "SKIP")) + (equal? (db:test-get-state tdat) "COMPLETED")) (member (db:test-get-state tdat) - '("INCOMPLETE" "KILLED"))) + '("INCOMPLETE" "KILLED"))) (set! keep-test #f)) ;; examine waitons for any fails. If it is FAIL or INCOMPLETE then eliminate this test ;; from the runnable list (if keep-test (for-each (lambda (waiton) ;; for now we are waiting only on the parent test (let* ((parent-test-id (cdb:remote-run db:get-test-id #f run-id waiton "")) - (wtdat (cdb:get-test-info-by-id *runremote* test-id))) - (if (or (member (db:test-get-status wtdat) - '("FAIL" "KILLED")) - (member (db:test-get-state wtdat) - '("INCOMPETE"))) + (wtdat (cdb:get-test-info-by-id *runremote* test-id))) + (if (or (and (equal? (db:test-get-state wtdat) "COMPLETED") + (member (db:test-get-status wtdat) '("FAIL"))) + (member (db:test-get-status wtdat) '("KILLED")) + (member (db:test-get-state wtdat) '("INCOMPETE"))) + ;; (if (or (member (db:test-get-status wtdat) + ;; '("FAIL" "KILLED")) + ;; (member (db:test-get-state wtdat) + ;; '("INCOMPETE"))) (set! keep-test #f)))) ;; no point in running this one again waitons)))) (if keep-test (set! runnables (cons testkeyname runnables))))) testkeynames) runnables)) Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -137,11 +137,11 @@ cd ..;make && make install mkdir -p mintest/runs mintest/links cd mintest;megatest -stop-server 0 cd mintest;megatest -server - -debug $(DEBUG) > server.log 2> server.log & sleep 3 - cd mintest;dashboard -rows 20 & + cd mintest;dashboard -rows 18 & cleanprep : ../*.scm Makefile */*.config mkdir -p fullrun/tmp/mt_runs fullrun/tmp/mt_links cd ..;make;make install rm -f */logging.db Index: tests/fullrun/config/mt_include_1.config ================================================================== --- tests/fullrun/config/mt_include_1.config +++ tests/fullrun/config/mt_include_1.config @@ -1,17 +1,19 @@ [setup] # exectutable /path/to/megatest -max_concurrent_jobs 25 +max_concurrent_jobs 50 linktree #{getenv MT_RUN_AREA_HOME}/tmp/mt_links [jobtools] useshell yes # ## launcher launches jobs, the job is managed on the target host ## by megatest, comment out launcher to run local # workhosts localhost hermes +# launcher exec nbfake launcher nbfake +# launcher nbfind # launcher nodanggood ## use "xterm -e csi -- " as a launcher to examine the launch environment. ## exit with (exit) ## get a shell with (system "bash") Index: tests/fullrun/megatest.config ================================================================== --- tests/fullrun/megatest.config +++ tests/fullrun/megatest.config @@ -17,14 +17,16 @@ [tests-paths] 1 #{get misc parent}/simplerun/tests [setup] # Set launchwait to no to use the more agressive code that does not wait for the launch to complete before proceeding -launchwait no +# this may save a few milliseconds on launching tests +# launchwait no # Use http instead of direct filesystem access -transport http +# transport http +transport fs # If set to "default" the old code is used. Otherwise defaults to 200 or uses # numeric value given. # runqueue 20 Index: tests/fullrun/tests/blocktestxz/testconfig ================================================================== --- tests/fullrun/tests/blocktestxz/testconfig +++ tests/fullrun/tests/blocktestxz/testconfig @@ -3,10 +3,13 @@ [items] THESTATE UNKNOWN INCOMPLETE KILLED KILLREQ STUCK BOZZLEBLONKED STUCK/DEAD THESTATUS PASS FAIL STUCK/DEAD SKIP +[requirements] +waiton sqlitespeed + [test_meta] author matt owner bob description This test will fail causing the dependent test "testxz"\ to never run. This triggers the code that must determine\ Index: tests/fullrun/tests/ez_fail_quick/testconfig ================================================================== --- tests/fullrun/tests/ez_fail_quick/testconfig +++ tests/fullrun/tests/ez_fail_quick/testconfig @@ -4,10 +4,11 @@ [ezsteps] # should fail on next step lookitnada ls /nada [triggers] +# run like this: cmd test-id test-rundir trigger COMPLETED/FAIL xterm;echo [test_meta] author matt owner bob Index: txtdb/nada3/First_Sheet.dat ================================================================== --- txtdb/nada3/First_Sheet.dat +++ txtdb/nada3/First_Sheet.dat @@ -1,24 +1,24 @@ [Time] BLANKVAL -A 0.32430555555555557 -B 0.33124999999999999 -C 0.3347222222222222 -D 0.33680555555555558 -E 0.33888888888888891 -F 0.34097222222222223 -G 0.34305555555555556 -H 0.34583333333333333 -I 0.34791666666666665 -J 0.35138888888888886 -K 0.36666666666666664 -L 0.37916666666666665 -M 0.39583333333333331 -N 0.42222222222222222 -O 0.45208333333333334 -P 0.49166666666666664 -Q 0.5708333333333333 +A 0.324305555555556 +B 0.33125 +C 0.334722222222222 +D 0.336805555555556 +E 0.338888888888889 +F 0.340972222222222 +G 0.343055555555556 +H 0.345833333333333 +I 0.347916666666667 +J 0.351388888888889 +K 0.366666666666667 +L 0.379166666666667 +M 0.395833333333333 +N 0.422222222222222 +O 0.452083333333333 +P 0.491666666666667 +Q 0.570833333333333 [DeltaTime] A 0 B =days(B3,$B$2)*24*60 C @@ -36,12 +36,12 @@ O P Q [Ambient] -A 35.399999999999999 -B 35.399999999999999 +A 35.4 +B 35.4 C 35 D 35 E 35 F 35 G 35 @@ -55,11 +55,11 @@ O 41 P 41 Q 41.5 [Firebox] -A 34.299999999999997 +A 34.3 B 72 C 100 D 130 E 145 F 150 @@ -74,11 +74,11 @@ O 79 P 68 Q 51 [2nd_row] -A 34.299999999999997 +A 34.3 B 60 C 90 D 116 E 121 F 125 @@ -93,11 +93,11 @@ O 78 P 63 Q 51 [3rd_row] -A 34.100000000000001 +A 34.1 B 42 C 57 D 69 E 73 F 78 ADDED txtdb/nada3/RunsToLock.dat Index: txtdb/nada3/RunsToLock.dat ================================================================== --- /dev/null +++ txtdb/nada3/RunsToLock.dat @@ -0,0 +1,11 @@ +[def] +ghi jkl +qrst +uvwx +yz12 + +[mno] +abc +def xyz +jkl +mnop Index: txtdb/nada3/Sheet3.dat ================================================================== --- txtdb/nada3/Sheet3.dat +++ txtdb/nada3/Sheet3.dat @@ -0,0 +1,8 @@ +[zeroth title] +row1name +row2name + +[col1title] +row1name row1value +row2nameNoValue +row3name row3value Index: txtdb/nada3/sxml/First_Sheet.sxml ================================================================== --- txtdb/nada3/sxml/First_Sheet.sxml +++ txtdb/nada3/sxml/First_Sheet.sxml @@ -4,60 +4,55 @@ (OutlineSymbolsBelow "1") (HideZero "0") (HideRowHeader "0") (HideGrid "0") (HideColHeader "0") - (GridColor "0:0:0") (DisplayOutlines "1") (DisplayFormulas "0")) (http://www.gnumeric.org/v10.dtd:MaxCol "8") - (http://www.gnumeric.org/v10.dtd:MaxRow "18") + (http://www.gnumeric.org/v10.dtd:MaxRow "19") (http://www.gnumeric.org/v10.dtd:Zoom "1") (http://www.gnumeric.org/v10.dtd:Names (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Print_Area") - (http://www.gnumeric.org/v10.dtd:value "#REF!") + (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") + (http://www.gnumeric.org/v10.dtd:value "\"First_Sheet\"") (http://www.gnumeric.org/v10.dtd:position "A1")) (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") - (http://www.gnumeric.org/v10.dtd:value "\"First_Sheet\"") + (http://www.gnumeric.org/v10.dtd:name "Print_Area") + (http://www.gnumeric.org/v10.dtd:value "#REF!") (http://www.gnumeric.org/v10.dtd:position "A1"))) (http://www.gnumeric.org/v10.dtd:PrintInformation (http://www.gnumeric.org/v10.dtd:Margins (http://www.gnumeric.org/v10.dtd:top (@ (PrefUnit "mm") (Points "93.26"))) (http://www.gnumeric.org/v10.dtd:bottom (@ (PrefUnit "mm") (Points "93.26"))) - (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72"))) - (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:header - (@ (PrefUnit "mm") (Points "72"))) + (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:footer - (@ (PrefUnit "mm") (Points "72")))) + (@ (PrefUnit "Pt") (Points "72")))) (http://www.gnumeric.org/v10.dtd:Scale (@ (type "percentage") (percentage "100"))) (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:grid (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:draft (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:order "d_then_r") (http://www.gnumeric.org/v10.dtd:orientation "portrait") (http://www.gnumeric.org/v10.dtd:Header (@ (Right "") (Middle "&[tab]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer (@ (Right "") (Middle "&[page]") (Left ""))) - (http://www.gnumeric.org/v10.dtd:paper "na_letter") - (http://www.gnumeric.org/v10.dtd:comments "in_place") - (http://www.gnumeric.org/v10.dtd:errors "as_displayed")) + (http://www.gnumeric.org/v10.dtd:paper "na_letter")) (http://www.gnumeric.org/v10.dtd:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "0") (endRow "0") (endCol "1")) + (@ (startRow "4096") (startCol "0") (endRow "65535") (endCol "63")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -75,37 +70,20 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "1") (startCol "0") (endRow "17") (endCol "1")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "hh\":\"mm\":\"ss AM/PM") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "18") (startCol "0") (endRow "31") (endCol "2")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "4") (endRow "255") (endCol "15")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -123,13 +101,20 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "32") (startCol "0") (endRow "255") (endCol "7")) + (@ (startRow "32") (startCol "0") (endRow "255") (endCol "3")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -147,59 +132,18 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "256") (startCol "0") (endRow "65535") (endCol "63")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "2") (endRow "1") (endCol "2")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "2") (startCol "2") (endRow "17") (endCol "2")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") @@ -219,13 +163,113 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "3") (endRow "31") (endCol "3")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "1") (startCol "0") (endRow "17") (endCol "1")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "hh\":\"mm\":\"ss AM/PM") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "18") (startCol "0") (endRow "31") (endCol "2")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "3") (endRow "31") (endCol "7")) + (@ (startRow "0") (startCol "16") (endRow "4095") (endCol "63")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -243,13 +287,20 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "8") (endRow "255") (endCol "63")) + (@ (startRow "0") (startCol "2") (endRow "1") (endCol "2")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -267,11 +318,18 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "0") (startCol "64") (endRow "65535") (endCol "255")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") @@ -291,36 +349,112 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans")))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "256") (startCol "0") (endRow "4095") (endCol "15")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "0") (endRow "0") (endCol "1")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0"))))))) (http://www.gnumeric.org/v10.dtd:Cols (@ (DefaultSizePts "48")) - (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "48") (No "0"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "48") (No "0") (MarginB "2") (MarginA "2"))) (http://www.gnumeric.org/v10.dtd:ColInfo - (@ (Unit "99") (No "1") (HardSize "1"))) + (@ (Unit "99") (No "1") (MarginB "2") (MarginA "2") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:ColInfo - (@ (Unit "64.01") (No "2") (Count "7")))) + (@ (Unit "64.01") (No "2") (MarginB "2") (MarginA "2") (Count "7")))) (http://www.gnumeric.org/v10.dtd:Rows (@ (DefaultSizePts "12.1")) - (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.64") (No "0"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.64") (No "0") (MarginB "0") (MarginA "0"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "13.5") (No "1") (MarginB "0") (MarginA "0") (Count "17"))) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "13.5") (No "1") (Count "17"))) - (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "18")))) + (@ (Unit "12.1") (No "18") (MarginB "0") (MarginA "0") (Count "2")))) (http://www.gnumeric.org/v10.dtd:Selections (@ (CursorRow "3") (CursorCol "1")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "3") (startCol "1") (endRow "3") (endCol "1")))) (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A2")) (http://www.gnumeric.org/v10.dtd:FreezePanes (@ (UnfrozenTopLeft "A2") (FrozenTopLeft "A1")))) (http://www.gnumeric.org/v10.dtd:Solver - (@ (ProgramR "0") + (@ (ShowIter "0") + (SensitivityR "0") + (ProgramR "0") (ProblemType "0") + (PerformR "0") (NonNeg "1") - (ModelType "0") (MaxTime "60") (MaxIter "1000") + (LimitsR "0") (Discr "0") - (AutoScale "0")))) + (AutoScale "0") + (AnswerR "0")))) Index: txtdb/nada3/sxml/RunsToDo.sxml ================================================================== --- txtdb/nada3/sxml/RunsToDo.sxml +++ txtdb/nada3/sxml/RunsToDo.sxml @@ -4,56 +4,51 @@ (OutlineSymbolsBelow "1") (HideZero "0") (HideRowHeader "0") (HideGrid "0") (HideColHeader "0") - (GridColor "0:0:0") (DisplayOutlines "1") (DisplayFormulas "0")) (http://www.gnumeric.org/v10.dtd:MaxCol "3") (http://www.gnumeric.org/v10.dtd:MaxRow "4") (http://www.gnumeric.org/v10.dtd:Zoom "1") (http://www.gnumeric.org/v10.dtd:Names (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Print_Area") - (http://www.gnumeric.org/v10.dtd:value "#REF!") + (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") + (http://www.gnumeric.org/v10.dtd:value "\"RunsToDo\"") (http://www.gnumeric.org/v10.dtd:position "A1")) (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") - (http://www.gnumeric.org/v10.dtd:value "\"RunsToDo\"") + (http://www.gnumeric.org/v10.dtd:name "Print_Area") + (http://www.gnumeric.org/v10.dtd:value "#REF!") (http://www.gnumeric.org/v10.dtd:position "A1"))) (http://www.gnumeric.org/v10.dtd:PrintInformation (http://www.gnumeric.org/v10.dtd:Margins (http://www.gnumeric.org/v10.dtd:top (@ (PrefUnit "mm") (Points "120"))) (http://www.gnumeric.org/v10.dtd:bottom (@ (PrefUnit "mm") (Points "120"))) - (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72"))) - (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:header - (@ (PrefUnit "mm") (Points "72"))) + (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:footer - (@ (PrefUnit "mm") (Points "72")))) + (@ (PrefUnit "Pt") (Points "72")))) (http://www.gnumeric.org/v10.dtd:Scale (@ (type "percentage") (percentage "100"))) (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:grid (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:draft (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:order "d_then_r") (http://www.gnumeric.org/v10.dtd:orientation "portrait") (http://www.gnumeric.org/v10.dtd:Header (@ (Right "") (Middle "&[TAB]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer (@ (Right "") (Middle "Page &[PAGE]") (Left ""))) - (http://www.gnumeric.org/v10.dtd:paper "na_letter") - (http://www.gnumeric.org/v10.dtd:comments "in_place") - (http://www.gnumeric.org/v10.dtd:errors "as_displayed")) + (http://www.gnumeric.org/v10.dtd:paper "na_letter")) (http://www.gnumeric.org/v10.dtd:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") @@ -74,29 +69,41 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans")))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0"))))))) (http://www.gnumeric.org/v10.dtd:Cols (@ (DefaultSizePts "48")) (http://www.gnumeric.org/v10.dtd:ColInfo - (@ (Unit "48") (No "0") (Count "4")))) + (@ (Unit "48") (No "0") (MarginB "2") (MarginA "2") (Count "4")))) (http://www.gnumeric.org/v10.dtd:Rows (@ (DefaultSizePts "12.75")) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "13.5") (No "0") (Count "4"))) - (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.75") (No "4")))) + (@ (Unit "13.5") (No "0") (MarginB "0") (MarginA "0") (Count "4"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.75") (No "4") (MarginB "0") (MarginA "0")))) (http://www.gnumeric.org/v10.dtd:Selections (@ (CursorRow "3") (CursorCol "2")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "3") (startCol "2") (endRow "3") (endCol "2")))) (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1"))) (http://www.gnumeric.org/v10.dtd:Solver - (@ (ProgramR "0") + (@ (ShowIter "0") + (SensitivityR "0") + (ProgramR "0") (ProblemType "0") + (PerformR "0") (NonNeg "1") - (ModelType "0") (MaxTime "60") (MaxIter "1000") + (LimitsR "0") (Discr "0") - (AutoScale "0")))) + (AutoScale "0") + (AnswerR "0")))) ADDED txtdb/nada3/sxml/RunsToLock.sxml Index: txtdb/nada3/sxml/RunsToLock.sxml ================================================================== --- /dev/null +++ txtdb/nada3/sxml/RunsToLock.sxml @@ -0,0 +1,92 @@ +(http://www.gnumeric.org/v10.dtd:Sheet + (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE") + (OutlineSymbolsRight "1") + (OutlineSymbolsBelow "1") + (HideZero "0") + (HideRowHeader "0") + (HideGrid "0") + (HideColHeader "0") + (DisplayOutlines "1") + (DisplayFormulas "0")) + (http://www.gnumeric.org/v10.dtd:MaxCol "1") + (http://www.gnumeric.org/v10.dtd:MaxRow "1") + (http://www.gnumeric.org/v10.dtd:Zoom "1") + (http://www.gnumeric.org/v10.dtd:PrintInformation + (http://www.gnumeric.org/v10.dtd:Margins + (http://www.gnumeric.org/v10.dtd:top (@ (PrefUnit "cm") (Points "120"))) + (http://www.gnumeric.org/v10.dtd:bottom + (@ (PrefUnit "cm") (Points "120")))) + (http://www.gnumeric.org/v10.dtd:Scale + (@ (type "percentage") (percentage "100"))) + (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:grid (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:draft (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:order "d_then_r") + (http://www.gnumeric.org/v10.dtd:orientation "portrait") + (http://www.gnumeric.org/v10.dtd:Header + (@ (Right "") (Middle "&[TAB]") (Left ""))) + (http://www.gnumeric.org/v10.dtd:Footer + (@ (Right "") (Middle "Page &[PAGE]") (Left "")))) + (http://www.gnumeric.org/v10.dtd:Styles + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0"))))))) + (http://www.gnumeric.org/v10.dtd:Cols + (@ (DefaultSizePts "48")) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "48") (No "0") (MarginB "2") (MarginA "2") (Count "2")))) + (http://www.gnumeric.org/v10.dtd:Rows + (@ (DefaultSizePts "12.75")) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.75") (No "0") (MarginB "0") (MarginA "0") (Count "2")))) + (http://www.gnumeric.org/v10.dtd:Selections + (@ (CursorRow "0") (CursorCol "0")) + (http://www.gnumeric.org/v10.dtd:Selection + (@ (startRow "0") (startCol "0") (endRow "0") (endCol "0")))) + (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1"))) + (http://www.gnumeric.org/v10.dtd:Solver + (@ (ShowIter "0") + (SensitivityR "0") + (ProgramR "0") + (ProblemType "1") + (PerformR "0") + (NonNeg "1") + (MaxTime "0") + (MaxIter "0") + (LimitsR "0") + (Inputs "") + (Discr "0") + (AutoScale "0") + (AnswerR "0")))) Index: txtdb/nada3/sxml/Second-sheet.sxml ================================================================== --- txtdb/nada3/sxml/Second-sheet.sxml +++ txtdb/nada3/sxml/Second-sheet.sxml @@ -4,59 +4,178 @@ (OutlineSymbolsBelow "1") (HideZero "0") (HideRowHeader "0") (HideGrid "0") (HideColHeader "0") - (GridColor "0:0:0") (DisplayOutlines "1") (DisplayFormulas "0")) (http://www.gnumeric.org/v10.dtd:MaxCol "3") - (http://www.gnumeric.org/v10.dtd:MaxRow "24") + (http://www.gnumeric.org/v10.dtd:MaxRow "21") (http://www.gnumeric.org/v10.dtd:Zoom "1") (http://www.gnumeric.org/v10.dtd:Names (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Print_Area") - (http://www.gnumeric.org/v10.dtd:value "#REF!") + (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") + (http://www.gnumeric.org/v10.dtd:value "\"Second-sheet\"") (http://www.gnumeric.org/v10.dtd:position "A1")) (http://www.gnumeric.org/v10.dtd:Name - (http://www.gnumeric.org/v10.dtd:name "Sheet_Title") - (http://www.gnumeric.org/v10.dtd:value "\"Second-sheet\"") + (http://www.gnumeric.org/v10.dtd:name "Print_Area") + (http://www.gnumeric.org/v10.dtd:value "#REF!") (http://www.gnumeric.org/v10.dtd:position "A1"))) (http://www.gnumeric.org/v10.dtd:PrintInformation (http://www.gnumeric.org/v10.dtd:Margins (http://www.gnumeric.org/v10.dtd:top (@ (PrefUnit "mm") (Points "93.26"))) (http://www.gnumeric.org/v10.dtd:bottom (@ (PrefUnit "mm") (Points "93.26"))) - (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72"))) - (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:header - (@ (PrefUnit "mm") (Points "72"))) + (@ (PrefUnit "Pt") (Points "72"))) (http://www.gnumeric.org/v10.dtd:footer - (@ (PrefUnit "mm") (Points "72")))) + (@ (PrefUnit "Pt") (Points "72")))) (http://www.gnumeric.org/v10.dtd:Scale (@ (type "percentage") (percentage "100"))) (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:grid (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:draft (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0"))) - (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:order "d_then_r") (http://www.gnumeric.org/v10.dtd:orientation "portrait") (http://www.gnumeric.org/v10.dtd:Header (@ (Right "") (Middle "&[tab]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer (@ (Right "") (Middle "&[page]") (Left ""))) - (http://www.gnumeric.org/v10.dtd:paper "na_letter") - (http://www.gnumeric.org/v10.dtd:comments "in_place") - (http://www.gnumeric.org/v10.dtd:errors "as_displayed")) + (http://www.gnumeric.org/v10.dtd:paper "na_letter")) (http://www.gnumeric.org/v10.dtd:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "4096") (startCol "0") (endRow "65535") (endCol "63")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "4") (endRow "255") (endCol "15")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "32") (startCol "0") (endRow "255") (endCol "3")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "17") (startCol "3") (endRow "31") (endCol "3")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "0") (startCol "0") (endRow "31") (endCol "2")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") @@ -75,155 +194,18 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "32") (startCol "0") (endRow "255") (endCol "7")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "256") (startCol "0") (endRow "65279") (endCol "255")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "65280") (startCol "0") (endRow "65532") (endCol "255")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "65533") (startCol "0") (endRow "65535") (endCol "255")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "3") (endRow "0") (endCol "3")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "28") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) - (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "1") (startCol "3") (endRow "15") (endCol "3")) - (http://www.gnumeric.org/v10.dtd:Style - (@ (WrapText "0") - (VAlign "2") - (ShrinkToFit "0") - (Shade "0") - (Rotation "0") - (PatternColor "0:0:0") - (Locked "1") - (Indent "0") - (Hidden "0") - (HAlign "1") - (Format "General") - (Fore "0:0:0") - (Back "FFFF:FFFF:FFFF")) - (http://www.gnumeric.org/v10.dtd:Font - (@ (Unit "10") - (Underline "0") - (StrikeThrough "0") - (Script "0") - (Italic "0") - (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "16") (startCol "3") (endRow "16") (endCol "3")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") @@ -243,13 +225,51 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "16") (endRow "4095") (endCol "63")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "17") (startCol "3") (endRow "31") (endCol "3")) + (@ (startRow "0") (startCol "64") (endRow "65535") (endCol "255")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -267,13 +287,20 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "4") (endRow "31") (endCol "7")) + (@ (startRow "1") (startCol "3") (endRow "15") (endCol "3")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -291,13 +318,51 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans"))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") (startCol "3") (endRow "0") (endCol "3")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "28") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0")))))) (http://www.gnumeric.org/v10.dtd:StyleRegion - (@ (startRow "0") (startCol "8") (endRow "255") (endCol "255")) + (@ (startRow "256") (startCol "0") (endRow "4095") (endCol "15")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") (VAlign "2") (ShrinkToFit "0") (Shade "0") @@ -315,36 +380,49 @@ (Underline "0") (StrikeThrough "0") (Script "0") (Italic "0") (Bold "0")) - "Sans")))) + "Sans") + (http://www.gnumeric.org/v10.dtd:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal (@ (Style "0"))))))) (http://www.gnumeric.org/v10.dtd:Cols (@ (DefaultSizePts "48")) - (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "64.01") (No "0"))) - (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "48") (No "1"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "64.01") (No "0") (MarginB "2") (MarginA "2"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "48") (No "1") (MarginB "2") (MarginA "2"))) (http://www.gnumeric.org/v10.dtd:ColInfo - (@ (Unit "99") (No "2") (HardSize "1"))) + (@ (Unit "99") (No "2") (MarginB "2") (MarginA "2") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:ColInfo - (@ (Unit "227.2") (No "3") (HardSize "1")))) + (@ (Unit "227.2") (No "3") (MarginB "2") (MarginA "2") (HardSize "1")))) (http://www.gnumeric.org/v10.dtd:Rows (@ (DefaultSizePts "12.1")) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "60") (No "0") (HardSize "1"))) + (@ (Unit "60") (No "0") (MarginB "0") (MarginA "0") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "13.5") (No "1") (Count "17"))) + (@ (Unit "13.5") (No "1") (MarginB "0") (MarginA "0") (Count "17"))) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "12.1") (No "18") (Count "4")))) + (@ (Unit "12.1") (No "18") (MarginB "0") (MarginA "0") (Count "4")))) (http://www.gnumeric.org/v10.dtd:Selections (@ (CursorRow "0") (CursorCol "3")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "0") (startCol "3") (endRow "0") (endCol "3")))) (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1"))) (http://www.gnumeric.org/v10.dtd:Solver - (@ (ProgramR "0") + (@ (ShowIter "0") + (SensitivityR "0") + (ProgramR "0") (ProblemType "0") + (PerformR "0") (NonNeg "1") - (ModelType "0") (MaxTime "60") (MaxIter "1000") + (LimitsR "0") (Discr "0") - (AutoScale "0")))) + (AutoScale "0") + (AnswerR "0")))) Index: txtdb/nada3/sxml/_sheets.sxml ================================================================== --- txtdb/nada3/sxml/_sheets.sxml +++ txtdb/nada3/sxml/_sheets.sxml @@ -1,9 +1,9 @@ ((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation - "http://www.gnumeric.org/v9.xsd")) + "http://www.gnumeric.org/v8.xsd")) (http://www.gnumeric.org/v10.dtd:Version - (@ (Minor "17") (Major "10") (Full "1.10.17") (Epoch "1"))) + (@ (Minor "3") (Major "6") (Full "1.6.3") (Epoch "1"))) (http://www.gnumeric.org/v10.dtd:Attributes (http://www.gnumeric.org/v10.dtd:Attribute (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_horizontal_scrollbar") @@ -23,37 +23,24 @@ (http://www.gnumeric.org/v10.dtd:value "TRUE")) (http://www.gnumeric.org/v10.dtd:Attribute (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::is_protected") (http://www.gnumeric.org/v10.dtd:value "FALSE"))) - (urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta - (@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2")) - (urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta - (http://purl.org/dc/elements/1.1/:date "2013-07-26T04:47:02Z") - (urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date - "2013-07-26T04:46:14Z"))) + (http://www.gnumeric.org/v10.dtd:Summary + (http://www.gnumeric.org/v10.dtd:Item + (http://www.gnumeric.org/v10.dtd:name "application") + (http://www.gnumeric.org/v10.dtd:val-string "gnumeric")) + (http://www.gnumeric.org/v10.dtd:Item + (http://www.gnumeric.org/v10.dtd:name "author") + (http://www.gnumeric.org/v10.dtd:val-string "matthew.r.welland"))) + (http://www.gnumeric.org/v10.dtd:SheetNameIndex + (http://www.gnumeric.org/v10.dtd:SheetName "First_Sheet") + (http://www.gnumeric.org/v10.dtd:SheetName "Second-sheet") + (http://www.gnumeric.org/v10.dtd:SheetName "RunsToDo") + (http://www.gnumeric.org/v10.dtd:SheetName "RunsToLock")) + (http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647"))) + (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "3"))) (http://www.gnumeric.org/v10.dtd:Calculation (@ (MaxIterations "100") (ManualRecalc "0") (IterationTolerance "0.001") - (FloatRadix "2") - (FloatDigits "53") - (EnableIteration "1"))) - (http://www.gnumeric.org/v10.dtd:SheetNameIndex - (http://www.gnumeric.org/v10.dtd:SheetName - (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") - (http://www.gnumeric.org/v10.dtd:Cols "256")) - "First_Sheet") - (http://www.gnumeric.org/v10.dtd:SheetName - (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") - (http://www.gnumeric.org/v10.dtd:Cols "256")) - "Second-sheet") - (http://www.gnumeric.org/v10.dtd:SheetName - (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") - (http://www.gnumeric.org/v10.dtd:Cols "256")) - "RunsToDo") - (http://www.gnumeric.org/v10.dtd:SheetName - (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") - (http://www.gnumeric.org/v10.dtd:Cols "256")) - "RunsToLock")) - (http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647"))) - (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "1")))) + (EnableIteration "1")))) Index: txtdb/txtdb.scm ================================================================== --- txtdb/txtdb.scm +++ txtdb/txtdb.scm @@ -16,10 +16,12 @@ (use regex-case) (use posix) (use json) (use csv) +(include "../megatest-fossil-hash.scm") + ;; Read a non-compressed gnumeric file (define (refdb:read-gnumeric-xml fname) (with-input-from-file fname (lambda () (ssax:xml->sxml (current-input-port) '())))) @@ -75,28 +77,34 @@ (cells (find-section dat 'http://www.gnumeric.org/v10.dtd:Cells)) (remaining (remove-section (remove-section dat 'http://www.gnumeric.org/v10.dtd:Name) 'http://www.gnumeric.org/v10.dtd:Cells)) (rownums (make-hash-table)) ;; num -> name (colnums (make-hash-table)) ;; num -> name - (cols (make-hash-table))) ;; name -> ( (name val) ... ) + (cols (make-hash-table)) ;; name -> ( (name val) ... ) + (col0title "")) (for-each (lambda (cell) (let ((rownum (string->number (car (find-section cell 'Row)))) (colnum (string->number (car (find-section cell 'Col)))) (valtype (let ((res (find-section cell 'ValueType))) (if res (car res) #f))) (value (let ((res (cdr (filter (lambda (x)(not (list? x))) cell)))) (if (null? res) "" (car res))))) ;; If colnum is 0 Then this is a row name, if rownum is 0 then this is a col name (cond - ((eq? 0 colnum) ;; a blank in column zero is handled with the special name "row-N" + ((and (not (eq? 0 rownum)) + (eq? 0 colnum)) ;; a blank in column zero is handled with the special name "row-N" (hash-table-set! rownums rownum (if (equal? value "") (conc "row-" rownum) value))) - ((eq? 0 rownum) + ((and (not (eq? 0 colnum)) + (eq? 0 rownum)) (hash-table-set! colnums colnum (if (equal? value "") (conc "col-" colnum) value))) + ((and (eq? 0 rownum) + (eq? 0 colnum)) + (set! col0title value)) (else (let ((colname (hash-table-ref/default colnums colnum (conc "col-" colnum))) (rowname (hash-table-ref/default rownums rownum (conc "row-" rownum)))) (hash-table-set! cols colname (cons (list rowname value) (hash-table-ref/default cols colname '())))))))) @@ -104,10 +112,11 @@ (let ((ref-colnums (map (lambda (c) (list (cdr c)(car c))) (hash-table->alist colnums)))) (with-output-to-file (conc targdir "/" sheet-name ".dat") (lambda () + (print "[" col0title "]") (for-each (lambda (colname) (print "[" colname "]") (for-each (lambda (row) (let ((key (car row)) (val (cadr row))) @@ -213,18 +222,20 @@ (blank-rx (regexp "^\\s*$")) (continue-rx (regexp ".*\\\\$")) (var-no-val-rx (regexp "^(\\S+)\\s*$")) (inp (open-input-file fname)) (cmnt-indx (make-hash-table)) - (blnk-indx (make-hash-table))) + (blnk-indx (make-hash-table)) + (first-section #f)) ;; used for zeroth title (let loop ((inl (read-line inp)) (section ".............") (res '())) (if (eof-object? inl) (begin (close-input-port inp) - (reverse res)) + (cons (list first-section first-section first-section) + (reverse res))) (regex-case inl (continue-rx _ (loop (conc inl (read-line inp)) section res)) (comment-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default cmnt-indx section 0)))) (hash-table-set! cmnt-indx section curr-indx) @@ -234,13 +245,16 @@ (blank-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default blnk-indx section 0)))) (hash-table-set! blnk-indx section curr-indx) (loop (read-line inp) section (cons (list (conc "#BLNK" curr-indx) section " ") res)))) - (section-rx (x sname) (loop (read-line inp) - sname - res)) + (section-rx (x sname) (begin + (if (not first-section) + (set! first-section sname)) + (loop (read-line inp) + sname + res))) (cell-rx (x k v) (loop (read-line inp) section (cons (list k section v) res))) (var-no-val-rx (x k) (loop (read-line inp) section @@ -262,11 +276,11 @@ (hash-table-set! expressions val new-max) (list 'ExprID new-max))))) (else '(ValueType "60")))) (define (dat->cells dat) - (let* ((indx (common:sparse-list-generate-index dat)) + (let* ((indx (common:sparse-list-generate-index (cdr dat))) (row-indx (car indx)) (col-indx (cadr indx)) (rowdat (map (lambda (row)(list (car row) " " (car row))) row-indx)) (coldat (map (lambda (col)(list " " (car col) (car col))) col-indx)) (exprs (make-hash-table))) @@ -347,17 +361,27 @@ (conc "Usage: refdb action params ... Note: refdbdir is a path to the directory containg sheet-names.cfg import filename.gnumeric refdbdir : Import a gnumeric file into a txt db directory + export refdbdir filename.gnumeric : Export a refdb to a gnumeric file edit refdbdir : Edit a refdbdir using gnumeric. ls refdbdir : List the keys for specified level lookup refdbdir sheetname row col : Look up a value in the text db getrownames refdb sheetname : Get a list of row titles - getcolnames refdb sheetname : Get a list of column titles + getcolnames refdb sheetname : Get a list of column titles + +To export to other formats; first export to gnumeric then use ssconvert. + +e.g. + +refdb export mydata mydata.gnumeric +ssconvert -T Gnumeric_html:html40 mydata.gnumeric mydata.html + +Part of the Megatest tool suite. Learn more at http://www.kiatoa.com/fossils/megatest -Part of the Megatest tool suite. Learn more at http://www.kiatoa.com/fossils/megatest")) +Version: " megatest-fossil-hash)) (define (list-sheets path) ;; (cond ;; ((and path (not sheet)(not row)(not col)) (if (file-exists? path) @@ -415,11 +439,11 @@ (define (edit-refdb path) ;; TEMPORARY, REMOVE IN 2014 (if (not (file-exists? path)) ;; Create new (begin - (print "INFO: Creating new txtdb at " path) + (print "\nINFO: Creating new txtdb at " path "\n") (create-new-db path))) (if (not (file-exists? (conc path "/sxml/_sheets.sxml"))) (begin (print "ERROR: You appear to have the old file structure for txtdb. Please do the following and try again.") (print) @@ -434,10 +458,14 @@ (refdb-export path tmpf)) (let ((pid (process-run "gnumeric" (list tmpf)))) (process-wait pid) (import-gnumeric-file tmpf path)))) +;;====================================================================== +;; This routine dispaches or executes most of the commands for refdb +;;====================================================================== +;; (define (process-action action-str . param) (let ((num-params (length param)) (action (string->symbol action-str))) (cond ((eq? num-params 1) @@ -445,17 +473,18 @@ ((edit) (edit-refdb (car param))) ((ls) (map print (list-sheets (car param)))))) ((eq? num-params 2) - (case action - ((getrownames)(print (string-intersperse (get-rowcol-names (car param)(cadr param) car) " "))) - ((getcolnames)(print (string-intersperse (get-rowcol-names (car param)(cadr param) cadr) " "))) - ((import) - (let ((fname (car param)) - (targname (cadr param))) - (import-gnumeric-file fname targname))))) + (let ((param1 (car param)) + (param2 (cadr param))) + (case action + ((getrownames) (print (string-intersperse (get-rowcol-names param1 param2 car) " "))) + ((getcolnames) (print (string-intersperse (get-rowcol-names param1 param2 cadr) " "))) + ((import) (import-gnumeric-file param1 param2)) ;; fname targname + ((export) (refdb-export param1 param2)) + (else (print "Unrecognised command " action)(print help))))) ((eq? num-params 4) (case action ((lookup) ;; path section row col (let ((res (lookup (car param)(cadr param)(caddr param)(cadddr param)))) (if res @@ -537,10 +566,13 @@ (let ((dotfile (conc (get-environment-variable "HOME") "/.txtdbrc"))) (if (file-exists? dotfile) (load dotfile))) +(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.refdbrc"))) + (if (file-exists? debugcontrolf) + (load debugcontrolf))) (main) #| (define x (refdb:read-gnumeric-xml "testdata-stripped.xml")) Index: utils/mt_xterm ================================================================== --- utils/mt_xterm +++ utils/mt_xterm @@ -1,10 +1,12 @@ #!/bin/bash +MT_TMPDISPLAY=$DISPLAY if [ -e megatest.sh ];then source megatest.sh fi +export DISPLAY=$MT_TMPDISPLAY if [ x"$MT_XTERM_CMD" == "x" ];then exec xterm "$@" else exec $MT_XTERM_CMD ADDED utils/nbload Index: utils/nbload ================================================================== --- /dev/null +++ utils/nbload @@ -0,0 +1,24 @@ +#!/bin/bash + +# load=`uptime|awk '{print $10}'|cut -d, -f1` +load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'` +if which cpucheck > /dev/null;then + numcpu=`cpucheck|tail -1|awk '{print $6}'` +else + numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'` +fi + +lperc=`echo "100 * $load / $numcpu"|bc` +if [[ "x$MAX_ALLOWED_LOAD" == "x" ]]; then + max_load=50 +else + max_load=$MAX_ALLOWED_LOAD +fi +if [[ $lperc -lt $max_load ]];then + echo "$@" | at now + 0 minutes +elif [[ "x$NBLAUNCHER" == "x" ]];then + echo "nbfind $@" | at now + 2 minutes +else + $NBLAUNCHER "$@" +fi + ADDED utils/revtagfsl.scm Index: utils/revtagfsl.scm ================================================================== --- /dev/null +++ utils/revtagfsl.scm @@ -0,0 +1,78 @@ + +;; Copyright 2006-2013, Matthew Welland. +;; +;; This program is made available under the GNU GPL version 2.0 or +;; greater. See the accompanying file COPYING for details. +;; +;; This program is distributed WITHOUT ANY WARRANTY; without even the +;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. + +(use json regex posix) +(use srfi-69) + +;; Add tags with node nums: trunk(12) +(define fname #f) + +(let ((parms (argv))) + (if (> (length parms) 1) + (set! fname (cadr parms)))) + +(if (not (and fname (file-exists? fname))) + (begin + (print "Usage: revtagfsl /path/to/fossilfile.fossil") + (exit 1))) + +(define (revtag:get-timeline fslfname limit) + (let* ((cmd (if (file-exists? fslfname) + (conc "fossil json timeline checkin --limit " limit " -R " fslfname) + (conc "fossil json timeline checkin --limit " limit)))) + (with-input-from-pipe cmd json-read))) + + +(define mt (vector->list (revtag:get-timeline fname 10000))) +(define tl (map vector->list (cdr (assoc "timeline" (vector->list (cdr (assoc "payload" mt))))))) + +(define tagged (make-hash-table)) +(define usedtags (make-hash-table)) + +(for-each (lambda (node) + (let* ((uuid (cdr (assoc "uuid" node))) + (tags-dat (assoc "tags" node)) + (tags (if tags-dat (cdr tags-dat) '()))) + (for-each (lambda (tag) + (hash-table-set! usedtags tag #t)) + tags))) + tl) + +(define ord-tl (sort tl (lambda (a b)(let ((ta (cdr (assoc "timestamp" a)))(tb (cdr (assoc "timestamp" b))))(< ta tb))))) + +(define (make-tag branch) + (let* ((nextnum (+ 1 (hash-table-ref/default tagged branch 0)))) + (hash-table-set! tagged branch nextnum) + (conc branch "-r" nextnum))) + +(define (get-next-revtag branch) + (let loop ((tag (make-tag branch))) + (if (hash-table-ref/default usedtags tag #f) + (loop (make-tag branch)) + tag))) + +(print "branch, uuid, newtag") + +(let loop ((hed (car ord-tl)) + (tal (cdr ord-tl))) + (let* ((tags (let ((t (assoc "tags" hed))) + (if t (cdr t) '()))) + (uuid (cdr (assoc "uuid" hed))) + (branch (if (null? tags) "nobranch" (car tags))) + (tagpatt (regexp (conc "^" branch "-r\\d+$"))) + (currtag (filter (lambda (x)(string-match tagpatt x)) tags))) + (if (and (not (equal? branch "nobranch")) + (null? currtag)) + (let ((newtag (get-next-revtag branch))) + (print branch ", " uuid ", " newtag) + (system (conc "fossil tag add \"" newtag "\" " uuid " -R " fname)) ;; ?--raw? ?--propagate? TAGNAME CHECK-IN ?VALUE? + (hash-table-set! usedtags currtag #t))) + (if (not (null? tal)) + (loop (car tal)(cdr tal)))))