Megatest

Diff
Login

Differences From Artifact [3218809c9e]:

To Artifact [1ec4b37821]:


39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
  :state                  : required if updating step state; e.g. start, end, completed
  :status                 : required if updating step status; e.g. pass, fail, n/a

Values and record errors and warnings
  -set-values             : update or set values in the megatest db 
  :value                  : value measured
  :expected_value         : value expected
  :tol                    : tolerance |value-expect| <= tol

  :first_err              : record an error message
  :first_warn             : record a warning message

Queries
  -list-runs patt         : list runs matching pattern \"patt\", % is the wildcard
  -testpatt patt          : in list-runs show only these tests, % is the wildcard
  -itempatt patt          : in list-runs show only tests with items that match patt







|
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  :state                  : required if updating step state; e.g. start, end, completed
  :status                 : required if updating step status; e.g. pass, fail, n/a

Values and record errors and warnings
  -set-values             : update or set values in the megatest db 
  :value                  : value measured
  :expected_value         : value expected
  :tol                    : |value-expect| <= tol
  :units                  : name of the units for value, expected_value and tol
  :first_err              : record an error message
  :first_warn             : record a warning message

Queries
  -list-runs patt         : list runs matching pattern \"patt\", % is the wildcard
  -testpatt patt          : in list-runs show only these tests, % is the wildcard
  -itempatt patt          : in list-runs show only tests with items that match patt
107
108
109
110
111
112
113

114
115
116
117
118
119
120
			"-to"
			;; values and messages
			":first_err"
			":first_warn"
			":value"
			":expected_value"
			":tol"

			;; misc
			"-debug" ;; for *verbosity* > 2
			) 
		 (list  "-h"
		        "-force"
		        "-xterm"
		        "-showkeys"







>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
			"-to"
			;; values and messages
			":first_err"
			":first_warn"
			":value"
			":expected_value"
			":tol"
			":units"
			;; misc
			"-debug" ;; for *verbosity* > 2
			) 
		 (list  "-h"
		        "-force"
		        "-xterm"
		        "-showkeys"
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
				(else status)))
		    ;; transfer relevant keys into a hash to be passed to test-set-status!
		    ;; could use an assoc list I guess. 
		    (otherdata (let ((res (make-hash-table)))
				 (for-each (lambda (key)
					     (if (args:get-arg key)
						 (hash-table-set! res key (args:get-arg key))))
					   (list ":value" ":tol" ":expected_value" ":first_err" ":first_warn"))
				 res)))
		(if (and (args:get-arg "-test-status")
			 (or (not state)
			     (not status)))
		    (begin
		      (debug:print 0 "ERROR: You must specify :state and :status with every call to -test-status\n" help)
		      (sqlite3:finalize! db)







|







648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
				(else status)))
		    ;; transfer relevant keys into a hash to be passed to test-set-status!
		    ;; could use an assoc list I guess. 
		    (otherdata (let ((res (make-hash-table)))
				 (for-each (lambda (key)
					     (if (args:get-arg key)
						 (hash-table-set! res key (args:get-arg key))))
					   (list ":value" ":tol" ":expected_value" ":first_err" ":first_warn" ":units"))
				 res)))
		(if (and (args:get-arg "-test-status")
			 (or (not state)
			     (not status)))
		    (begin
		      (debug:print 0 "ERROR: You must specify :state and :status with every call to -test-status\n" help)
		      (sqlite3:finalize! db)