Megatest

Check-in [e99d630f55]
Login
Overview
Comment:Fix few minor issues with mtutil updates
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-matt-misc
Files: files | file ages | folders
SHA1: e99d630f5587c9fc7c3319e98a4c0c45ee3ce939
User & Date: matt on 2018-03-05 21:11:14
Other Links: branch diff | manifest | tags
Context
2018-03-05
21:11
Merged v1.65-matt-misc into v1.65 check-in: 2d65cd8ad0 user: matt tags: v1.65
21:11
Fix few minor issues with mtutil updates Leaf check-in: e99d630f55 user: matt tags: v1.65-matt-misc
17:13
Added -rerun-clean and -rerun-all. Added -list-pkt-keys check-in: 649822464b user: mrwellan tags: v1.65-matt-misc
Changes

Modified megatest.config from [2f327616bb] to [3994f691c8].

47
48
49
50
51
52
53
54
55


56
57
58
59
60
61
62
47
48
49
50
51
52
53


54
55
56
57
58
59
60
61
62







-
-
+
+








[nopurpose]

[access]
ext matt:admin mattw:owner

[accesstypes]
admin run rerun resume remove set-ss
owner run rerun resume remove
admin run rerun resume remove set-ss rerun-clean
owner run rerun resume remove rerun-all
badguy set-ss

[setup]
maxload 1.2

[listeners]
localhost:12345  contact=matt@kiatoa.com

Modified mtut.scm from [a18d19941b] to [fef840c2a5].

235
236
237
238
239
240
241







242
243
244
245
246
247
248
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255







+
+
+
+
+
+
+







    (rerun-clean . "-rerun-clean")
    (rerun-all   . "-rerun-all")
    (sync        . "")
    (archive     . "-archive")
    (set-ss      . "-set-state-status")
    (remove      . "-remove-runs")))

;; manually keep this list updated from the keys to
;; the case *action* near the end of this file.
(define *other-actions*
  '(run remove rerun set-ss archive kill list
	dispatch import rungen process
	show gendot db tsend tlisten))

;; Card types:
;;
;; A action
;; U username (Unix)
;; D timestamp
;; T card type

1183
1184
1185
1186
1187
1188
1189
1190

1191
1192
1193
1194
1195
1196
1197
1190
1191
1192
1193
1194
1195
1196

1197
1198
1199
1200
1201
1202
1203
1204







-
+








(let ((debugcontrolf (conc (get-environment-variable "HOME") "/.mtutilrc")))
  (if (common:file-exists? debugcontrolf)
      (load debugcontrolf)))

(if *action*
    (case (string->symbol *action*)
      ((run remove rerun set-ss archive kill list)
      ((run remove rerun rerun-clean rerun-all set-ss archive kill list)
       (let* ((mtconfdat (simple-setup (args:get-arg "-start-dir")))
	      (mtconf    (car mtconfdat))
	      (area      (args:get-arg "-area")) ;; look up the area to dispatch to from [areas] section
	      (areasec   (if area (configf:lookup mtconf "areas" area) #f))
	      (areadat   (if areasec (common:val->alist areasec) #f))
	      (area-path (if areadat (alist-ref 'path areadat) #f))
	      (pktsdirs  (configf:lookup mtconf "setup" "pktsdirs"))
1326
1327
1328
1329
1330
1331
1332
1333




1334
1335
1336
1337
1338
1339
1340
1333
1334
1335
1336
1337
1338
1339

1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350







-
+
+
+
+







														(set-signal-handler! signal/term special-signal-handler)

                            (let loop ((instr (nn-recv rep)))
                               (print "received " instr ", running \"" script " " instr "\"")
                               (system (conc script " '" instr "'"))
                               (nn-send rep "ok")
                               (loop (nn-recv rep))))
                     (print "ERROR: Port " portnum " already in use. Try another port")))))))
		       (print "ERROR: Port " portnum " already in use. Try another port")))))))
      (else
       (let ((all-actions (sort (map conc (delete-duplicates (append *other-actions* (map car *action-keys*)))) string<=?)))
	 (print "unrecognised action: \"" *action* "\", try one of; \"" (string-intersperse all-actions "\", \"") "\"")))
      
      )) ;; the end
             

;; If HTTP_HOST is defined then we must be in the cgi environment
;; so run stml and exit
;;