Overview
Context
Changes
Modified megatest.scm
from [b0572d4f5a]
to [1c46bfdb07].
︙ | | |
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
|
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
|
-
+
|
(if (args:get-arg "-repl")
(let* ((toppath (setup-for-run))
(db (if toppath (open-db) #f)))
(if db
(begin
(set! *db* db)
(if (not (args:get-arg "-server"))
(server:client-setup db))
(server:client-setup))
(import readline)
(import apropos)
(gnu-history-install-file-manager
(string-append
(or (get-environment-variable "HOME") ".") "/.megatest_history"))
(current-input-port (make-gnu-readline-port "megatest> "))
(repl)))
|
︙ | | |
Modified tests/tests.scm
from [403df89532]
to [ca5a9de19f].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-
+
+
-
+
|
(and (file-exists? "nada.sh")
(file-exists? "nada.csh"))))
(test "get all legal tests" (list "test1" "test2") (sort (get-all-legal-tests) string<=?))
(test "register-test, test info" "NOT_STARTED"
(begin
(tests:register-test *db* 1 "nada" "")
(db:tests-register-test *db* 1 "nada" "")
(vector-ref (db:get-test-info *db* 1 "nada" "") 3)))
(test #f "NOT_STARTED"
(begin
(open-run-close tests:register-test #f 1 "nada" "")
(open-run-close db:tests-register-test #f 1 "nada" "")
(vector-ref (open-run-close db:get-test-info #f 1 "nada" "") 3)))
(test "get-keys" "SYSTEM" (vector-ref (car (db:get-keys *db*)) 0));; (key:get-fieldname (car (sort (db-get-keys *db*)(lambda (a b)(string>=? (vector-ref a 0)(vector-ref b 0)))))))
(define remargs (args:get-args
'("bar" "foo" ":runname" "bob" ":sysname" "ubuntu" ":fsname" "nfs" ":datapath" "blah/foo" "nada")
(list ":runname" ":state" ":status")
|
︙ | | |
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-
+
-
+
-
+
-
-
+
+
+
+
+
|
(sqlite3#finalize! *tdb*)
;; (test "Remove the rollup run" #t (begin (remove-runs) #t))
(test "Run a test" #t (general-run-call
"-runtests"
"run a test"
(lambda (db target runname keys keynames keyvallst)
(lambda (target runname keys keynames keyvallst)
(let ((test-patts "runfirst"))
(runs:run-tests db target runname test-patts user (make-hash-table))))))
(runs:run-tests target runname test-patts user (make-hash-table))))))
(change-directory test-work-dir)
(test "Add a step" #t
(begin
(teststep-set-status! db 1 "runfirst" "firststep" "start" 0 '() "This is a comment")
(db:teststep-set-status! db 1 "runfirst" "firststep" "start" 0 '() "This is a comment")
(sleep 2)
(teststep-set-status! db 1 "runfirst" "firststep" "end" "pass" '() "This is a different comment")
(set! test-id (db:test-get-id (car (db-get-tests-for-run db 1 "runfirst" ""))))
(db:teststep-set-status! db 1 "runfirst" "firststep" "end" "pass" '() "This is a different comment")
(set! test-id (vector-ref (car (let ((tests (open-run-close db:get-tests-for-run #f 1 "runfirst" "" '() '())))
(print "tests: " tests)
tests))
0))
(number? test-id)))
(test "Get nice table for steps" "2.0s"
(begin
(vector-ref (hash-table-ref (db:get-steps-table db test-id) "firststep") 4)))
(hash-table-set! args:arg-hash ":runname" "rollup")
|
︙ | | |