Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -424,11 +424,11 @@ (begin (print "Failed to setup, exiting") (exit 1))) (set! db (open-db)) (if (and state status) - (teststep-set-status! db run-id test-name step state status itemdat) + (teststep-set-status! db run-id test-name step state status itemdat (args:get-arg "-m")) (begin (print "ERROR: You must specify :state and :status with every call to -step") (exit 6))) (sqlite3:finalize! db) (set! *didsomething* #t)))) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -94,11 +94,11 @@ (if valid-values (if (member item valid-values) item #f) item))) -(define (teststep-set-status! db run-id test-name teststep-name state-in status-in itemdat) +(define (teststep-set-status! db run-id test-name teststep-name state-in status-in itemdat comment) ;; (print "run-id: " run-id " test-name: " test-name) (let* ((state (check-valid-items "state" state-in)) (status (check-valid-items "status" status-in)) (item-path (item-list->path itemdat)) (testdat (runs:get-test-info db run-id test-name item-path))) @@ -108,12 +108,12 @@ (print "WARNING: Invalid " (if status "status" "state") " value \"" (if status status-in state-in) "\", update your validstates section in megatest.config")) (if testdat (let ((test-id (test:get-id testdat))) (sqlite3:execute db - "INSERT OR REPLACE into test_steps (test_id,stepname,state,status,event_time) VALUES(?,?,?,?,strftime('%s','now'));" - test-id teststep-name state status)) + "INSERT OR REPLACE into test_steps (test_id,stepname,state,status,event_time,comment) VALUES(?,?,?,?,strftime('%s','now'),?);" + test-id teststep-name state status (if comment comment ""))) (print "ERROR: Can't update " test-name " for run " run-id " -> no such test in db")))) (define (test-get-kill-request db run-id test-name itemdat) (let* ((item-path (item-list->path itemdat)) (testdat (runs:get-test-info db run-id test-name item-path))) Index: tests/tests/runfirst/main.sh ================================================================== --- tests/tests/runfirst/main.sh +++ tests/tests/runfirst/main.sh @@ -1,7 +1,7 @@ #!/bin/bash -megatest -step wasting_time :state start :status n/a +megatest -step wasting_time :state start :status n/a -m "This is a test step comment" sleep 20 megatest -step wasting_time :state end :status $? -megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log +megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log -m "This is a test level comment"