Megatest

Check-in [831718d65c]
Login
Overview
Comment:updated repository-path to work for any chicken number
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: 831718d65cba687552b3d1279265b487789abf06
User & Date: bjbarcla on 2019-01-07 17:21:12
Other Links: branch diff | manifest | tags
Context
2019-01-17
15:43
wip check-in: a42ae2762b user: bjbarcla tags: v2.01-local-mtfiles, v2.01-try-1
2019-01-07
17:21
updated repository-path to work for any chicken number check-in: 831718d65c user: bjbarcla tags: v2.01-local-mtfiles, v2.01-try-1
11:51
added modules to launch.scm and portlogger.scm and tasks.scm; eliminating various stack dumps check-in: 650916aff7 user: bjbarcla tags: v2.01-local-mtfiles, v2.01-try-1
Changes

Modified Makefile from [2e44e1293a] to [ac31ce093c].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# rm <files>.o ; make install CSCOPTS='-profile' ; ... ;  chicken-profile | less
SHELL=/bin/bash
PREFIX=$(PWD)/tmpinstall

INSTALL=install
SRCFILES = common.scm items.scm launch.scm \
   ods.scm runconfig.scm server.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








|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# rm <files>.o ; make install CSCOPTS='-profile' ; ... ;  chicken-profile | less
SHELL=/bin/bash
PREFIX=$(PWD)/tmpinstall

INSTALL=install
SRCFILES = common.scm items.scm launch.scm \
   ods.scm runconfig.scm server.scm \
   db.scm keys.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

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
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 = $(MSRCFILES:%.scm=%.o)



%.o : %.scm ../adat.scm $(MTEGGS)
	csc $(CSCOPTS) -J -c $< -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}')

MT_EGGS_BASE=$(PREFIX)/eggs
MT_EGGS_DIR=$(MT_EGGS_BASE)/lib/chicken/7
MTEGGS=$(MT_EGGS_DIR)/mtconfigf.so $(MT_EGGS_DIR)/mtdebug.so
CHICKEN_REPOSITORY=$(MT_EGGS_DIR)
export CHICKEN_REPOSITORY
#CSCOPTS=-Wl,-rpath,$(MT_EGGS_DIR)


# prefix commands with $(withenv) following as a means to collect env vars for compilation...
withenv=CHICKEN_REPOSITORY=$(MT_EGGS_DIR) 







|










|
|







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
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 = $(MSRCFILES:%.scm=%.o)

CHICKEN_NUMBER = $(shell csi -e '(print (car (reverse (string-split  (repository-path) "/"))))')

%.o : %.scm ../adat.scm $(MTEGGS)
	csc $(CSCOPTS) -J -c $< -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}')

MT_EGGS_BASE=$(PREFIX)/eggs
MT_EGGS_DIR=$(MT_EGGS_BASE)/lib/chicken/$(CHICKEN_NUMBER)
MTEGGS=$(MT_EGGS_DIR)/mtconfigf.so $(MT_EGGS_DIR)/mtdebug.so $(MT_EGGS_DIR)/mtargs.so
CHICKEN_REPOSITORY=$(MT_EGGS_DIR)
export CHICKEN_REPOSITORY
#CSCOPTS=-Wl,-rpath,$(MT_EGGS_DIR)


# prefix commands with $(withenv) following as a means to collect env vars for compilation...
withenv=CHICKEN_REPOSITORY=$(MT_EGGS_DIR) 
80
81
82
83
84
85
86


87
88
89
90
91
92
93
# ARCHSTR=$(shell uname -m)_$(shell uname -r)
# BASH_MACHTYPE=$(shell bash -c "echo \$$MACHTYPE")
# ARCHSTR=$(BASH_MACHTYPE)_$(shell lsb_release -sr)
ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi)
# ARCHSTR=$(shell bash -c "echo \$$MACHTYPE")

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



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

mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MTEGGS)
	csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest








>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# ARCHSTR=$(shell uname -m)_$(shell uname -r)
# BASH_MACHTYPE=$(shell bash -c "echo \$$MACHTYPE")
# ARCHSTR=$(BASH_MACHTYPE)_$(shell lsb_release -sr)
ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi)
# ARCHSTR=$(shell bash -c "echo \$$MACHTYPE")

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

