Megatest

Check-in [4f995c77e3]
Login
Overview
Comment:Support for using WAL mode in when in /tmp
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.62
Files: files | file ages | folders
SHA1: 4f995c77e309ab6c6e4ce6f552a5a3b3e95c612d
User & Date: matt on 2016-11-01 23:24:20
Other Links: branch diff | manifest | tags
Context
2016-11-02
17:55
Fixed minor issue in tests/fullrun for running in /tmp check-in: bddc8a7016 user: mrwellan tags: v1.62
2016-11-01
23:24
Support for using WAL mode in when in /tmp check-in: 4f995c77e3 user: matt tags: v1.62
21:57
Bumped version check-in: 6f592c6a40 user: matt tags: v1.62, v1.6207
Changes

Modified common.scm from [87c3dc36b9] to [16df51f864].

368
369
370
371
372
373
374

375
376
377
378
379
380
381
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382







+








;;======================================================================
;; E X I T   H A N D L I N G
;;======================================================================

(define (common:legacy-sync-recommended)
  (or (args:get-arg "-runtests")
      (args:get-arg "-run")
      (args:get-arg "-server")
      ;; (args:get-arg "-set-run-status")
      (args:get-arg "-remove-runs")
      ;; (args:get-arg "-get-run-status")
      ))

(define (common:legacy-sync-required)

Modified db.scm from [29d75e1de6] to [98d2f3044a].

213
214
215
216
217
218
219
220






221
222
223
224
225
226
227
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232







-
+
+
+
+
+
+







			   (file-write-access? fname)
			   dir-writable )))
    (if file-write ;; dir-writable
	(let (;; (lock    (obtain-dot-lock fname 1 5 10))
	      (db      (sqlite3:open-database fname)))
	  (sqlite3:set-busy-handler! db (make-busy-timeout 136000))
	  (db:set-sync db) ;; (sqlite3:execute db "PRAGMA synchronous = 0;")
	  (if (not file-exists)(initproc db))
	  (if (not file-exists)
	      (begin
		(if (string-match "^/tmp/.*" fname) ;; this is a file in /tmp
		    (sqlite3:execute db "PRAGMA journal_mode=WAL;")
		    (print "Creating " fname " in NON-WAL mode."))
		(initproc db)))
	  ;; (release-dot-lock fname)
	  db)
	(begin
	  (debug:print 2 *default-log-port* "WARNING: opening db in non-writable dir " fname)
	  (sqlite3:open-database fname))))) ;; )

;; This routine creates the db. It is only called if the db is not already opened

Modified tests/fullrun/megatest.config from [7f75c02259] to [d8f48acca7].

30
31
32
33
34
35
36
37

38
39
40
41
42
43
44
30
31
32
33
34
35
36

37
38
39
40
41
42
43
44







-
+








# turn off faststart, put monitor.db in MT_RUN_AREA_HOME/db
# and set the dbdir to /var/tmp/$USER/mt_db to enable keeping
# the raw db in /var/tmp/$USER
#
faststart  no
monitordir #{getenv MT_RUN_AREA_HOME}/db
dbdir      /tmp/#{getenv USER}/#{getenv MT_TESTSUITE_NAME}/db
dbdir      #{scheme (create-directory "/tmp/#{getenv USER}/#{getenv MT_TESTSUITE_NAME}/db")}

# sync more aggressively to megatest-db
megatest-db yes

# Set launchwait to no to use the more agressive code that does not wait for the launch to complete before proceeding
# this may save a few milliseconds on launching tests
# launchwait no