Megatest

Check-in [bcc63efb47]
Login
Overview
Comment:Cleaned up uv files. Added tar releases to uv and captured some scratch files used to analyze configf
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bcc63efb476695c9087e6e43b385e8597a971f8e
User & Date: matt on 2024-09-25 15:15:57
Other Links: manifest | tags
Context
2024-09-25
19:58
Added process registration stubs to api.scm check-in: 88fa1bd8c0 user: matt tags: trunk
15:15
Cleaned up uv files. Added tar releases to uv and captured some scratch files used to analyze configf check-in: bcc63efb47 user: matt tags: trunk
2024-09-21
14:32
Minor updates to manual check-in: 5696465b7a user: matt tags: trunk
Changes

Added configf-testing/Makefile version [94cb2300d9].























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11

all : c

%.o : %.scm
	csc -J -c $< -o $*.o

c.o : a.o

c : c.o a.o
	csc a.o c.o -o c

Added configf-testing/a.scm version [b6730203d0].













































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(declare (unit a))

(module a
  *

  (import scheme chicken posix)
  
  (define (a:normalize-dir d)
    (if (and (file-exists? d)
	     (directory? d))
	(let ((curr (current-directory)))
	  (change-directory d)
	  (let ((nd (current-directory)))
	    (change-directory curr)
	    nd))
	d))

  )



	 

Added configf-testing/c.scm version [3ae900a3b5].









































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(declare (uses a))

;; pretend to be a config file processor
(use posix srfi-69)

;; (define getenv get-environment-variable)
(define (print-hash-table ht)
  (print "ht=")
  (pp (hash-table->alist ht)))

(define cfgdata  (conc "(use simple-md5)"
		       "(import a)"
		       "(set! getenv get-environment-variable)"
		       "(hash-table-set! ht \"PATH\" (getenv \"PATH\"))"
		       "(hash-table-set! ht \"currdir\" (current-directory))"
		       "(hash-table-set! ht \"md5sum\" (string->md5sum \"Hello\"))"
		       ;; in mtconfigf the below is not working
		       "(hash-table-set! ht \"var-tmp\" (a:normalize-dir \"/var/tmp\"))"))

(define (faux-cfg-processor ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str
      (lambda ()
	((eval (read)) ht)))))

(module cfgprocessor
	*

(import ports data-structures chicken scheme files srfi-69 posix srfi-1)
	
(define (faux-cfg-processor-modularized ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str
      (lambda ()
	((eval (read)) ht)))))
)

(import cfgprocessor)
(import a)

(print "\nCan I run stuff from module \"a\":")
(print (a:normalize-dir "/var/tmp"))

(print "\nRun the non-modularized version")
(let ((ht (make-hash-table)))
  (faux-cfg-processor ht cfgdata)
  (print-hash-table ht))

(print "\nRun the modularized version")
(let ((ht (make-hash-table)))
  (faux-cfg-processor-modularized ht cfgdata)
  (print-hash-table ht))

Added utils/make-all-tar.sh version [8da6dd30ac].



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# fossil timeline -n 0 -F %t|sort -u|grep -P '^v\d.\d\d\d\d$'

ALLVERS=$(fossil timeline -n 0 -F %t|sed -e 's/, /\n/'|sort -u|grep -P '^v\d.[67890]\d\d\d$')

PUBLISHVERS="\
	   v1.6592 \
	   v1.7016 \
	   v1.7105 \
	   v1.8032 \
	   v1.8104 \
	   v2.0001"
    
for x in $PUBLISHVERS;do
    ./utils/tarver.sh $x
done

Added utils/tarver.sh version [712e7e25a9].













































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
38
#!/bin/bash

VERSION=$1

if [[ -z $VERSION ]];then
    echo "Usage: tarver.sh [version]"
    exit 1
fi

dbf=$(fossil info|grep repository:|awk '{print $2}')

mkdir -p /tmp/$USER/mtbuild

pushd /tmp/$USER/mtbuild

if [[ -e $VERSION ]];then
    echo "Cleaning out old /tmp copy of Megatest $VERSION"
    rm -rf /tmp/$USER/mtbuild/$VERSION
fi

mkdir -p /tmp/$USER/mtbuild/$VERSION
cd /tmp/$USER/mtbuild/$VERSION

fossil open $dbf $VERSION

make megatest-fossil-hash.scm

cp .fslckout ../.fslckout-$VERSION
rm .fslckout
cd ..

tar cfvz megatest-$VERSION.tar.gz $VERSION
popd

cp /tmp/$USER/mtbuild/megatest-$VERSION.tar.gz .
fossil uv add megatest-$VERSION.tar.gz
rm megatest-$VERSION.tar.gz