Check-in [e0c173490e]
Not logged in
Overview
SHA1 Hash:e0c173490e5bd7f5da726e411dc96a82a07d35e6
Date: 2011-10-08 21:27:59
User: matt
Comment:All (I hope) interdependencies captured and testing passes
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified Makefile from [d467c002c86fe2b9] to [119af6d51fea1efa].

9 GUISRCF = dashboard.scm dashboard-tests.scm 9 GUISRCF = dashboard.scm dashboard-tests.scm 10 10 11 OFILES = $(SRCFILES:%.scm=%.o) 11 OFILES = $(SRCFILES:%.scm=%.o) 12 GOFILES = $(GUISRCF:%.scm=%.o) 12 GOFILES = $(GUISRCF:%.scm=%.o) 13 13 14 HELPERS=$(addprefix $(PREFIX)/bin/,mt_laststep mt_runstep) 14 HELPERS=$(addprefix $(PREFIX)/bin/,mt_laststep mt_runstep) 15 15 16 all : megatest dashboard | 16 all : megatest dboard 17 17 18 megatest: $(OFILES) megatest.o 18 megatest: $(OFILES) megatest.o 19 csc $(OFILES) megatest.o -o megatest 19 csc $(OFILES) megatest.o -o megatest 20 20 21 dashboard: $(OFILES) $(GOFILES) | 21 dboard : $(OFILES) $(GOFILES) 22 csc $(OFILES) $(GOFILES) -o dashboard | 22 csc $(OFILES) $(GOFILES) -o dboard 23 23 > 24 # Special dependencies for the includes 24 db.o launch.o runs.o : db_records.scm | 25 db.o launch.o runs.o dashboard-tests.o dashboard.o megatest.o : db_records.scm 25 < > 26 runs.o dashboard.o dashboard-tests.o : run_records.scm 26 keys.o db.o runs.o launch.o : key_records.scm | 27 keys.o db.o runs.o launch.o megatest.o : key_records.scm 27 28 28 $(OFILES) $(GOFILES) : common_records.scm 29 $(OFILES) $(GOFILES) : common_records.scm 29 30 30 %.o : %.scm 31 %.o : %.scm 31 csc -c $< 32 csc -c $< 32 33 33 $(PREFIX)/bin/megatest : megatest 34 $(PREFIX)/bin/megatest : megatest ................................................................................................................................................................................ 36 cp megatest $(PREFIX)/bin/megatest 37 cp megatest $(PREFIX)/bin/megatest 37 38 38 $(HELPERS) : utils/mt_* 39 $(HELPERS) : utils/mt_* 39 cp $< $@ 40 cp $< $@ 40 chmod a+x $@ 41 chmod a+x $@ 41 42 42 # install dashboard as dboard so wrapper script can be called dashboard 43 # install dashboard as dboard so wrapper script can be called dashboard 43 $(PREFIX)/bin/dboard : dashboard $(FILES) | 44 $(PREFIX)/bin/dboard : dboard $(FILES) 44 cp dboard $(PREFIX)/bin/dboard 45 cp dboard $(PREFIX)/bin/dboard 45 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 46 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 46 chmod a+x $(PREFIX)/bin/dashboard 47 chmod a+x $(PREFIX)/bin/dashboard 47 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 48 utils/mk_dashboard_wrapper $(PREFIX) > $(PREFIX)/bin/dashboard 48 chmod a+x $(PREFIX)/bin/dashboard 49 chmod a+x $(PREFIX)/bin/dashboard 49 50 50 install : $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $( | 51 install : bin $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboar > 52 > 53 bin : > 54 mkdir $(PREFIX)/bin 51 55 52 test: tests/tests.scm 56 test: tests/tests.scm 53 cd tests;csi -I .. -b -n tests.scm 57 cd tests;csi -I .. -b -n tests.scm 54 58 > 59 clean : > 60 rm -f $(OFILES) $(GOFILES) megatest dboard dboard.o megatest.o

Modified dashboard-tests.scm from [8717c71756d995bf] to [5d114323130b08d1].

