Megatest

Check-in [ed8901551a]
Login
Overview
Comment:Added syntax "VAR [system cmd ...]" to config files so that dynamic entries can be made
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | subtest-rollup
Files: files | file ages | folders
SHA1: ed8901551aa4f03764b4fea1922c9bd2fe2ce5a0
User & Date: matt on 2011-05-13 00:48:41
Other Links: branch diff | manifest | tags
Context
2011-05-14
18:07
Minor documentation updates Closed-Leaf check-in: 71c21902f8 user: matt tags: subtest-rollup
2011-05-13
00:48
Added syntax "VAR [system cmd ...]" to config files so that dynamic entries can be made check-in: ed8901551a user: matt tags: subtest-rollup
00:01
Added some of the commandline params and switches to the documentation. Bumped version to 1.06 check-in: 79713f34cb user: matt tags: subtest-rollup
Changes

Modified configf.scm from [fc6ecb37be] to [9312ee9e64].

36
37
38
39
40
41
42

43
44
45
46
47
48
49
50
51
52
53
54
55









56
57
58
59
60
61
62
  (if (not (file-exists? path))
      (if (null? ht)(make-hash-table) (car ht))
      (let ((inp        (open-input-file path))
	    (res        (if (null? ht)(make-hash-table)(car ht)))
	    (include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$"))
	    (section-rx (regexp "^\\[(.*)\\]\\s*$"))
	    (blank-l-rx (regexp "^\\s*$"))

	    (key-val-pr (regexp "^(\\S+)\\s+(.*)$"))
	    (comment-rx (regexp "^\\s*#.*")))
	(let loop ((inl               (read-line inp))
		   (curr-section-name "default"))
	  (if (eof-object? inl) res
	      (regex-case 
	       inl 
	       (comment-rx _                  (loop (read-line inp) curr-section-name))
	       (blank-l-rx _                  (loop (read-line inp) curr-section-name))
	       (include-rx ( x include-file ) (begin
						(read-config include-file res)
						(loop (read-line inp) curr-section-name)))
	       (section-rx ( x section-name ) (loop (read-line inp) section-name))









	       (key-val-pr ( x key val      ) (let ((alist (hash-table-ref/default res curr-section-name '())))
						(hash-table-set! res curr-section-name 
								 (config:assoc-safe-add alist key val))
								 ;; (append alist (list (list key val))))
						(loop (read-line inp) curr-section-name)))
	       (else (print "ERROR: Should not get here,\n   \"" inl "\"")
		     (loop (read-line inp) curr-section-name))))))))







>













>
>
>
>
>
>
>
>
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  (if (not (file-exists? path))
      (if (null? ht)(make-hash-table) (car ht))
      (let ((inp        (open-input-file path))
	    (res        (if (null? ht)(make-hash-table)(car ht)))
	    (include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$"))
	    (section-rx (regexp "^\\[(.*)\\]\\s*$"))
	    (blank-l-rx (regexp "^\\s*$"))
	    (key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$"))
	    (key-val-pr (regexp "^(\\S+)\\s+(.*)$"))
	    (comment-rx (regexp "^\\s*#.*")))
	(let loop ((inl               (read-line inp))
		   (curr-section-name "default"))
	  (if (eof-object? inl) res
	      (regex-case 
	       inl 
	       (comment-rx _                  (loop (read-line inp) curr-section-name))
	       (blank-l-rx _                  (loop (read-line inp) curr-section-name))
	       (include-rx ( x include-file ) (begin
						(read-config include-file res)
						(loop (read-line inp) curr-section-name)))
	       (section-rx ( x section-name ) (loop (read-line inp) section-name))
	       (key-sys-pr ( x key cmd      ) (let ((alist (hash-table-ref/default res curr-section-name '()))
						    (val   (let ((res (car (cmd-run->list cmd))))
							     (if (null? res)
								 ""
								 (string-intersperse res " ")))))
						(hash-table-set! res curr-section-name 
								 (config:assoc-safe-add alist key val))
								 ;; (append alist (list (list key val))))
						(loop (read-line inp) curr-section-name)))
	       (key-val-pr ( x key val      ) (let ((alist (hash-table-ref/default res curr-section-name '())))
						(hash-table-set! res curr-section-name 
								 (config:assoc-safe-add alist key val))
								 ;; (append alist (list (list key val))))
						(loop (read-line inp) curr-section-name)))
	       (else (print "ERROR: Should not get here,\n   \"" inl "\"")
		     (loop (read-line inp) curr-section-name))))))))

Modified tests/tests/sqlitespeed/testconfig from [60210b8b0f] to [6423a0c21d].

1
2
3
4
5
6
7

8


[setup]
runscript runscript.rb

[requirements]
waiton    runfirst

[items]

MANYITEMS a b c d e f g h i j k l m









>
|
>
>
1
2
3
4
5
6
7
8
9
10
11
[setup]
runscript runscript.rb

[requirements]
waiton    runfirst

[items]
MANYITEMS [system ls]
# a b c d e f g h i j k l m
# LSJUNK [system ls]