Megatest

Check-in [159e189c05]
Login
Overview
Comment:Added exception handling to open of test specific db.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | development
Files: files | file ages | folders
SHA1: 159e189c05d768782428c7b1090e0470e2a37263
User & Date: mrwellan on 2013-03-28 13:57:06
Other Links: branch diff | manifest | tags
Context
2013-03-28
15:32
Updated ignores to account for mkdeploy task area check-in: 44ed980989 user: mrwellan tags: development
13:57
Added exception handling to open of test specific db. check-in: 159e189c05 user: mrwellan tags: development
10:19
Protected most create directories, remove directories and links with exception handling and (hopefully) the appropriate recovery action. In many cases I exit as usually this is due to permissions. In some cases I continue on after putting an error on stderr. check-in: f95edbc998 user: mrwellan tags: development
Changes

Modified dashboard.scm from [d676ee3f3f] to [7c18e62e8f].

57
58
59
60
61
62
63

64
65
66
67
68
69
70
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71







+







		 (list  "-rows"
			"-run"
			"-test"
			"-debug"
			"-host" 
			) 
		 (list  "-h"
			"-use-server"
			"-guimonitor"
			"-main"
			"-v"
			"-q"
		       )
		 args:arg-hash
		 0))
81
82
83
84
85
86
87


88

89
90
91
92
93
94
95
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98







+
+
-
+








(define *db* #f) ;; (open-db))

(if (args:get-arg "-host")
    (begin
      (set! *runremote* (string-split (args:get-arg "-host" ":")))
      (client:launch))
    (if (not (args:get-arg "-use-server"))
	(set! *transport-type* 'fs) ;; force fs access
    (client:launch))
	(client:launch)))

;; HACK ALERT: this is a hack, please fix.
(define *read-only* (not (file-read-access? (conc *toppath* "/megatest.db"))))
;; (client:setup *db*)

(define toplevel #f)
(define dlg      #f)

Modified db.scm from [a79dc29e57] to [0623ab4501].

258
259
260
261
262
263
264










265
266
267
268
269
270
271
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281







+
+
+
+
+
+
+
+
+
+







	(if (not dbexists)
	    (begin
	      (sqlite3:execute db "PRAGMA synchronous = FULL;")
	      (debug:print-info 11 "Initialized test database " dbpath)
	      (db:testdb-initialize db)))
	;; (sqlite3:execute db "PRAGMA synchronous = 0;")
	(debug:print-info 11 "open-test-db END (sucessful)" testpath)
	;; now let's test that everything is correct
	(handle-exceptions
	 exn
	 (begin
	   (debug:print 0 "ERROR: problem accessing test db " testpath ", you probably should clean and re-run this test"
			((condition-property-accessor 'exn 'message) exn))
	   #f)
	 ;; Is there a cheaper single line operation that will check for existance of a table
	 ;; and raise an exception ?
	 (sqlite3:execute db "SELECT id FROM test_data LIMIT 1;"))
	db)
      (begin
	(debug:print-info 11 "open-test-db END (unsucessful)" testpath)
	#f)))

;; find and open the testdat.db file for an existing test
(define (db:open-test-db-by-test-id db test-id)

Modified megatest-version.scm from [b8f493a8cd] to [af9292025d].

1
2
3
4
5
6

7
1
2
3
4
5

6
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.54)
(define megatest-version 1.5402)