Megatest

Check-in [dbc9e048de]
Login
Overview
Comment:partial conversion to local files for mt*
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v2.01-local-mtfiles | v2.01-try-1
Files: files | file ages | folders
SHA1: dbc9e048deb130cd09dc2e16e5e8769f0fca734d
User & Date: mrwellan on 2018-11-29 15:00:50
Other Links: branch diff | manifest | tags
Context
2018-12-05
15:30
Improved build for modules stuff check-in: c7890cb7e9 user: mrwellan tags: v2.01-local-mtfiles, v2.01-try-1
2018-11-29
15:00
partial conversion to local files for mt* check-in: dbc9e048de user: mrwellan tags: v2.01-local-mtfiles, v2.01-try-1
2018-11-28
14:44
Corrected couple mis-ported items for the mt* stuff Leaf check-in: c6761db385 user: mrwellan tags: v2.01-try-1
Changes

Modified Makefile from [2a43e569cb] to [67ff8331ed].

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







+
+
+

-
+
+














-
+







   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

OPENSRC_DIR=../opensrc
MTUTILS_DIR=$(OPENSRC_DIR)/mtutils

# module source files
MSRCFILES = ftail.scm
MSRCFILES = ftail.scm mtconfigf.scm
#  mtcommon.scm mtdb.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 \
json md5 awful http-client spiffy uri-common intarweb spiffy-request-vars \
spiffy-directory-listing ssax sxml-serializer sxml-modifications iup canvas-draw sqlite3

GUISRCF  = dashboard-context-menu.scm dashboard-tests.scm dashboard-guimonitor.scm gutils.scm dcommon.scm tree.scm vg.scm

OFILES   = $(SRCFILES:%.scm=%.o)
GOFILES  = $(GUISRCF:%.scm=%.o)

MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o))

mofiles/%.o : %.scm
mofiles/%.o : %.scm ../adat.scm
	mkdir -p mofiles
	csc $(CSCOPTS) -J -c $< -o mofiles/$*.o

ADTLSCR=mt_laststep mt_runstep mt_ezstep
HELPERS=$(addprefix $(PREFIX)/bin/,$(ADTLSCR))
DEPLOYHELPERS=$(addprefix deploytarg/,$(ADTLSCR))
MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}')
83
84
85
86
87
88
89













90
91
92
93
94
95
96
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113







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







	csc $(CSCOPTS) $(OFILES) dashboard.scm $(GOFILES) $(MOFILES) -o dboard

ndboard : newdashboard.scm $(OFILES) $(GOFILES)
	csc $(CSCOPTS) $(OFILES) $(GOFILES) newdashboard.scm -o ndboard

mtut: $(OFILES) megatest-fossil-hash.scm mtut.scm
	csc $(CSCOPTS) $(OFILES) mtut.scm -o mtut

# # stuff for handling external files from opensrc package
# mtcommon.scm : $(MTUTILS_DIR)/mtcommon/mtcommon.scm
# 	ln -sf $< $@
# 
# mtdb.scm : $(MTUTILS_DIR)/mtdb/mtdb.scm
# 	ln -sf $< $@
# 
# mtconfigf.scm : $(MTUTILS_DIR)/mtconfigf/mtconfigf.scm 
# 	ln -sf $< $@
# 
../adat.scm :  $(MTUTILS_DIR)/adat.scm
	ln -sf $(PWD)/$< $@

TCMTOBJS = \
	api.o \
	archive.o \
	cgisetup/models/pgdb.o \
	client.o \
	common.o \

Modified TODO from [19e430807b] to [ca19aa8019].

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32






































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







-
-








+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

TODO
====

. Dashboard should resist running from non-homehost



Migration to inmem db plus per run db
-------------------------------------

. Re-work the dbstruct data structure?
.. Move main.db to global?
.. [ run-id.db inmemdb last-mod last-read last-sync inuse ]
. Re-work all queries to use run-id to dereference server
. Open main.db directly in calls to -runtests etc. No need to talk remote?

