Megatest

Diff
Login

Differences From Artifact [f0990d6344]:

To Artifact [5f4bb259a2]:


41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

;; test:match->sqlqry
(test #f "(testname GLOB 'a' AND item_path GLOB 'b') OR (testname LIKE 'a%' AND item_path LIKE '%') OR (testname GLOB '' AND item_path LIKE 'b%')"
      (tests:match->sqlqry "a/b,a%,/b%"))
(test #f "(testname GLOB 'a' AND item_path GLOB 'b') OR (testname LIKE 'a%' AND item_path LIKE '%') OR (testname LIKE '%' AND item_path LIKE 'b%')"
      (tests:match->sqlqry "a/b,a%,%/b%"))

(let ((cmd             "dunno")
      (run-id          1)
      (rid             1)
      (rawcmd          "dunno")
      (params          '())
      (duration        100)
      (connection-info (vector #f #f #f))
      (dat              "abc")







|







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

;; test:match->sqlqry
(test #f "(testname GLOB 'a' AND item_path GLOB 'b') OR (testname LIKE 'a%' AND item_path LIKE '%') OR (testname GLOB '' AND item_path LIKE 'b%')"
      (tests:match->sqlqry "a/b,a%,/b%"))
(test #f "(testname GLOB 'a' AND item_path GLOB 'b') OR (testname LIKE 'a%' AND item_path LIKE '%') OR (testname LIKE '%' AND item_path LIKE 'b%')"
      (tests:match->sqlqry "a/b,a%,%/b%"))

(let* ((cmd             "dunno")
      (run-id          1)
      (rid             1)
      (rawcmd          "dunno")
      (params          '())
      (duration        100)
      (connection-info (vector #f #f #f))
      (dat              "abc")
88
89
90
91
92
93
94

95

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
      (statuspatt       "PA%")
      (keynames         '("SYSTEM" "RELEASE")) ;; "sysname" "fsname" "datapath"))
      (waitons          '("a" "b" "c"))
      (ref-item-path    "/d/e/f")
      (jobgroup         "anl")
      (runpatt          "run%")
      (keyvals          '(("SYSTEM" "a")("RELEASE" "b")))

      (user             "freddy")

      (count            100)
      (keypatts         '(("SYSTEM" "%a")("RELEASE" "%b")))
      (lock             #f)
      (unlock           #t)
      (run-status       "n/a")
      (runnamepatt      "b%")
      (targpatt         "%a/%b/c%")
      (fields           "id,runname")
      (ovr-deadtime     100)
      (teststep-name    "first")
      (state-in         "COMPLETED")
      (status-in        "FAIL")
      (comment          "This is a comment eh!")
      (logfile          "/tmp/alogfile.log")
      (categorypatt     "stats")
      (work-area        "/tmp")
      (fld              "voltage")
      (val              5)
      (csvdata          "id,meas,val\n1,voltage,2")
      (action-patt      "%")
      (param-key        "dunno")
      (testname         "atest")
      (dneeded          10000)
      (bdisk-id         1)







>

>






|









|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
      (statuspatt       "PA%")
      (keynames         '("SYSTEM" "RELEASE")) ;; "sysname" "fsname" "datapath"))
      (waitons          '("a" "b" "c"))
      (ref-item-path    "/d/e/f")
      (jobgroup         "anl")
      (runpatt          "run%")
      (keyvals          '(("SYSTEM" "a")("RELEASE" "b")))
      (keys             (map car keyvals))
      (user             "freddy")
      (owner            "tommy")
      (count            100)
      (keypatts         '(("SYSTEM" "%a")("RELEASE" "%b")))
      (lock             #f)
      (unlock           #t)
      (run-status       "n/a")
      (runnamepatt      "b%")
      (targpatt         "%a/%b")
      (fields           "id,runname")
      (ovr-deadtime     100)
      (teststep-name    "first")
      (state-in         "COMPLETED")
      (status-in        "FAIL")
      (comment          "This is a comment eh!")
      (logfile          "/tmp/alogfile.log")
      (categorypatt     "stats")
      (work-area        "/tmp")
      (fld              "owner")
      (val              5)
      (csvdata          "id,meas,val\n1,voltage,2")
      (action-patt      "%")
      (param-key        "dunno")
      (testname         "atest")
      (dneeded          10000)
      (bdisk-id         1)
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

198
199
200
201

202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
  (test #f 1  (rmt:register-run keyvals runname state status user))
  (test #f "myfirstrun" (rmt:get-run-name-from-id run-id))
  (test #f #t (begin (rmt:delete-run run-id) #t))
  (test #f #t (begin (rmt:delete-old-deleted-test-records) #t))
  (test #f #t (vector? (rmt:get-runs runpatt count offset keypatts)))
  (test #f '() (rmt:get-all-run-ids))
  (test #f '() (rmt:get-prev-run-ids run-id))
;; (test #f #f (rmt:lock/unlock-run run-id lock unlock user))
;; (test #f #f (rmt:get-run-status run-id))
;; (test #f #f (rmt:set-run-status run-id run-status msg: msg))
;; (test #f #f (rmt:update-run-event_time run-id))
;; (test #f #f (rmt:get-runs-by-patt  keys runnamepatt targpatt offset limit fields)) ;; fields of #f uses default)
;; (test #f #f (rmt:find-and-mark-incomplete run-id ovr-deadtime))
;; (test #f #f (rmt:find-and-mark-incomplete-all-runs ovr-deadtime: ovr-deadtime))
;; (test #f #f (rmt:get-previous-test-run-record run-id test-name item-path))
;; (test #f #f (rmt:teststep-set-status! run-id test-id teststep-name state-in status-in comment logfile))
;; (test #f #f (rmt:get-steps-for-test run-id test-id))
;; (test #f #f (rmt:read-test-data run-id test-id categorypatt work-area: work-area))
;; (test #f #f (rmt:testmeta-add-record testname))
;; (test #f #f (rmt:testmeta-get-record testname))
;; (test #f #f (rmt:testmeta-update-field test-name fld val))
;; (test #f #f (rmt:test-data-rollup run-id test-id status))

;; (test #f #f (rmt:csv->test-data run-id test-id csvdata))
;; (test #f #f (rmt:tasks-find-task-queue-records target run-name test-patt state-patt action-patt))
;; (test #f #f (rmt:tasks-add action owner target runname testpatt params))
;; (test #f #f (rmt:tasks-set-state-given-param-key param-key new-state))

;; 
;; (test #f #f (rmt:archive-get-allocations  testname itempath dneeded))
;; (test #f #f (rmt:archive-register-block-name bdisk-id archive-path))
;; (test #f #f (rmt:archive-allocate-testsuite/area-to-block block-id testsuite-name areakey))
;; (test #f #f (rmt:archive-register-disk bdisk-name bdisk-path df))
;; (test #f #f (rmt:test-set-archive-block-id run-id test-id archive-block-id))
  ;; (test #f #f (rmt:test-get-archive-block-info archive-block-id))
  
  ;; Defer these a little while ...
  ;;
  ;; (test #f #f (rmt:test-set-state-status-by-id run-id test-id newstate newstatus newcomment))
  ;; (test #f #f (rmt:synchash-get run-id proc synckey keynum params))
  ;; (test #f #f (rmt:send-receive cmd rid params #!key (attemptnum 1)) ;; start attemptnum at 1 so the modulo below works as expected)
  ;; (test #f #f (rmt:open-qry-close-locally cmd run-id params #!key (remretries 5)))
  ;; (test #f #f (apply rmt:general-call stmtname run-id params))
  ;; (test #f #f (rmt:sync-inmem->db run-id))
  ;; (test #f #f (rmt:sdb-qry qry val run-id))








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










<







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

216
217
218
219
220
221
222
  (test #f 1  (rmt:register-run keyvals runname state status user))
  (test #f "myfirstrun" (rmt:get-run-name-from-id run-id))
  (test #f #t (begin (rmt:delete-run run-id) #t))
  (test #f #t (begin (rmt:delete-old-deleted-test-records) #t))
  (test #f #t (vector? (rmt:get-runs runpatt count offset keypatts)))
  (test #f '() (rmt:get-all-run-ids))
  (test #f '() (rmt:get-prev-run-ids run-id))
  (test #f #t (begin (rmt:lock/unlock-run run-id lock unlock user) #t))
  (test #f #t (begin (rmt:set-run-status run-id "NONPASS" msg: msg) #t)) ;; run-status
  (test #f "NONPASS" (rmt:get-run-status run-id))
  (test #f #t (begin (rmt:update-run-event_time run-id) #t))
  (test #f (vector '("SYSTEM" "RELEASE" "id") '()) (rmt:get-runs-by-patt  keys runnamepatt targpatt offset limit '("id"))) ;; fields of #f uses default)
  (test #f #t (begin (rmt:find-and-mark-incomplete run-id ovr-deadtime) #t))
  (test #f #t (begin (rmt:find-and-mark-incomplete-all-runs ovr-deadtime: ovr-deadtime) #t))
  (test #f #f (rmt:get-previous-test-run-record run-id test-name item-path))
  (test #f #t (begin (rmt:teststep-set-status! run-id test-id teststep-name state-in status-in comment logfile) #t))
  (test #f #t (vector? (car (rmt:get-steps-for-test run-id test-id))))
  (test #f '() (rmt:read-test-data run-id test-id categorypatt work-area: work-area))
  (test #f #t (begin (rmt:testmeta-add-record testname) #t))
  (test #f (vector 1 "atest" "" "" "" "" "" "" "" "" "default") (rmt:testmeta-get-record testname))
  (test #f #t (begin (rmt:testmeta-update-field test-name fld val) #t))
  (test #f #t (rmt:test-data-rollup run-id test-id status))
  ;; disabled as the function is unfinished and unused
  ;; (test #f #f (rmt:csv->test-data run-id test-id csvdata))
  (test #f '() (rmt:tasks-find-task-queue-records target runname testpatt statepatt action-patt))
  (test #f #t (begin (rmt:tasks-add "action" owner target runname testpatt "params") #t))
  (test #f #t (begin (rmt:tasks-set-state-given-param-key param-key newstate) #t))
  (test #f #t (begin (rmt:test-set-state-status-by-id run-id test-id newstate newstatus newcomment) #t))
;; 
;; (test #f #f (rmt:archive-get-allocations  testname itempath dneeded))
;; (test #f #f (rmt:archive-register-block-name bdisk-id archive-path))
;; (test #f #f (rmt:archive-allocate-testsuite/area-to-block block-id testsuite-name areakey))
;; (test #f #f (rmt:archive-register-disk bdisk-name bdisk-path df))
;; (test #f #f (rmt:test-set-archive-block-id run-id test-id archive-block-id))
  ;; (test #f #f (rmt:test-get-archive-block-info archive-block-id))
  
  ;; Defer these a little while ...
  ;;

  ;; (test #f #f (rmt:synchash-get run-id proc synckey keynum params))
  ;; (test #f #f (rmt:send-receive cmd rid params #!key (attemptnum 1)) ;; start attemptnum at 1 so the modulo below works as expected)
  ;; (test #f #f (rmt:open-qry-close-locally cmd run-id params #!key (remretries 5)))
  ;; (test #f #f (apply rmt:general-call stmtname run-id params))
  ;; (test #f #f (rmt:sync-inmem->db run-id))
  ;; (test #f #f (rmt:sdb-qry qry val run-id))