Megatest

Diff
Login

Differences From Artifact [d7e905f635]:

To Artifact [bc96cda5c5]:


38
39
40
41
42
43
44
45
46


47
48
49
50


51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
38
39
40
41
42
43
44


45
46
47
48


49
50
51
52
53
54
55
56


57
58
59
60
61
62
63
64







-
-
+
+


-
-
+
+






-
-
+







Usage: megatest [options]
  -h                      : this help

Launching and managing runs
  -runall                 : run all tests that are not state COMPLETED and status PASS, 
                            CHECK or KILLED
  -runtests tst1,tst2 ... : run tests
  -remove-runs            : remove the data for a run, requires :runname, -testpatt and
                            -itempatt be set. Optionally use :state and :status
  -remove-runs            : remove the data for a run, requires :runname and -testpatt
                            Optionally use :state and :status
  -set-state-status X,Y   : set state to X and status to Y, requires controls per -remove-runs
  -rerun FAIL,WARN...     : force re-run for tests with specificed status(s)
  -rollup                 : fill run (set by :runname)  with latest test(s) from
                            prior runs with same keys
  -rollup                 : (currently disabled) fill run (set by :runname)  with latest test(s)
                            from prior runs with same keys
  -lock                   : lock run specified by target and runname
  -unlock                 : unlock run specified by target and runname

Selectors (e.g. use for -runtests, -remove-runs, -set-state-status, -list-runs etc.)
  -target key1/key2/...   : run for key1, key2, etc.
  -reqtarg key1/key2/...  : run for key1, key2, etc. but key1/key2 must be in runconfig
  -testpatt patt          : % is wildcard
  -itempatt patt          : % is wildcard
  -testpatt patt1/patt2,patt3/...  : % is wildcard
  :runname                : required, name for this particular test run
  :state                  : Applies to runs, tests or steps depending on context
  :status                 : Applies to runs, tests or steps depending on context

Test helpers (for use inside tests)
  -step stepname
  -test-status            : set the state and status of a test (use :state and :status)
413
414
415
416
417
418
419



420
421
422
423
424
425
426
427








428
429
430
431
432
433
434
412
413
414
415
416
417
418
419
420
421








422
423
424
425
426
427
428
429
430
431
432
433
434
435
436







+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+







		     args:arg-hash))))

;;======================================================================
;; Rollup into a run
;;======================================================================

(if (args:get-arg "-rollup")
    (begin
      (debug:print 0 "ERROR: Rollup is currently not working. If you need it please submit a ticket at http://www.kiatoa.com/fossils/megatest")
      (exit 4)))
    (general-run-call 
     "-rollup" 
     "rollup tests" 
     (lambda (target runname keys keynames keyvallst)
       (runs:rollup-run keys
			(keys->alist keys "na")
			(args:get-arg ":runname") 
			user))))
;;     (general-run-call 
;;      "-rollup" 
;;      "rollup tests" 
;;      (lambda (target runname keys keynames keyvallst)
;;        (runs:rollup-run keys
;; 			(keys->alist keys "na")
;; 			(args:get-arg ":runname") 
;; 			user))))

;;======================================================================
;; Lock or unlock a run
;;======================================================================

(if (or (args:get-arg "-lock")(args:get-arg "-unlock"))
    (general-run-call