$(MOFILES): $(MTEGGS) $(MT_EGGS_DIR)/types.db

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

mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MTEGGS)
	csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
	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 \
	rpc-transport.o \







<







129
130
131
132
133
134
135

136
137
138
139
140
141
142
	db.o \
	env.o \
	http-transport.o \
	items.o \
	keys.o \
	launch.o \
	lock-queue.o \

	mt.o \
	megatest-version.o \
	ods.o \
	portlogger.o \
	process.o \
	rmt.o \
	rpc-transport.o \
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
tests.o db.o launch.o runs.o dashboard-tests.o dashboard-context-menu.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o  \
archive.o megatest.o : db_records.scm
tests.o runs.o dashboard.o dashboard-tests.o dashboard-context-menu.o dashboard-main.o  : run_records.scm
db.o ezsteps.o keys.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests.o : key_records.scm
tests.o tasks.o dashboard-tasks.o : task_records.scm
runs.o : test_records.scm
megatest.o : megatest-fossil-hash.scm
rmt.scm client.scm common.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm $(MTEGGS)
common_records.scm : altdb.scm modules.scm
vg.o dashboard.o : vg_records.scm
dcommon.o : run_records.scm
# Temporary while transitioning to new routine
# runs.o : run-tests-queue-classic.scm  run-tests-queue-new.scm

megatest-fossil-hash.scm : $(SRCFILES) megatest.scm *_records.scm
	echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new







|
|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
tests.o db.o launch.o runs.o dashboard-tests.o dashboard-context-menu.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o  \
archive.o megatest.o : db_records.scm
tests.o runs.o dashboard.o dashboard-tests.o dashboard-context-menu.o dashboard-main.o  : run_records.scm
db.o ezsteps.o keys.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests.o : key_records.scm
tests.o tasks.o dashboard-tasks.o : task_records.scm
runs.o : test_records.scm
megatest.o : megatest-fossil-hash.scm
rmt.scm client.scm common.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm $(MTEGGS) $(MT_EGGS_DIR)/types.db
common_records.scm : altdb.scm modules.scm 
vg.o dashboard.o : vg_records.scm
dcommon.o : run_records.scm
# Temporary while transitioning to new routine
# runs.o : run-tests-queue-classic.scm  run-tests-queue-new.scm

megatest-fossil-hash.scm : $(SRCFILES) megatest.scm *_records.scm
	echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new
355
356
357
358
359
360
361
362

