Megatest

Changes On Branch c7890cb7e93aab12
Login

Changes In Branch v2.01-local-mtfiles Through [c7890cb7e9] Excluding Merge-Ins

This is equivalent to a diff from c6761db385 to c7890cb7e9

2018-12-11
15:00
v2.01 compiles with mtconfigf but cannot yet expose needed functions to the evals in mtconfigf. check-in: b3e2f901e2 user: mrwellan tags: v2.01-local-mtfiles, v2.01-try-1
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
2018-11-27
15:43
Merged changes from trunk check-in: 851bcc0c6b user: mrwellan tags: v2.01-try-1

Modified Makefile from [2a43e569cb] to [77337ec2f9].

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







+
+
+

-
+
+














-
+

+

+







   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
	rm -f $*.import.scm mofiles/$*.import.scm
	csc $(CSCOPTS) -J -c $< -o mofiles/$*.o
	ln -f $*.import.scm mofiles/$*.import.scm

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}')

ifeq ($(MTESTHASH),)
83
84
85
86
87
88
89













90
91
92
93
94
95
96
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
114
115







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







	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 \
295
296
297
298
299
300
301
302




303
304
305
306
307
308
309
314
315
316
317
318
319
320

321
322
323
324
325
326
327
328
329
330
331







-
+
+
+
+







	mkdir -p ext-tests
	cd ext-tests;fossil open --nested $(MTQA_FOSSIL)

$(MTQA_FOSSIL) :
	fossil clone https://www.kiatoa.com/fossils/megatest_qa $(MTQA_FOSSIL)

clean : 
	rm -f $(OFILES) $(GOFILES) $(MOFILES) $(TCMTOBJS) $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil dboard dboard.o megatest.o dashboard.o megatest-fossil-hash.* altdb.scm mofiles/*.o vg.o
	rm -f $(OFILES) $(GOFILES) $(MOFILES) $(TCMTOBJS) $(PREFIX)/megatest \
        $(PREFIX)/dashboard mtest mtutil dboard dboard.o megatest.o dashboard.o \
        megatest-fossil-hash.* altdb.scm mofiles/*.o vg.o mtut.o \
	*.import.scm mofiles/*.import.scm *.bak *~ *-original *-merge *-baseline

#======================================================================
# Make the records files
#======================================================================

# vg_records.scm : records.sh
#	./records.sh

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

Modified mtut.scm from [50be2de849] to [5b6c50ecc2].

21
22
23
24
25
26
27
28

29
30
31
32
33
34
35





36
37
38
39
40
41
42
21
22
23
24
25
26
27

28

29
30
31
32


33
34
35
36
37
38
39
40
41
42
43
44







-
+
-




-
-
+
+
+
+
+








;; fake out readline usage of toplevel-command
(define (toplevel-command . a) #f)

(use srfi-1 posix srfi-69 readline ;;  regex regex-case srfi-69 apropos json http-client directory-utils rpc typed-records;; (srfi 18) extras)
   srfi-19  srfi-18 extras format pkts regex regex-case
     (prefix dbi dbi:)
     nanomsg
     nanomsg)
     (prefix mtconfigf configf:))

(declare (uses common))
(declare (uses megatest-version))
(declare (uses margs))
;; (declare (uses configf))
;; (declare (uses rmt))
;; (declare (uses rmt))

;; mtconfigf is compiled in as a compilation unit
(declare (uses mtconfigf))
(import (prefix mtconfigf configf:))

(use ducttape-lib)

(include "megatest-fossil-hash.scm")

(require-library stml)