Megatest

Diff
Login

Differences From Artifact [706f96cbe4]:

To Artifact [e03fe5c6f8]:


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







-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+

+

-
+














+
+

+
+
+
-
+



+
+
+








# make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)'
# rm <files>.o ; make install CSCOPTS='-profile' ; ... ;  chicken-profile | less
SHELL=/bin/bash
PREFIX=$(PWD)
CSCOPTS=
INSTALL=install
SRCFILES = common.scm items.scm launch.scm \
   ods.scm runconfig.scm server.scm configf.scm \
   db.scm keys.scm margs.scm megatest-version.scm \
   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 
#SRCFILES = common.scm items.scm launch.scm \
#   ods.scm runconfig.scm server.scm configf.scm \
#   db.scm keys.scm margs.scm megatest-version.scm \
#   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 
SRCFILES=

# removed from MSRCFILES: ftail.scm
# module source files
MSRCFILES = ftail.scm rmtmod.scm commonmod.scm apimod.scm archivemod.scm clientmod.scm configfmod.scm dbmod.scm dcommonmod.scm envmod.scm ezstepsmod.scm itemsmod.scm keysmod.scm launchmod.scm odsmod.scm processmod.scm runconfigmod.scm runsmod.scm servermod.scm subrunmod.scm tasksmod.scm testsmod.scm vgmod.scm megamod.scm
MSRCFILES = rmtmod.scm commonmod.scm apimod.scm archivemod.scm clientmod.scm configfmod.scm dbmod.scm dcommonmod.scm envmod.scm ezstepsmod.scm itemsmod.scm keysmod.scm launchmod.scm odsmod.scm processmod.scm runconfigmod.scm runsmod.scm servermod.scm subrunmod.scm tasksmod.scm testsmod.scm vgmod.scm megamod.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))
# compiled import files
MOIMPFILES = $(MSRCFILES:%.scm=%.import.o)

%.import.o : %.import.scm
	csc -unit $*.import -c $*.import.scm -o $*.import.o

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

# a.import.o : a.import.scm a.o
# csc -unit a.import -c a.import.scm -o $*.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}')

ifeq ($(MTESTHASH),)
$(error MTESTHASH is broken!)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124































125
126
127


128
129
130
131
132
133
134
81
82
83
84
85
86
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137


138
139
140
141
142
143
144
145
146







+
-
-
+
+




+
-
-
+
+

-
-
+
+

-
-
+
+


-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-
-
+
+








PNGFILES = $(shell cd docs/manual;ls *png)

#all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard
all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut tcmt

# why were the files  mofiles/ftail.o mofiles/rmtmod.o mofiles/commonmod.o listed on this target when MOFILES are there?
# Removed non module .o files (i.e. $(OFILES)
mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES)
	csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest
mtest: readline-fix.scm megatest.o $(MOFILES) $(MOIMPFILES)
	csc $(CSCOPTS) $(MOFILES) $(MOIMPFILES) megatest.o -o mtest

showmtesthash:
	@echo $(MTESTHASH)

# removing $(GOFILES)
dboard : $(OFILES) $(GOFILES) dashboard.scm $(MOFILES)
	csc $(CSCOPTS) $(OFILES) dashboard.scm $(GOFILES) $(MOFILES) -o dboard
dboard : dashboard.scm $(MOFILES) $(MOIMPFILES)
	csc $(CSCOPTS) dashboard.scm $(MOFILES) $(MOIMPFILES) -o dboard

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

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


TCMTOBJS = \
	api.o \
	archive.o \
	cgisetup/models/pgdb.o \
	client.o \
	common.o \
	configf.o \
	db.o \
	env.o \
	http-transport.o \
	items.o \
	keys.o \
	launch.o \
	lock-queue.o \
	margs.o \
	mt.o \
	megatest-version.o \
	ods.o \
	portlogger.o \
	process.o \
	rmt.o \
        $(MOFILES) \
        rpc-transport.o \
	runconfig.o \
	runs.o \
	server.o \
	tasks.o \
	tdb.o \
	tests.o \
	subrun.o \

#TCMTOBJS = \
#	api.o \
#	archive.o \
#	cgisetup/models/pgdb.o \
#	client.o \
#	common.o \
#	configf.o \
#	db.o \
#	env.o \
#	http-transport.o \
#	items.o \
#	keys.o \
#	launch.o \
#	lock-queue.o \
#	margs.o \
#	mt.o \
#	megatest-version.o \
#	ods.o \
#	portlogger.o \
#	process.o \
#	rmt.o \
#        $(MOFILES) \
#        rpc-transport.o \
#	runconfig.o \
#	runs.o \
#	server.o \
#	tasks.o \
#	tdb.o \
#	tests.o \
#	subrun.o \
TCMTOBJS=

