@@ -9,11 +9,11 @@ (include "common.scm") (define megatest-version 1.01) (define help (conc " -Megatest, documentation at http://www.kiatoa.com/fossils/opensrc +Megatest, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " license GPL, Copyright Matt Welland 2006-2011 Usage: megatest [options] -h : this help @@ -37,10 +37,12 @@ :state : required if updating step state; e.g. start, end, completed :status : required if updating step status; e.g. pass, fail, n/a 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 Misc -force : override some checks -xterm : start an xterm instead of launching the test @@ -67,10 +69,12 @@ ":item" ":runname" ":state" ":status" "-list-runs" + "-testpatt" + "-itempatt" "-setlog" "-runstep" "-logpro" "-remove-run" ) @@ -109,10 +113,12 @@ (if (args:get-arg "-list-runs") (let* ((db (begin (setup-for-run) (open-db))) (runpatt (args:get-arg "-list-runs")) + (testpatt (args:get-arg "-testpatt")) + (itempatt (args:get-arg "-itempatt")) (runsdat (db-get-runs db runpatt)) (runs (db:get-rows runsdat)) (header (db:get-header runsdat)) (keys (db-get-keys db)) (keynames (map key:get-fieldname keys))) @@ -124,11 +130,11 @@ (db-get-value-by-header run header x)) keynames) "/") "/" (db-get-value-by-header run header "runname")) (let ((run-id (db-get-value-by-header run header "id"))) - (let ((tests (db-get-tests-for-run db run-id))) + (let ((tests (db-get-tests-for-run db run-id testpatt itempatt))) ;; Each test (for-each (lambda (test) (format #t " Test: ~25a State: ~15a Status: ~15a Runtime: ~5@as Time: ~22a Host: ~10a\n"