363
364
365
366
367
368
369
$(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 mtut.o \
	*.import.scm mofiles/*.import.scm *.bak *~ *-original *-merge *-baseline


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

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







|
>







356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
$(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 mtut.o \
	*.import.scm mofiles/*.import.scm *.bak *~ *-original *-merge *-baseline \
        rm -rf $(PREFIX)/*

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

# vg_records.scm : records.sh
#	./records.sh
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
sd : datashare-testing/sd
	mkdir -p /tmp/$(USER)/datashare/disk1 /tmp/$(USER)/basepath

xterm : sd
	(export BASEPATH=/tmp/$(USER)/basepath ; export PATH="$(PWD)/datashare-testing:$(PATH)" ; xterm &)

datashare-testing/spublish : spublish.scm $(OFILES) modules.scm
	csc $(CSCOPTS) spublish.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/spublish

datashare-testing/sretrieve : sretrieve.scm $(OFILES) modules.scm
	csc $(CSCOPTS) sretrieve.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/sretrieve


datashare-testing/sauthorize : sauthorize.scm $(OFILES) modules.scm
	 csc $(CSCOPTS) sauthorize.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/sauthorize

sauth-init:
	mkdir -p  datashare-testing
	rm  datashare-testing/sauthorize
	rm  datashare-testing/sretrieve 
	rm  datashare-testing/spublish








|


|



|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
sd : datashare-testing/sd
	mkdir -p /tmp/$(USER)/datashare/disk1 /tmp/$(USER)/basepath

xterm : sd
	(export BASEPATH=/tmp/$(USER)/basepath ; export PATH="$(PWD)/datashare-testing:$(PATH)" ; xterm &)

datashare-testing/spublish : spublish.scm $(OFILES) modules.scm
	csc $(CSCOPTS) spublish.scm  megatest-version.o  process.o common.o  -o datashare-testing/spublish

datashare-testing/sretrieve : sretrieve.scm $(OFILES) modules.scm
	csc $(CSCOPTS) sretrieve.scm  megatest-version.o process.o common.o  -o datashare-testing/sretrieve


datashare-testing/sauthorize : sauthorize.scm $(OFILES) modules.scm
	 csc $(CSCOPTS) sauthorize.scm  megatest-version.o process.o common.o  -o datashare-testing/sauthorize

sauth-init:
	mkdir -p  datashare-testing
	rm  datashare-testing/sauthorize
	rm  datashare-testing/sretrieve 
	rm  datashare-testing/spublish

454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
	if  csi -ne '(use mysql-client)';then \
           echo "(use mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \
	fi
	if csi -ne '(use postgresql)';then \
	   echo "(use postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\
	fi

portlogger-example : portlogger-example.scm api.o archive.o client.o common.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
	csc $(CSCOPTS) portlogger-example.scm api.o archive.o client.o common.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o

# create a pdf dot graphviz diagram from notations in rmt.scm
rmt.pdf : rmt.scm
	grep ';;DOT' rmt.scm | sed -e 's/.*;;DOT //' > rmt.dot;dot -Tpdf rmt.dot -o rmt.pdf

buildmanual:
	cd docs/manual && make







|
|







456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
	if  csi -ne '(use mysql-client)';then \
           echo "(use mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \
	fi
	if csi -ne '(use postgresql)';then \
	   echo "(use postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\
	fi

portlogger-example : portlogger-example.scm api.o archive.o client.o common.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
	csc $(CSCOPTS) portlogger-example.scm api.o archive.o client.o common.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o

# create a pdf dot graphviz diagram from notations in rmt.scm
rmt.pdf : rmt.scm
	grep ';;DOT' rmt.scm | sed -e 's/.*;;DOT //' > rmt.dot;dot -Tpdf rmt.dot -o rmt.pdf

buildmanual:
	cd docs/manual && make

Modified common.scm from [82e0096af3] to [b9bcfdcae7].

56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
           (else (car argv))))
         (fullpath (realpath this-script)))
    fullpath))
(define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
(define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
(define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))


(let* ((libpath (conc *common:this-exe-dir* "/../../eggs/lib/chicken/7")))
  (if (and (not (get-environment-variable "CHICKEN_REPOSITORY"))
           (directory-exists? libpath))
      (repository-path libpath)))



;;(declare (uses mtconfigf))







>
|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
           (else (car argv))))
         (fullpath (realpath this-script)))
    fullpath))
(define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
(define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
(define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))

(let* ((libpath-number (car (reverse (string-split  (repository-path) "/"))))
       (libpath (conc *common:this-exe-dir* "/../../eggs/lib/chicken/" libpath-number)))
  (if (and (not (get-environment-variable "CHICKEN_REPOSITORY"))
           (directory-exists? libpath))
      (repository-path libpath)))



;;(declare (uses mtconfigf))

Modified modules.scm from [600e488be2] to [4ab26bda3c].

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
(use (prefix mtargs    args:))
(use mtdebug)
(use (prefix mtconfigf configf:))

;; 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 "-debug") (debug:set-debug-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))))

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

(define *add-eval-string-check* #f)
(cond
 ((not *add-eval-string-check*)
  (configf:add-eval-string "(import (prefix mtargs    args:))
                          (import mtdebug)
                          (import (prefix mtconfigf configf:))")
  (set! *add-eval-string-check* #t)))







|













<
<
<
|


<
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40



41
42
43

(use (prefix mtargs    args:))
(use mtdebug)
(use (prefix mtconfigf configf:))

;; 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 "-debug") (debug:set-verbosity (args:get-arg "-debug")))
(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))))

;; configure 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:))")