9 ;; PURPOSE. 9 ;; PURPOSE. 10 ;;====================================================================== 10 ;;====================================================================== 11 11 12 ;;====================================================================== 12 ;;====================================================================== 13 ;; Test info panel 13 ;; Test info panel 14 ;;====================================================================== 14 ;;====================================================================== 15 15 > 16 (use format) > 17 (require-library iup) > 18 (import (prefix iup iup:)) > 19 > 20 (use canvas-draw) > 21 > 22 (use sqlite3 srfi-1 posix regex regex-case srfi-69) > 23 (import (prefix sqlite3 sqlite3:)) > 24 16 (declare (unit dashboard-tests)) 25 (declare (unit dashboard-tests)) 17 (declare (uses common)) 26 (declare (uses common)) 18 (declare (uses db)) 27 (declare (uses db)) 19 (declare (uses dboard)) < 20 28 21 (include "common_records.scm") 29 (include "common_records.scm") > 30 (include "db_records.scm") > 31 (include "run_records.scm") 22 32 23 (define (test-info-panel testdat store-label widgets) 33 (define (test-info-panel testdat store-label widgets) 24 (iup:frame 34 (iup:frame 25 #:title "Test Info" ; #:expand "YES" 35 #:title "Test Info" ; #:expand "YES" 26 (iup:hbox ; #:expand "YES" 36 (iup:hbox ; #:expand "YES" 27 (apply iup:vbox ; #:expand "YES" 37 (apply iup:vbox ; #:expand "YES" 28 (append (map (lambda (val) 38 (append (map (lambda (val)

Modified dashboard.scm from [2309bc9461e0d2b1] to [d8bbd167b312fb2e].

23 (declare (uses keys)) 23 (declare (uses keys)) 24 (declare (uses items)) 24 (declare (uses items)) 25 (declare (uses db)) 25 (declare (uses db)) 26 (declare (uses configf)) 26 (declare (uses configf)) 27 (declare (uses process)) 27 (declare (uses process)) 28 (declare (uses launch)) 28 (declare (uses launch)) 29 (declare (uses runs)) 29 (declare (uses runs)) 30 (declare (uses dboard)) < 31 (declare (uses dashboard-tests)) 30 (declare (uses dashboard-tests)) 32 (declare (uses megatest-version)) 31 (declare (uses megatest-version)) 33 32 34 (include "common_records.scm") 33 (include "common_records.scm") > 34 (include "db_records.scm") > 35 (include "run_records.scm") 35 36 36 (define help (conc 37 (define help (conc 37 "Megatest Dashboard, documentation at http://www.kiatoa.com/fossils/megatest 38 "Megatest Dashboard, documentation at http://www.kiatoa.com/fossils/megatest 38 version " megatest-version " 39 version " megatest-version " 39 license GPL, Copyright (C) Matt Welland 2011 40 license GPL, Copyright (C) Matt Welland 2011 40 41 41 Usage: dashboard [options] 42 Usage: dashboard [options]

Modified db.scm from [861373d8a71e28e1] to [dd48063f4b914415].

9 ;; PURPOSE. 9 ;; PURPOSE. 10 ;;====================================================================== 10 ;;====================================================================== 11 11 12 ;;====================================================================== 12 ;;====================================================================== 13 ;; Database access 13 ;; Database access 14 ;;====================================================================== 14 ;;====================================================================== 15 15 16 (use sqlite3 srfi-1 posix regex regex-case srfi-69) | 16 (use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml) 17 (import (prefix sqlite3 sqlite3:)) 17 (import (prefix sqlite3 sqlite3:)) 18 18 19 (declare (unit db)) 19 (declare (unit db)) 20 (declare (uses common)) 20 (declare (uses common)) 21 (declare (uses keys)) 21 (declare (uses keys)) 22 22 23 (include "common_records.scm") 23 (include "common_records.scm")

Modified launch.scm from [4811d14f2de3d039] to [e2c0215978cb5bca].

9 ;; PURPOSE. 9 ;; PURPOSE. 10 10 11 ;;====================================================================== 11 ;;====================================================================== 12 ;; launch a task - this runs on the originating host, tests themselves 12 ;; launch a task - this runs on the originating host, tests themselves 13 ;; 13 ;; 14 ;;====================================================================== 14 ;;====================================================================== 15 15 16 (use regex regex-case base64) | 16 (use regex regex-case base64 sqlite3) 17 (import (prefix base64 base64:)) 17 (import (prefix base64 base64:)) > 18 (import (prefix sqlite3 sqlite3:)) 18 19 19 (declare (unit launch)) 20 (declare (unit launch)) 20 (declare (uses common)) 21 (declare (uses common)) 21 (declare (uses configf)) 22 (declare (uses configf)) 22 (declare (uses db)) 23 (declare (uses db)) 23 24 24 (include "common_records.scm") 25 (include "common_records.scm") ................................................................................................................................................................................ 158 (else 159 (else 159 (set! fullcmd (list remote-megatest "-execute" cmdparms)))) 160 (set! fullcmd (list remote-megatest "-execute" cmdparms)))) 160 (if (args:get-arg "-xterm")(set! fullcmd (append fullcmd (list "-xterm")))) 161 (if (args:get-arg "-xterm")(set! fullcmd (append fullcmd (list "-xterm")))) 161 (debug:print 1 "Launching megatest for test " test-name " in " work-area" .. 162 (debug:print 1 "Launching megatest for test " test-name " in " work-area" .. 162 (test-set-status! db run-id test-name "LAUNCHED" "n/a" itemdat #f #f) ;; (if 163 (test-set-status! db run-id test-name "LAUNCHED" "n/a" itemdat #f #f) ;; (if 163 ;; set 164 ;; set 164 ;; set pre-launch-env-vars before launching, keep the vars in prevvals and p 165 ;; set pre-launch-env-vars before launching, keep the vars in prevvals and p > 166 (debug:print 4 "fullcmd: " fullcmd) 165 (let* ((commonprevvals (alist->env-vars 167 (let* ((commonprevvals (alist->env-vars 166 (hash-table-ref/default *configdat* "env-override" ' 168 (hash-table-ref/default *configdat* "env-override" ' 167 (testprevvals (alist->env-vars 169 (testprevvals (alist->env-vars 168 (hash-table-ref/default test-conf "pre-launch-env-ov 170 (hash-table-ref/default test-conf "pre-launch-env-ov 169 (miscprevvals (alist->env-vars ;; consolidate this code with the co 171 (miscprevvals (alist->env-vars ;; consolidate this code with the co 170 (append (list (list "MT_TEST_NAME" test-name) 172 (append (list (list "MT_TEST_NAME" test-name) 171 (list "MT_ITEM_INFO" (conc itemdat)) 173 (list "MT_ITEM_INFO" (conc itemdat))

Modified megatest.scm from [4be41a6c7236fd52] to [4c96df28b87931cc].

6 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 6 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 7 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 7 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 8 ;; PURPOSE. 8 ;; PURPOSE. 9 9 10 ;; (include "common.scm") 10 ;; (include "common.scm") 11 ;; (include "megatest-version.scm") 11 ;; (include "megatest-version.scm") 12 12 > 13 (use sqlite3 srfi-1 posix regex regex-case srfi-69 base64) > 14 (import (prefix sqlite3 sqlite3:)) > 15 (import (prefix base64 base64:)) > 16 13 (declare (uses common)) 17 (declare (uses common)) 14 (declare (uses megatest-version)) 18 (declare (uses megatest-version)) 15 (declare (uses margs)) 19 (declare (uses margs)) 16 (declare (uses runs)) 20 (declare (uses runs)) 17 (declare (uses launch)) 21 (declare (uses launch)) 18 22 19 (include "common_records.scm") 23 (include "common_records.scm") > 24 (include "key_records.scm") > 25 (include "db_records.scm") 20 26 21 (define help (conc " 27 (define help (conc " 22 Megatest, documentation at http://www.kiatoa.com/fossils/megatest 28 Megatest, documentation at http://www.kiatoa.com/fossils/megatest 23 version " megatest-version " 29 version " megatest-version " 24 license GPL, Copyright Matt Welland 2006-2011 30 license GPL, Copyright Matt Welland 2006-2011 25 31 26 Usage: megatest [options] 32 Usage: megatest [options]

Modified runs.scm from [a70b456ddca8f2ed] to [3af94e9359278c9e].

6 ;; 6 ;; 7 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 7 ;; This program is distributed WITHOUT ANY WARRANTY; without even the 8 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 8 ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 9 ;; PURPOSE. 9 ;; PURPOSE. 10 10 11 ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') 11 ;; strftime('%m/%d/%Y %H:%M:%S','now','localtime') 12 12 13 (use sqlite3 srfi-1 posix regex regex-case srfi-69) | 13 (use sqlite3 srfi-1 posix regex regex-case srfi-69 dot-locking) 14 (import (prefix sqlite3 sqlite3:)) 14 (import (prefix sqlite3 sqlite3:)) 15 15 16 (declare (unit runs)) 16 (declare (unit runs)) 17 (declare (uses db)) 17 (declare (uses db)) 18 (declare (uses common)) 18 (declare (uses common)) 19 (declare (uses items)) 19 (declare (uses items)) 20 (declare (uses runconfig)) 20 (declare (uses runconfig)) 21 21 22 (include "common_records.scm") 22 (include "common_records.scm") 23 (include "key_records.scm") 23 (include "key_records.scm") 24 (include "db_records.scm") 24 (include "db_records.scm") > 25 (include "run_records.scm") 25 26 26 ;; register a test run with the db 27 ;; register a test run with the db 27 (define (register-run db keys) ;; test-name) 28 (define (register-run db keys) ;; test-name) 28 (let* ((keystr (keys->keystr keys)) 29 (let* ((keystr (keys->keystr keys)) 29 (comma (if (> (length keys) 0) "," "")) 30 (comma (if (> (length keys) 0) "," "")) 30 (andstr (if (> (length keys) 0) " AND " "")) 31 (andstr (if (> (length keys) 0) " AND " "")) 31 (valslots (keys->valslots keys)) ;; ?,?,? ... 32 (valslots (keys->valslots keys)) ;; ?,?,? ... ................................................................................................................................................................................ 382 ;; (sqlite3:for-each-row 383 ;; (sqlite3:for-each-row 383 ;; (lambda (id run-id test-name state status) 384 ;; (lambda (id run-id test-name state status) 384 ;; (set! res (vector id run-id test-name state status item-path))) 385 ;; (set! res (vector id run-id test-name state status item-path))) 385 ;; db "SELECT id,run_id,testname,state,status FROM tests WHERE run_id=? AND 386 ;; db "SELECT id,run_id,testname,state,status FROM tests WHERE run_id=? AND 386 ;; run-id test-name item-path) 387 ;; run-id test-name item-path) 387 ;; res)) 388 ;; res)) 388 389 389 (define-inline (test:get-id vec) (vector-ref vec 0)) < 390 (define-inline (test:get-run_id vec) (vector-ref vec 1)) < 391 (define-inline (test:get-test-name vec)(vector-ref vec 2)) < 392 (define-inline (test:get-state vec) (vector-ref vec 3)) < 393 (define-inline (test:get-status vec) (vector-ref vec 4)) < 394 (define-inline (test:get-item-path vec)(vector-ref vec 5)) < 395 < 396 (define (runs:test-get-full-path test) 390 (define (runs:test-get-full-path test) 397 (let* ((testname (db:test-get-testname test)) 391 (let* ((testname (db:test-get-testname test)) 398 (itempath (db:test-get-item-path test))) 392 (itempath (db:test-get-item-path test))) 399 (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) 393 (conc testname (if (equal? itempath "") "" (conc "(" itempath ")"))))) 400 394 401 (define-inline (test:test-get-fullname test) < 402 (conc (db:test-get-testname test) < 403 (if (equal? (db:test-get-item-path test) "") < 404 "" < 405 (conc "(" (db:test-get-item-path test) ")")))) < 406 < 407 (define (check-valid-items class item) 395 (define (check-valid-items class item) 408 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 396 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 409 (if s (string-split s) #f)))) 397 (if s (string-split s) #f)))) 410 (if valid-values 398 (if valid-values 411 (if (member item valid-values) 399 (if (member item valid-values) 412 item #f) 400 item #f) 413 item))) 401 item)))

Modified tests/Makefile from [096c550f57be51ba] to [6a98d96bd9d1dbb9].

8 8 9 test : 9 test : 10 csi -b -I .. ../megatest.scm -- -runall :sysname ubuntu :fsname afs :dat 10 csi -b -I .. ../megatest.scm -- -runall :sysname ubuntu :fsname afs :dat 11 cd ../;make test 11 cd ../;make test 12 make runall 12 make runall 13 13 14 dashboard : 14 dashboard : 15 cd ../;make dashboard | 15 cd ../;make dboard 16 ../dashboard & | 16 ../dboard & 17 17 18 remove : 18 remove : 19 (cd ../;make);../megatest -remove-runs :runname $(RUN) -testpatt % -ite 19 (cd ../;make);../megatest -remove-runs :runname $(RUN) -testpatt % -ite 20 20 21 runforever : 21 runforever : 22 while(ls); do runname=`date +%F-%R:%S`;/home/matt/data/megatest/megatest 22 while(ls); do runname=`date +%F-%R:%S`;/home/matt/data/megatest/megatest

Modified utils/mk_dashboard_wrapper from [37e41509e7eac48b] to [c254108cd873b537].

1 #!/bin/bash 1 #!/bin/bash 2 2 3 prefix=$1 3 prefix=$1 4 echo "#!/bin/bash" 4 echo "#!/bin/bash" 5 if [ $LD_LIBRARY_PATH != "" ];then | 5 if [ "$LD_LIBRARY_PATH" != "" ];then 6 echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" 6 echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" 7 fi 7 fi 8 8 9 dboard=`realpath $prefix/bin/dboard` 9 dboard=`realpath $prefix/bin/dboard` 10 10 11 echo "$dboard \$*" 11 echo "$dboard \$*"