tcmt : $(TCMTOBJS) tcmt.scm
	csc $(CSCOPTS) $(TCMTOBJS) tcmt.scm -o tcmt
tcmt : $(TCMTOBJS) $(MOFILES) tcmt.scm
	csc $(CSCOPTS) $(MOFILES) $(TCMTOBJS) tcmt.scm -o tcmt

# install documentation to $(PREFIX)/docs
# DOES NOT REBUILD DOCS
#
$(PREFIX)/share/docs/megatest_manual.html : docs/manual/megatest_manual.html
	mkdir -p $(PREFIX)/share/docs
	$(INSTALL) docs/manual/megatest_manual.html $(PREFIX)/share/docs/megatest_manual.html
168
169
170
171
172
173
174

175
176
177
178
179
180
181
182
183
180
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195







+

-







# for the modularized stuff

mofiles/commonmod.o : megatest-fossil-hash.scm
mofiles/dbmod.o     : mofiles/commonmod.o mofiles/keysmod.o mofiles/tasksmod.o mofiles/odsmod.o
mofiles/commonmod.o : mofiles/configfmod.o mofiles/processmod.o
mofiles/rmtmod.o    : mofiles/dbmod.o mofiles/commonmod.o mofiles/apimod.o
mofiles/apimod.o    : mofiles/megamod.o mofiles/dbmod.o
# Removed from megamod.o dep:   mofiles/ftail.o
mofiles/megamod.o   : \
   mofiles/ftail.o \
   mofiles/rmtmod.o \
   mofiles/commonmod.o \
   mofiles/apimod.o \
   mofiles/archivemod.o \
   mofiles/clientmod.o \
   mofiles/configfmod.o \
   mofiles/dbmod.o \
191
192
193
194
195
196
197
198


199
200
201
202
203
204
205
203
204
205
206
207
208
209

210
211
212
213
214
215
216
217
218







-
+
+







   mofiles/processmod.o \
   mofiles/runconfigmod.o \
   mofiles/runsmod.o \
   mofiles/servermod.o \
   mofiles/subrunmod.o \
   mofiles/tasksmod.o \
   mofiles/testsmod.o \
   mofiles/vgmod.o
   mofiles/vgmod.o \
   *-inc.scm

# $(MOFILES) : mofiles/commonmod.o

megatest-fossil-hash.scm : $(SRCFILES) megatest.scm *_records.scm
	echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new
	if ! diff -q megatest-fossil-hash.new megatest-fossil-hash.scm ; then echo copying .new to .scm;cp -f megatest-fossil-hash.new megatest-fossil-hash.scm;fi

231
232
233
234
235
236
237
238
239


240
241
242
243
244
245
246
244
245
246
247
248
249
250


251
252
253
254
255
256
257
258
259







-
-
+
+








$(PREFIX)/bin/mtutil : $(PREFIX)/bin/.$(ARCHSTR)/mtut utils/mk_wrapper
	utils/mk_wrapper $(PREFIX) mtut $(PREFIX)/bin/mtutil
	chmod a+x $(PREFIX)/bin/mtutil

# mtexec

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

$(PREFIX)/bin/.$(ARCHSTR)/mtexec : mtexec
	$(INSTALL) mtexec $(PREFIX)/bin/.$(ARCHSTR)/mtexec

$(PREFIX)/bin/mtexec : $(PREFIX)/bin/.$(ARCHSTR)/mtexec utils/mk_wrapper
	utils/mk_wrapper $(PREFIX) mtexec $(PREFIX)/bin/mtexec
	chmod a+x $(PREFIX)/bin/mtexec
355
356
357
358
359
360
361
362





363
364
365
366
367
368
369
370
371
368
369
370
371
372
373
374

375
376
377
378
379
380

381
382
383
384
385
386
387







-
+
+
+
+
+

-







	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 mtut tcmt ftail.import.scm readline-fix.scm serialize-env dboard dboard.o megatest.o dashboard.o megatest-fossil-hash.* altdb.scm mofiles/*.o vg.o
	rm -f $(OFILES) $(GOFILES) $(MOFILES) $(MOIMPFILES) $(TCMTOBJS) \
              $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil mtut \
              tcmt *.import.scm readline-fix.scm serialize-env dboard \
              dboard.o megatest.o dashboard.o megatest-fossil-hash.* \
              altdb.scm mofiles/*.o vg.o
	rm -rf share
	rm -f *.import.scm

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

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