Megatest

Changes To v2.0-modularization-SOTU
Login

Initial version of "v2.0-modularization-SOTU"



































































































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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# megatest branch: v2.01-local-mtfiles

# opensrc branch: modularize-debug

# goals:

## enable development of eggs without altering megatest install area

## decouple argument processing, debug messages, config file loading

## modularity

-   compiler checks missing bindings (like perl -w)
-   not all modules loaded at start
-   reuse

# architecture notes:

## installation different.

-   was:
    -   make install -> /bin
-   now:
    -   make install -> /tmpinstall/{bin,eggs,share},

## how?

-   link tree /tmpinstall/eggs
-   during build, setenv CHICKEN\_REPOSITORY /tmpinstall/eggs/…
-   at runtime, (repository-path /tmpinstall/eggs/…)
    -   mtconfigf.scm
    -   common.scm

## decoupling notes

-   mtdebug
    
        ;; configure mtdebug  ;; TODO: move to megatest.scm with other command line arg processing
        (if (args:get-arg "-v")     (debug:set-verbose-mode))
        (if (args:get-arg "-q")     (debug:set-quiet-mode))
        (if (args:get-arg "-color")
            (case (string->symbol (args:get-arg "-color"))
              ((y Y yes YES t T)  (debug:force-color))
              ((n N no NO f F)    (debug:suppress-color))))
        debug 0,9 does not work
-   mtconfigf
    
        (define *default-log-port*  (current-error-port))
        (let* ((normal-fn debug:print)
               (info-fn   debug:print-info)
               (error-fn  debug:print-error)
               (default-port *default-log-port*))
          (configf:set-debug-printers normal-fn info-fn error-fn default-port))
        (configf:add-eval-string "(import (prefix mtargs    args:))
                                  (import mtdebug)
                                  (import (prefix mtconfigf configf:))")

## already: common\_records.scm included by many megatest scm's

## new:

-   include modules.scm from common\_records.scm
-   include modules.scm from scm's and utils that do not include common\_records.scm

## modules.scm:

-   use's new eggs
-   sets up new eggs (to be moved to megatest.scm and other toplevels (sauth, dashboard.scm, etc..)

## modules.scm

# completed:

## moved following from megatest source tree into opensrc/mtutils eggs:

-   margs.scm -> mtargs
-   debug: functions in common -> mtdebug
-   configf.scm -> mtconfigf

## color mode for debug:print-error, debug:print-info

# in progress:

## get thru ext-tests

# not started & loose threads:

## common.scm -> mtcommon

## -show-config -debug 9

## Makefile dependency weirdness

## and the rest… in phase 2

## csi broken for (use mtdebug)

## move egg config from modules.scm to real toplevels (megatest.scm, sauthorize.scm, etc…)