Megatest

Diff
Login

Differences From Artifact [53a5275b02]:

To Artifact [847bc202b1]:


37
38
39
40
41
42
43


44
45
46
47
48
49
50
51
52
53
54
Run data
  :runname                : required, name for this particular test run
  :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

Arbitrary test data loading
  -load-test-data         : read test specific data for storage in the test_data table
                            from standard in. Each line is comma delimited with four
                            fields category,variable,value,comment







>
>
|
|
|
|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Run data
  :runname                : required, name for this particular test run
  :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 
  :category               : set the category field (optional)
  :variable               : set the variable name (optional)
  :value                  : value measured (required)
  :expected               : value expected (required)
  :tol                    : |value-expect| <= tol (required, can be <, >, >=, <= or number)
  :units                  : name of the units for value, expected_value etc. (optional)
  :first_err              : record an error message
  :first_warn             : record a warning message

Arbitrary test data loading
  -load-test-data         : read test specific data for storage in the test_data table
                            from standard in. Each line is comma delimited with four
                            fields category,variable,value,comment
109
110
111
112
113
114
115


116
117
118
119
120
121
122
123
124
125
126
			"-logpro"
			"-m"
			"-rerun"
			"-days"
			"-rename-run"
			"-to"
			;; values and messages


			":first_err"
			":first_warn"
			":value"
			":expected_value"
			":tol"
			":units"
			;; misc
			"-extract-ods"
			"-debug" ;; for *verbosity* > 2
			) 
		 (list  "-h"







>
>



|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
			"-logpro"
			"-m"
			"-rerun"
			"-days"
			"-rename-run"
			"-to"
			;; values and messages
			":category"
			":variable"
			":first_err"
			":first_warn"
			":value"
			":expected"
			":tol"
			":units"
			;; misc
			"-extract-ods"
			"-debug" ;; for *verbosity* > 2
			) 
		 (list  "-h"
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
				(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)







|







651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
				(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" ":first_err" ":first_warn" ":units" ":category" ":variable"))
				 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)