Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -81,12 +81,14 @@ fields category,variable,value,comment Queries -list-runs patt : list runs matching pattern \"patt\", % is the wildcard -showkeys : show the keys used in this megatest setup - -test-path targpatt : get the most recent test path(s) matching targpatt e.g. %/%... + -test-path targpatt : get the most recent test path/file matching targpatt e.g. %/%... returns list sorted by age ascending, see examples below + -test-paths : get the test paths matching target, runname, item and test + patterns. Misc -rebuild-db : bring the database schema up to date -update-meta : update the tests metadata for all tests -env2file fname : write the environment to fname.csh and fname.sh @@ -157,10 +159,11 @@ "-setvars" "-set-state-status" "-debug" ;; for *verbosity* > 2 "-gen-megatest-test" "-override-timeout" + "-test-path" ;; -test-paths is for listing all ) (list "-h" "-force" "-xterm" "-showkeys" @@ -174,11 +177,10 @@ "-repl" "-lock" "-unlock" ;; queries "-test-paths" ;; get path(s) to a test, ordered by youngest first - "-test-path" ;; -test-paths is deprecated "-runall" ;; run all tests "-remove-runs" "-usequeue" "-rebuild-db" @@ -465,19 +467,20 @@ (run-id (assoc/default 'run-id cmdinfo)) (itemdat (assoc/default 'itemdat cmdinfo)) (db #f) (state (args:get-arg ":state")) (status (args:get-arg ":status")) - (target (args:get-arg "-target"))) - (change-directory testpath) + (target (args:get-arg "-target")) + (toppath (assoc/default 'toppath cmdinfo))) + (change-directory toppath) (if (not target) (begin (debug:print 0 "ERROR: -target is required.") (exit 1))) (if (not (setup-for-run)) (begin - (debug:print 0 "Failed to setup, giving up on -test-path, exiting") + (debug:print 0 "Failed to setup, giving up on -test-path(s), exiting") (exit 1))) (set! db (open-db)) (if (not (args:get-arg "-server")) (server:client-setup db)) (let* ((itempatt (args:get-arg "-itempatt"))