Megatest

Check-in [8a363f876e]
Login
Overview
Comment:added hooks for -rerun-logpro
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-rerun-logpro
Files: files | file ages | folders
SHA1: 8a363f876e77ab3e144a67ef3120384b6b1b513c
User & Date: bjbarcla on 2018-12-06 18:14:53
Other Links: branch diff | manifest | tags
Context
2018-12-11
18:11
switched to strategy of leveraging operate-on check-in: 884a77869d user: bjbarcla tags: v1.65-rerun-logpro
2018-12-06
18:14
added hooks for -rerun-logpro check-in: 8a363f876e user: bjbarcla tags: v1.65-rerun-logpro
16:56
fixed bug introduced in last commit where run-a-command was not backgrounding check-in: 59a626c53f user: bjbarcla tags: v1.65, v1.6517
Changes

Modified Makefile from [09076a6975] to [5f2c7e89a3].

25
26
27
28
29
30
31
32

33
34
35
36
37
38
39
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39







-
+







   ods.scm runconfig.scm server.scm configf.scm \
   db.scm keys.scm margs.scm megatest-version.scm \
   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)
EGGS=matchable readline apropos base64 regex-literals format regex-case test coops trace csv \
dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt \

Modified ezsteps.scm from [f44a45955c] to [82b8c50f05].

35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
35
36
37
38
39
40
41

42
43
44
45
46
47
48
49
50







-
+
+







(include "run_records.scm")


;;(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))
	 (rollup-status 0)
	 (exit-info     (vector #t #t #t))

Modified megatest.scm from [cecad5eaf2] to [1137c4d993].

49
50
51
52
53
54
55

56
57
58
59
60
61
62
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63







+








(declare (uses tdb))
(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!!!!

(include "common_records.scm")
(include "key_records.scm")
113
114
115
116
117
118
119

120
121
122
123
124
125
126
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128







+







                            Optionally use :state and :status, use -keep-records to remove only
                            the run data.
  -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
  -preclean               : remove the existing test directory before running the test
  -clean-cache            : remove the cached megatest.config and runconfigs.config files
289
290
291
292
293
294
295

296
297
298
299
300
301
302
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305







+







			"-itempatt"
			"-setlog"
			"-set-toplog"
			"-runstep"
			"-logpro"
			"-m"
			"-rerun"
                        "-redo-logpro"
			"-days"
			"-rename-run"
			"-to"
			;; values and messages
			":category"
			":variable"
			":value"
1241
1242
1243
1244
1245
1246
1247













1248
1249
1250
1251
1252
1253
1254
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270







+
+
+
+
+
+
+
+
+
+
+
+
+








                    
                            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% ...
;;
(if (or (args:get-arg "-list-runs")
	(args:get-arg "-list-db-targets"))

Added redo-logpro.scm version [fe08398762].






































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 <http://www.gnu.org/licenses/>.
;;

(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)