Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -27,11 +27,11 @@ process.scm runs.scm tasks.scm tests.scm genexample.scm \ http-transport.scm filedb.scm tdb.scm \ client.scm mt.scm \ ezsteps.scm lock-queue.scm sdb.scm \ rmt.scm api.scm subrun.scm \ - portlogger.scm archive.scm env.scm diff-report.scm cgisetup/models/pgdb.scm + portlogger.scm archive.scm env.scm diff-report.scm cgisetup/models/pgdb.scm redo-logpro.scm # module source files MSRCFILES = ftail.scm # Eggs to install (straightforward ones) Index: ezsteps.scm ================================================================== --- ezsteps.scm +++ ezsteps.scm @@ -37,11 +37,12 @@ ;;(rmt:get-test-info-by-id run-id test-id) -> testdat -(define (ezsteps:run-from testdat start-step-name run-one) +(define (ezsteps:run-from testdat start-step-name run-one #!key (rerun-logpro-only #f)) + ;; TODO: honor rerun-logpro-only (let* ((test-run-dir ;; (filedb:get-path *fdb* (db:test-get-rundir testdat)) ;; ) (testconfig (read-config (conc test-run-dir "/testconfig") #f #t environ-patt: "pre-launch-env-vars")) (ezstepslst (hash-table-ref/default testconfig "ezsteps" '())) (run-mutex (make-mutex)) Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -51,10 +51,11 @@ (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (declare (uses env)) (declare (uses diff-report)) +(declare (uses redo-logpro)) (declare (uses ftail)) (import ftail) (define *db* #f) ;; this is only for the repl, do not use in general!!!! @@ -115,10 +116,11 @@ -set-state-status X,Y : set state to X and status to Y, requires controls per -remove-runs -rerun FAIL,WARN... : force re-run for tests with specificed status(s) -rerun-clean : set all tests not COMPLETED+PASS,WARN,WAIVED to NOT_STARTED,n/a and then run the specified testpatt with -preclean -rerun-all : set all tests to NOT_STARTED,n/a and run with -preclean + -redo-logpro : do not rerun tests, but reapply logpro rules (ez-step flavor tests only) -lock : lock run specified by target and runname -unlock : unlock run specified by target and runname -set-run-status status : sets status for run to status, requires -target and -runname -get-run-status : gets status for run specified by target and runname -run-wait : wait on run specified by target and runname @@ -291,10 +293,11 @@ "-set-toplog" "-runstep" "-logpro" "-m" "-rerun" + "-redo-logpro" "-days" "-rename-run" "-to" ;; values and messages ":category" @@ -1243,10 +1246,23 @@ table-rows)))) (set! *didsomething* #t) (set! *time-to-exit* #t)) + +;; redo logpro +(if (args:get-arg "-redo-logpro") + (let* ((result (redo-logpro:redo-logpro))) + (set! *didsomething* #t) + (set! *time-to-exit* #t) + (cond + ((not result) + + (exit 1)) + (else + #t)))) + ;; NOTE: list-runs and list-db-targets operate on local db!!! ;; ;; IDEA: megatest list -runname blah% ... ;; ADDED redo-logpro.scm Index: redo-logpro.scm ================================================================== --- /dev/null +++ redo-logpro.scm @@ -0,0 +1,37 @@ +;; Copyright 2006-2018, Matthew Welland. +;; +;; This file is part of Megatest. +;; +;; Megatest is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Megatest is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Megatest. If not, see . +;; + +(declare (unit redo-logpro)) +(declare (uses common)) +(declare (uses rmt)) + +(include "common_records.scm") +(use matchable) +(use fmt) +(use ducttape-lib) +(define css "") + +(define (redo-logpro:redo-logpro) + ;; TODO: get list of all test ids matching selectors + ;; TODO: iterate over tests ids list + ;; TODO: populate testdat from testid, start-step-name (from first step) + ;; TODO: (ezsteps:run-from testdat start-step-name #f rerun-logpro-only: #t)) + + + (print "redo-logpro Unimplemented") + #f)