Check-in [1146144d5b]
Not logged in
Overview
SHA1 Hash:1146144d5bee3bb7560e09849b8e8d0fd60c5430
Date: 2011-05-05 01:46:25
User: matt
Comment:Fixed -m for test steps
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified megatest.scm from [beb9f35b7df01a07] to [c234588fb18980e4].

422 (change-directory testpath) 422 (change-directory testpath) 423 (if (not (setup-for-run)) 423 (if (not (setup-for-run)) 424 (begin 424 (begin 425 (print "Failed to setup, exiting") 425 (print "Failed to setup, exiting") 426 (exit 1))) 426 (exit 1))) 427 (set! db (open-db)) 427 (set! db (open-db)) 428 (if (and state status) 428 (if (and state status) 429 (teststep-set-status! db run-id test-name step state status itemda | 429 (teststep-set-status! db run-id test-name step state status itemda 430 (begin 430 (begin 431 (print "ERROR: You must specify :state and :status with every ca 431 (print "ERROR: You must specify :state and :status with every ca 432 (exit 6))) 432 (exit 6))) 433 (sqlite3:finalize! db) 433 (sqlite3:finalize! db) 434 (set! *didsomething* #t)))) 434 (set! *didsomething* #t)))) 435 435 436 (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets pig 436 (if (or (args:get-arg "-setlog") ;; since setting up is so costly lets pig

Modified runs.scm from [689752ec03b79c13] to [1ff281177362723e].

92 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 92 (let ((valid-values (let ((s (config-lookup *configdat* "validvalues" class))) 93 (if s (string-split s) #f)))) 93 (if s (string-split s) #f)))) 94 (if valid-values 94 (if valid-values 95 (if (member item valid-values) 95 (if (member item valid-values) 96 item #f) 96 item #f) 97 item))) 97 item))) 98 98 99 (define (teststep-set-status! db run-id test-name teststep-name state-in status- | 99 (define (teststep-set-status! db run-id test-name teststep-name state-in status- 100 ;; (print "run-id: " run-id " test-name: " test-name) 100 ;; (print "run-id: " run-id " test-name: " test-name) 101 (let* ((state (check-valid-items "state" state-in)) 101 (let* ((state (check-valid-items "state" state-in)) 102 (status (check-valid-items "status" status-in)) 102 (status (check-valid-items "status" status-in)) 103 (item-path (item-list->path itemdat)) 103 (item-path (item-list->path itemdat)) 104 (testdat (runs:get-test-info db run-id test-name item-path))) 104 (testdat (runs:get-test-info db run-id test-name item-path))) 105 ;; (print "testdat: " testdat) 105 ;; (print "testdat: " testdat) 106 (if (and testdat ;; if the section exists then force specification BUG, I do 106 (if (and testdat ;; if the section exists then force specification BUG, I do 107 (or (not state)(not status))) 107 (or (not state)(not status))) 108 (print "WARNING: Invalid " (if status "status" "state") 108 (print "WARNING: Invalid " (if status "status" "state") 109 " value \"" (if status status-in state-in) "\", update your valid 109 " value \"" (if status status-in state-in) "\", update your valid 110 (if testdat 110 (if testdat 111 (let ((test-id (test:get-id testdat))) 111 (let ((test-id (test:get-id testdat))) 112 (sqlite3:execute db 112 (sqlite3:execute db 113 "INSERT OR REPLACE into test_steps (test_id,stepname,sta | 113 "INSERT OR REPLACE into test_steps (test_id,stepname,sta 114 test-id teststep-name state status)) | 114 test-id teststep-name state status (if comment comment " 115 (print "ERROR: Can't update " test-name " for run " run-id " -> no such 115 (print "ERROR: Can't update " test-name " for run " run-id " -> no such 116 116 117 (define (test-get-kill-request db run-id test-name itemdat) 117 (define (test-get-kill-request db run-id test-name itemdat) 118 (let* ((item-path (item-list->path itemdat)) 118 (let* ((item-path (item-list->path itemdat)) 119 (testdat (runs:get-test-info db run-id test-name item-path))) 119 (testdat (runs:get-test-info db run-id test-name item-path))) 120 (equal? (test:get-state testdat) "KILLREQ"))) 120 (equal? (test:get-state testdat) "KILLREQ"))) 121 121

Modified tests/tests/runfirst/main.sh from [509a06d02e6d0d3b] to [b6ac44a0c40cf823].

1 #!/bin/bash 1 #!/bin/bash 2 2 3 megatest -step wasting_time :state start :status n/a | 3 megatest -step wasting_time :state start :status n/a -m "This is a test step com 4 sleep 20 4 sleep 20 5 megatest -step wasting_time :state end :status $? 5 megatest -step wasting_time :state end :status $? 6 6 7 megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log | 7 megatest -test-status :state COMPLETED :status PASS -setlog thelogfile.log -m "T