Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -1288,10 +1288,14 @@ (and (> modtime last-db-update-time) (> (current-seconds)(+ last-db-update-time 1))))) (define *monitor-db-path* (conc *toppath* "/monitor.db")) (define *last-monitor-update-time* 0) + +;; Force creation of the db in case it isn't already there. +(let ((db (tasks:open-db))) + (sqlite3:finalize! db)) (define (dashboard:run-update x) (let* ((modtime (file-modification-time *db-file-path*)) (monitor-modtime (file-modification-time *monitor-db-path*)) (run-update-time (current-seconds)) ADDED docs/megatest-about.svg Index: docs/megatest-about.svg ================================================================== --- /dev/null +++ docs/megatest-about.svg @@ -0,0 +1,492 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Megatest + Simple - but not TOO simple! + + Automation + Quality Assurance + Regression Testing + System Administration + + + + + + Write one task or test and iterateDistribute tasks over one or many hostsOrganize runs by any variables you wish - release - architecture - unit or partitionTasks or tests may depend on othersEach task or test runs in clean areaAdd disk space or partitions as neededRigorous results; error, pass, warn etc.Crontab friendly runs (skip if running)Easy debugging - easy to recreate environment for task - annotated HTML logs help find issuesSimplify scripts - eliminate for-each or while loops - parallel running handled by tool + + FAIL + + PASS + + WARN + + Index: docs/megatest-training.odp ================================================================== --- docs/megatest-training.odp +++ docs/megatest-training.odp cannot compute difference between binary files Index: docs/megatest-training.pdf ================================================================== --- docs/megatest-training.pdf +++ docs/megatest-training.pdf cannot compute difference between binary files Index: txtdb/nada3/First_Sheet.dat ================================================================== --- txtdb/nada3/First_Sheet.dat +++ txtdb/nada3/First_Sheet.dat @@ -72,11 +72,11 @@ N 91 O 79 P 68 Q 51 -[2nd row] +[2nd_row] A 34.299999999999997 B 60 C 90 D 116 E 121 @@ -91,11 +91,11 @@ N 90 O 78 P 63 Q 51 -[3rd row] +[3rd_row] A 34.100000000000001 B 42 C 57 D 69 E 73 @@ -110,11 +110,11 @@ N 88 O 77 P 64 Q 51 -[4th row] +[4th_row] A 34 B 39 C 46 D 52 E 54 @@ -129,11 +129,11 @@ N 81 O 72 P 62 Q 51 -[Exit ] +[Exit] A 34 B 68 C 68 D 68 E 68 Index: txtdb/nada3/RunsToDo.dat ================================================================== --- txtdb/nada3/RunsToDo.dat +++ txtdb/nada3/RunsToDo.dat @@ -1,3 +1,15 @@ -[ww12a] -b/c/d yes +[a/b/c] +123 a +456 b +789 c + +[d/e/f] +123 e +456 f +789 g + +[g/h/i] +123 h +456 i +789 j Index: txtdb/nada3/sxml/RunsToDo.sxml ================================================================== --- txtdb/nada3/sxml/RunsToDo.sxml +++ txtdb/nada3/sxml/RunsToDo.sxml @@ -7,12 +7,12 @@ (HideGrid "0") (HideColHeader "0") (GridColor "0:0: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:MaxCol "3") + (http://www.gnumeric.org/v10.dtd:MaxRow "3") (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!") @@ -21,14 +21,13 @@ (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: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:top (@ (PrefUnit "mm") (Points "120"))) (http://www.gnumeric.org/v10.dtd:bottom - (@ (PrefUnit "mm") (Points "93.26"))) + (@ (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:header (@ (PrefUnit "mm") (Points "72"))) (http://www.gnumeric.org/v10.dtd:footer @@ -45,13 +44,13 @@ (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 ""))) + (@ (Right "") (Middle "&[TAB]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer - (@ (Right "") (Middle "&[page]") (Left ""))) + (@ (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:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion @@ -78,20 +77,20 @@ (Italic "0") (Bold "0")) "Sans")))) (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 "48") (No "0") (Count "4")))) (http://www.gnumeric.org/v10.dtd:Rows - (@ (DefaultSizePts "12.1")) + (@ (DefaultSizePts "12.75")) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "13.5") (No "0") (Count "2")))) + (@ (Unit "13.5") (No "0") (Count "4")))) (http://www.gnumeric.org/v10.dtd:Selections - (@ (CursorRow "2") (CursorCol "1")) + (@ (CursorRow "3") (CursorCol "2")) (http://www.gnumeric.org/v10.dtd:Selection - (@ (startRow "2") (startCol "1") (endRow "2") (endCol "1")))) + (@ (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") (ProblemType "0") (NonNeg "1") Index: txtdb/nada3/sxml/sheets.sxml ================================================================== --- txtdb/nada3/sxml/sheets.sxml +++ txtdb/nada3/sxml/sheets.sxml @@ -26,13 +26,13 @@ (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-15T04:32:47Z") + (http://purl.org/dc/elements/1.1/:date "2013-07-19T05:53:19Z") (urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date - "2013-07-15T04:32:37Z"))) + "2013-07-19T05:52:56Z"))) (http://www.gnumeric.org/v10.dtd:Calculation (@ (MaxIterations "100") (ManualRecalc "0") (IterationTolerance "0.001") (FloatRadix "2") @@ -54,6 +54,6 @@ (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 "3")))) + (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "2")))) Index: txtdb/txtdb.scm ================================================================== --- txtdb/txtdb.scm +++ txtdb/txtdb.scm @@ -257,11 +257,11 @@ (append (cons (list 'http://www.gnumeric.org/v10.dtd:Name sheetname) (cdr sht-meta)) cells)) res))) '() - sht-names))) + (reverse sht-names)))) (append wrk-rem (list (append (cons 'http://www.gnumeric.org/v10.dtd:Workbook sht-rem) (list (cons 'http://www.gnumeric.org/v10.dtd:Sheets sheets))))))) @@ -337,10 +337,38 @@ (if (null? tal) #f (loop (car tal)(cdr tal))))))) #f))) +;; call with proc = car to get row names +;; call with proc = cadr to get col names +(define (get-rowcol-names path sheet proc) + (let ((fname (conc path "/" sheet ".dat"))) + (if (file-exists? fname) + (let ((dat (read-dat fname))) + (if (null? dat) + #f + (let loop ((hed (car dat)) + (tal (cdr dat)) + (res '())) + (let* ((row-name (proc hed)) + (newres (if (not (member row-name res)) + (cons row-name res) + res))) + (if (null? tal) + (reverse newres) + (loop (car tal)(cdr tal) newres)))))) + #f))) + +(define (get-col-names path sheet) + (let ((fname (conc path "/" sheet ".dat"))) + (if (file-exists? fname) + (let ((dat (read-dat fname))) + (if (null? dat) + #f + (map cadr dat)))))) + (define (edit-refdb path) (let* ((dbname (pathname-strip-directory path)) (tmpf (conc (create-temporary-file dbname) ".gnumeric"))) (if (file-exists? (conc path "/sheet-names.cfg")) (refdb-export path tmpf)) @@ -358,10 +386,12 @@ (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))))) ((eq? num-params 4) ADDED utils/Makefile.installall Index: utils/Makefile.installall ================================================================== --- /dev/null +++ utils/Makefile.installall @@ -0,0 +1,184 @@ + +# Copyright 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. + +help : + @echo You may need to do the following first: + @echo sudo apt-get install libreadline-dev + @echo sudo apt-get install libwebkitgtk-dev + @echo sudo apt-get install libmotif3 -OR- set KTYPE=26g4 + @echo KTYPE can be 26, 26g4, or 32 + @echo KTYPE=$KTYPE + @echo You are using PREFIX=$PREFIX + @echo You are using proxy="$(proxy)" + @echo If needed set proxy to host.dom:port + @echo + @echo "Set additional_libpath to help find gtk or other libraries, don't forget a leading :" + @echo ADDITIONAL_LIBPATH=$(ADDITIONAL_LIBPATH) + @echo + @echo To use previous IUP libraries set USEOLDIUP to yes + @echo USEOLDIUP=$(USEOLDIUP) + @echo + @echo To make all do: make all + +# Put the installation here +ifeq ($(PREFIX),) +PREFIX=$(PWD)/target +endif + +# Set this on the command line of your make call if needed: make PROXY=host.com:1234 +PROXY= + +# Select IUP library type +KTYPE=26g4 + +# Select version of chicken, sqlite3 etc +CHICKEN_VERSION=4.8.0 +SQLITE3_VERSION=3071401 + +# Eggs to install (straightforward ones) +EGGS=matchable readline apropos base64 regex-literals format regex-case test coops trace csv dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt json md5 awful http-client spiffy uri-common intarweb spiffy-request-vars + +# +# Derived variables +# + +ifeq ($(PROXY),) +PROX= +else +http_proxy=http://$(PROXY) +PROX="-proxy $(PROXY)" +endif + +BUILDHOME=$(PWD) +PATH:=$(PREFIX)/bin:$(PATH) +LIBPATH=$(PREFIX)/lib$(ADDITIONAL_LIBPATH) +LD_LIBRARY_PATH=$(LIBPATH) +CHICKEN_INSTALL=$(PREFIX)/bin/chicken-install +CHICKEN_EGG_DIR=$(PREFIX)/lib/chicken/6 + +VPATH=$(CHICKEN_EGG_DIR):$(PWD)/eggflags + +vpath %.so $(CHICKEN_EGG_DIR) +vpath %.flag eggflags + +EGGSOFILES=$(addprefix $(CHICKEN_EGG_DIR)/,$(addsuffix .so,$(EGGS))) +EGGFLAGS=$(addprefix eggflags/,$(addsuffix .flag,$(EGGS))) + +# Stuff needed for IUP +ISARCHX86_64=$(shell uname -a | grep x86_64) +ifeq ($(ISARCHX86_64),) +ARCHSIZE= +else +ARCHSIZE=64_ +endif + +IUPFILES=cd-5.5.1_Linux$(KTYPE)_$(ARCHSIZE)lib.tar.gz im-3.8_Linux$(KTYPE)_$(ARCHSIZE)lib.tar.gz iup-3.6_Linux$(KTYPE)_$(ARCHSIZE)lib.tar.gz +CSCLIBS=$(shell echo $(LD_LIBRARY_PATH) | sed 's/:/ -L/g') +CSC_OPTIONS=-I$(PREFIX)/include -L$(CSCLIBS) + +all : chkn eggs iup + +chkn : $(CHICKEN_INSTALL) + +eggs : $(EGGSOFILES) + +sqlite3 : $(CHICKEN_EGG_DIR)/sqlite3.so + +iup : $(PREFIX)/lib/libavcall.a $(CHICKEN_EGG_DIR)/iup.so $(CHICKEN_EGG_DIR)/canvas-draw.so + +# Silly rule to make installing eggs more makeish, I don't understand why I need the basename +$(CHICKEN_EGG_DIR)/%.so : %.flag + $(CHICKEN_INSTALL) $(PROX) $(shell basename $*) + +$(EGGFLAGS) : # $(CHICKEN_INSTALL) + mkdir -p eggflags + touch $(EGGFLAGS) + +# some setup stuff +# +setup-chicken4x.sh : $(EGGFLAGS) + (echo "export PATH=$(PATH)" > setup-chicken4x.sh) + (echo "export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" >> setup-chicken4x.sh) + mkdir -p $(PREFIX) + +# Download chicken source +chicken-$(CHICKEN_VERSION).tar.gz : + wget http://code.call-cc.org/releases/$(CHICKEN_VERSION)/chicken-$(CHICKEN_VERSION).tar.gz + +# NB// Must touch csi.scm since tar puts original date on it and deps are wrong then +chicken-$(CHICKEN_VERSION)/csi.scm : chicken-$(CHICKEN_VERSION).tar.gz + tar xfvz chicken-$(CHICKEN_VERSION).tar.gz + touch -c chicken-$(CHICKEN_VERSION)/csi.scm + +$(CHICKEN_INSTALL) : chicken-$(CHICKEN_VERSION)/csi.scm setup-chicken4x.sh + cd chicken-$(CHICKEN_VERSION);make PLATFORM=linux PREFIX=$(PREFIX) + cd chicken-$(CHICKEN_VERSION);make PLATFORM=linux PREFIX=$(PREFIX) install + +sqlite-autoconf-$(SQLITE3_VERSION).tar.gz : + wget http://www.sqlite.org/sqlite-autoconf-$(SQLITE3_VERSION).tar.gz + +sqlite-autoconf-$(SQLITE3_VERSION) : sqlite-autoconf-$(SQLITE3_VERSION).tar.gz + tar xfz sqlite-autoconf-$(SQLITE3_VERSION).tar.gz + +$(PREFIX)/bin/sqlite3 : sqlite-autoconf-$(SQLITE3_VERSION) + (cd sqlite-autoconf-$(SQLITE3_VERSION);./configure --prefix=$(PREFIX);make;make install) + +$(CHICKEN_EGG_DIR)/sqlite3.so : $(PREFIX)/bin/sqlite3 + CSC_OPTIONS="-I$(PREFIX)/include -L$(PREFIX)/lib" $(CHICKEN_INSTALL) $(PROX) sqlite3 + + +# Get and install my various utilities that haven't been eggified yet. +opensrc/margs/margs.scm opensrc/dbi/dbi.scm opensrc/qtree/qtree.scm : $(CHICKEN_INSTALL) $(CHICKEN_EGG_DIR)/sqlite3.so + mkdir -p opensrc + cd opensrc;if [ ! -e opensrc.fossil ]; then fossil clone http://www.kiatoa.com/fossils/opensrc opensrc.fossil; fi + cd opensrc;if [ -e dbi/dbi.scm ]; then fossil update; else fossil open opensrc.fossil; fi + +$(CHICKEN_EGG_DIR)/dbi.so : opensrc/dbi/dbi.scm + cd opensrc/dbi;chicken-install + +$(CHICKEN_EGG_DIR)/margs.so : opensrc/margs/margs.scm + cd opensrc/margs;chicken-install + +$(CHICKEN_EGG_DIR)/qtree.so : opensrc/qtree/qtree.scm + cd opensrc/qtree;chicken-install + +# $(CHICKEN_EGG_DIR)/dbi.so # Don't include as requires postgres +mattseggs : $(CHICKEN_EGG_DIR)/margs.so $(CHICKEN_EGG_DIR)/qtree.so + +# +# IUP +# + +ffcall.tar.gz : + wget http://www.kiatoa.com/matt/iup/ffcall.tar.gz + +ffcall/README : ffcall.tar.gz + tar xfvz ffcall.tar.gz + touch -c ffcall/README + +$(PREFIX)/lib/libavcall.a : ffcall/README + cd ffcall;./configure --prefix=$(PREFIX) --enable-shared && make && make install + +$(IUPFILES) : + wget http://www.kiatoa.com/matt/iup/$@ + cd $(PREFIX)/lib;tar xfvz $(BUILDHOME)/$@ + mv $(PREFIX)/lib/include/* $(PREFIX)/include + +$(PREFIX)/lib/libiup.so : $(IUPFILES) + touch -c $(PREFIX)/lib/libiup.so + +$(CHICKEN_EGG_DIR)/iup.so : $(PREFIX)/lib/libiup.so + $(CHICKEN_INSTALL) $(PROX) -D no-library-checks -feature disable-iup-web iup + +$(CHICKEN_EGG_DIR)/canvas-draw.so : $(PREFIX)/lib/libiup.so + $(CHICKEN_INSTALL) $(PROX) -D no-library-checks canvas-draw + +clean : + rm -rf chicken-4.8.0 eggflags ffcall sqlite-autoconf-$(SQLITE3_VERSION)