archive.scm:(declare (uses common))
client.scm:(declare (uses common))
dashboard-context-menu.scm:(declare (uses common))
dashboard-guimonitor.scm:(declare (uses common))
dashboard-tests.scm:(declare (uses common))
dashboard.scm:(declare (uses common))
db.scm:(declare (uses common))
diff-report.scm:(declare (uses common))
ezsteps.scm:(declare (uses common))
fs-transport.scm:(declare (uses common))
http-transport.scm:(declare (uses common))
index-tree.scm:(declare (uses common))
items.scm:(declare (uses common))
keys.scm:(declare (uses common))
launch.scm:(declare (uses common))
lock-queue.scm:(declare (uses common))
margs.scm:;; (declare (uses common))
megatest.scm:(declare (uses common))
mlaunch.scm:(declare (uses common))
monitor.scm:(declare (uses common))
mt.scm:(declare (uses common))
mtut-dunno.scm:(declare (uses common))
mtut.scm:(declare (uses common))
newdashboard.scm:(declare (uses common))
ods.scm:(declare (uses common))
old-tcmt.scm:(declare (uses common))
rpc-transport.scm:(declare (uses common))
runconfig.scm:(declare (uses common))
runs.scm:(declare (uses common))
sauthorize.scm:;(declare (uses common))
server.scm:(declare (uses common))
sretrieve.scm:;(declare (uses common))
subrun.scm:(declare (uses common))
tasks.scm:(declare (uses common))
tcmt.scm:(declare (uses common))
tdb.scm:(declare (uses common))
tests.scm:(declare (uses common))

Modified ftail.scm from [96a7ff77a3] to [721728b98f].

15
16
17
18
19
20
21

22
23
24
25
26
27
28
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+







;; 
;;     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 ftail))


(module ftail
    (
     open-tail-db
     tail-write
     tail-get-fid
     file-tail

Modified launch.scm from [7a44cc90cf] to [5cadad181e].

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







-
+










+
+
+







;;======================================================================
;; launch a task - this runs on the originating host, tests themselves
;;
;;======================================================================

(use regex regex-case base64 sqlite3 srfi-18 directory-utils posix-extras z3 call-with-environment-variables csv)
(use typed-records pathname-expand matchable)
(use (prefix mtconfigf configf:))
;; (use (prefix mtconfigf configf:))

(import (prefix base64 base64:))
(import (prefix sqlite3 sqlite3:))

(declare (unit launch))
(declare (uses subrun))
(declare (uses common))
;; (declare (uses configf))
(declare (uses db))

(declare (uses mtconfigf))
(import (prefix mtconfigf configf:))

(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")

;;======================================================================
;; ezsteps
;;======================================================================

Modified megatest.scm from [cecad5eaf2] to [49eee809e6].

1886
1887
1888
1889
1890
1891
1892





1893

1894
1895
1896
1897
1898
1899
1900
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897

1898
1899
1900
1901
1902
1903
1904
1905







+
+
+
+
+
-
+







	     (runscript (assoc/default 'runscript cmdinfo))
	     (db-host   (assoc/default 'db-host   cmdinfo))
	     (run-id    (assoc/default 'run-id    cmdinfo))
	     (test-id   (assoc/default 'test-id   cmdinfo))
	     (itemdat   (assoc/default 'itemdat   cmdinfo))
	     (work-area (assoc/default 'work-area cmdinfo))
	     (db        #f))
	(handle-exceptions
	 exn
	 (begin
	   (debug:print 0 *default-log-port* "ERROR: the work directory " testpath " has disappeared or become unreadable! Cannot proceed, exiting now.")
	   (exit 1))
	(change-directory testpath)
	 (change-directory testpath))
	(if (not (launch:setup))
	    (begin
	      (debug:print 0 *default-log-port* "Failed to setup, exiting")
	      (exit 1)))
	(if (and state status)
	    (let ((comment (launch:load-logpro-dat run-id test-id step)))
	      ;; (rmt:test-set-log! run-id test-id (conc stepname ".html"))))