Megatest

Check-in [96bdf8577f]
Login
Overview
Comment:Base scenario working. Takes aprox 60-70 seconds to run.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.64-minimt
Files: files | file ages | folders
SHA1: 96bdf8577f6b08fa48f5c3e6c4b2b771bfaedb53
User & Date: matt on 2017-06-25 16:07:10
Other Links: branch diff | manifest | tags
Context
2017-06-25
16:20
Added direct.scm for the direct to db connection test check-in: 987ac55bdd user: matt tags: v1.64-minimt
16:07
Base scenario working. Takes aprox 60-70 seconds to run. check-in: 96bdf8577f user: matt tags: v1.64-minimt
15:26
Added minimt, a minimal faux megatest to use in testing out server options, db access tricks and other ideas. check-in: 9cd3c289b8 user: matt tags: v1.64-minimt
Changes

Modified minimt/minimt.scm from [ab3ea4073c] to [8f30c5ea44].

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    test-id))

;; RUN A RUN
(define (run-run dbconn target run-name num-tests)
  (create-run dbconn target run-name)
  (let ((run-id (get-run-id dbconn target run-name)))
    (let loop ((test-num 0))
      (system (conc "nbfake minimt runtest " run-id " test-" test-num))
      (if (< test-num num-tests)
	  (loop (+ test-num 1))))))

;; Do what is asked
(let ((args (cdr (argv))))
  (if (< (length args) 1)
      (print







|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    test-id))

;; RUN A RUN
(define (run-run dbconn target run-name num-tests)
  (create-run dbconn target run-name)
  (let ((run-id (get-run-id dbconn target run-name)))
    (let loop ((test-num 0))
      (system (conc "NBFAKE_LOG=test-" test-num "-run-id-" run-id ".log NBFAKE_HOST=" *remotehost* " nbfake minimt runtest " run-id " test-" test-num))
      (if (< test-num num-tests)
	  (loop (+ test-num 1))))))

;; Do what is asked
(let ((args (cdr (argv))))
  (if (< (length args) 1)
      (print
54
55
56
57
58
59
60
61











62
63
64
	   (let ((run-id    (string->number (cadr args)))
		 (test-name (caddr args)))
	     (print "Launching test " test-name " for run-id " run-id)
	     (run-test dbconn run-id test-name)))
	  ((runrun)
	   (let ((target   (cadr args))
		 (run-name (caddr args)))
	     (run-run dbconn target run-name *numtests*)))











	  (else
	   (print "Command: " cmd " not recognised. Run without params to see help.")))
	(close-database (dbconn-dat-dbh dbconn)))))







|
>
>
>
>
>
>
>
>
>
>
>



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
	   (let ((run-id    (string->number (cadr args)))
		 (test-name (caddr args)))
	     (print "Launching test " test-name " for run-id " run-id)
	     (run-test dbconn run-id test-name)))
	  ((runrun)
	   (let ((target   (cadr args))
		 (run-name (caddr args)))
	     (run-run dbconn target run-name *numtests*)
	     (print "Use: sqlite3 runtest/mt.db 'select max(end_time)-min(start_time) from tests;' to see the total run time")
	     ))
	  ((runall)
	   (for-each
	    (lambda (target)
	      (let loop ((run-num 0))
		(thread-sleep! *rundelay*)
		(system (conc "NBFAKE_LOG=run-" target "-" run-num ".log nbfake minimt runrun " target " run-" run-num))
		(if (< run-num *numruns*)
		    (loop (+ run-num 1)))))
	    *targets*))
	  (else
	   (print "Command: " cmd " not recognised. Run without params to see help.")))
	(close-database (dbconn-dat-dbh dbconn)))))

Modified minimt/setup.scm from [92ad00415b] to [222451ff8b].

1
2
3
4
5

6
7
8
9
10
11
12
(define *remotehost* "orion")
(define *homehost*   "zeus")
(define *homepath*   "/nfs/phoebe/disk1/home/mfs_matt/data/megatest/minimt/runtest")
(define *numtests*   50)
(define *numruns*    50)

(define *testdelay*  0)
(define *rundelay*   0)
(define *launchdelay* 0)
(define *stepdelay*   0)

(use trace)
(trace-call-sites #t)




|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
(define *remotehost* "orion")
(define *homehost*   "zeus")
(define *homepath*   "/nfs/phoebe/disk1/home/mfs_matt/data/megatest/minimt/runtest")
(define *numtests*   50)
(define *numruns*    5)
(define *targets*    '("targ1"))
(define *testdelay*  0)
(define *rundelay*   0)
(define *launchdelay* 0)
(define *stepdelay*   0)

(use trace)
(trace-call-sites #t)