@@ -46,10 +46,15 @@ :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 + 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 -showkeys : show the keys used in this megatest setup @@ -120,10 +125,11 @@ "-force" "-xterm" "-showkeys" "-test-status" "-set-values" + "-load-test-data" "-summarize-items" "-gui" "-runall" ;; run all tests "-remove-runs" "-keepgoing" @@ -559,10 +565,11 @@ (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets piggyback on -test-status (args:get-arg "-set-toplog") (args:get-arg "-test-status") (args:get-arg "-set-values") + (args:get-arg "-load-test-data") (args:get-arg "-runstep") (args:get-arg "-summarize-items")) (if (not (getenv "MT_CMDINFO")) (begin (debug:print 0 "ERROR: MT_CMDINFO env var not set, commands -test-status, -runstep and -setlog must be called *inside* a megatest environment!") @@ -582,10 +589,12 @@ (if (not (setup-for-run)) (begin (debug:print 0 "Failed to setup, exiting") (exit 1))) (set! db (open-db)) + (if (args:get-arg "-load-test-data") + (db:load-test-data db run-id test-name itemdat)) (if (args:get-arg "-setlog") (test-set-log! db run-id test-name itemdat (args:get-arg "-setlog"))) (if (args:get-arg "-set-toplog") (test-set-toplog! db run-id test-name (args:get-arg "-set-toplog"))) (if (args:get-arg "-summarize-items")