Index: Makefile
==================================================================
--- Makefile
+++ Makefile
@@ -30,29 +30,39 @@
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
# module source files
-MSRCFILES = ftail.scm rmtmod.scm commonmod.scm
+# ftail.scm rmtmod.scm commonmod.scm removed
+MSRCFILES = ducttape-lib.scm pkts.scm stml2.scm cookie.scm mutils.scm mtargs.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
+EGGS=matchable readline aokpropos 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
+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)
-mofiles/%.o : %.scm
- mkdir -p mofiles
- csc $(CSCOPTS) -J -c $< -o mofiles/$*.o
+%.import.o : %.import.scm
+ csc $(CSCOPTS) -unit $*.import -c $*.import.scm -o $*.import.o
+
+mofiles/%.o %.import.scm : %.scm
+ @[ -e mofiles ] || mkdir -p mofiles
+ csc $(CSCOPTS) -I $* -J -c $< -o mofiles/$*.o
+ @touch $*.import.scm # ensure it is touched after the .o is made
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}')
@@ -72,12 +82,14 @@
PNGFILES = $(shell cd docs/manual;ls *png)
#all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard
all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut tcmt
-mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) mofiles/ftail.o mofiles/rmtmod.o mofiles/commonmod.o
- csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest
+# megatest.o : ducttape-lib.import.o
+
+mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MOIMPFILES)
+ csc $(CSCOPTS) $(OFILES) $(MOFILES) $(MOIMPFILES) megatest.o -o mtest
showmtesthash:
@echo $(MTESTHASH)
dboard : $(OFILES) $(GOFILES) dashboard.scm $(MOFILES)
@@ -122,11 +134,11 @@
tests.o \
subrun.o \
tcmt : $(TCMTOBJS) tcmt.scm
- csc $(CSCOPTS) $(TCMTOBJS) tcmt.scm -o tcmt
+ csc $(CSCOPTS) $(TCMTOBJS) $(MOFILES) $(MOIMPFILES) tcmt.scm -o tcmt
# install documentation to $(PREFIX)/docs
# DOES NOT REBUILD DOCS
#
$(PREFIX)/share/docs/megatest_manual.html : docs/manual/megatest_manual.html
@@ -149,26 +161,52 @@
#
# $(PREFIX)/bin/revtagfsl : utils/revtagfsl.scm
# csc utils/revtagfsl.scm -o $(PREFIX)/bin/revtagfsl
# Special dependencies for the includes
+common.o : commonmod.o
+
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 configf.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
+
common_records.scm : altdb.scm
+
+mofiles/stml2.o : mofiles/cookie.o
+
vg.o dashboard.o : vg_records.scm
+
dcommon.o : run_records.scm
+
+mofiles/stml2.o : mofiles/cookie.o
+
+# special include based modules
+mofiles/pkts.o : pkts/pkts.scm
+# mofiles/mtargs.o : mtargs/mtargs.scm
+# mofiles/mtconfigf.o : mtconfigf/mtconfigf.scm
+# mofiles/ulex.o : ulex/ulex.scm
+mofiles/mutils.o : mutils/mutils.scm
+mofiles/cookie.o : stml2/cookie.scm
+mofiles/stml2.o : stml2/stml2.scm
+
# Temporary while transitioning to new routine
# runs.o : run-tests-queue-classic.scm run-tests-queue-new.scm
# for the modularized stuff
-mofiles/rmtmod.o : mofiles/commonmod.o
+rmt.o : mofiles/ducttape-lib.o mofiles/pkts.o mofiles/stml2.o mofiles/mutils.o mofiles/mtargs.o
+# *-inc.scm
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
@@ -326,11 +364,17 @@
$(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) $(TCMTOBJS) \
+ $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil mtut \
+ tcmt readline-fix.scm serialize-env dboard dboard.o \
+ megatest.o dashboard.o megatest-fossil-hash.* altdb.scm \
+ mofiles/*.o vg.o commonmod.o cookie.o dashboard-main.o \
+ ducttape-lib.o ftail.o mutils.o pkts.o rmtmod.o stml2.o \
+ tcmt.o
rm -rf share
#======================================================================
# Make the records files
#======================================================================
Index: TODO
==================================================================
--- TODO
+++ TODO
@@ -13,25 +13,49 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see
A single, stand-alone, Megatest based testsuite or "area" is +sufficient for most validation, automation and build problems.
Megatest is designed as a distributed or decoupled system. This means +you can run the areas stand-alone with no additional +infrastructure. I.e. there are no databases, web servers or other +centralized resources needed. However as your needs grow you can +integrate multiple areas into a bigger system.
+Multi-area dashboard and xterm. A gui (the dashboard) is usually the + best option for controlling and launching runs but all operations + can also be done from the commandline. Note: The not yet released + multi-area dashboard replaces the old dashboard for browsing and + controlling runs but for managing a single area the old dashboard + works very well. +
++Area/testsuite. This is your testsuite or automation definition and + consists of the information in megatest.config, runconfigs.config + and your testconfigs along with any custom scripting that can’t be + done with the native Megatest features. +
++If your testsuite or build automation is too large to run on a + single instance you can distribute your jobs into a compute server + pool. The only current requirements are password-less ssh access and + a network filesystem. +
+$MT_MEGATEST -env2file .ezsteps/${stepname}
# You can include a common file +# +[include #{getenv MT_RUN_AREA_HOME}/global-testconfig.inc] + +# Use "var" for a scratch pad +# +[var] +dumpsql select * from data; +sepstr ..................................... + +# NOT IMPLEMENTED YET! +# +[ezsteps-addendum] +prescript something.sh +postscript something2.sh + +# Add additional steps here. Format is "stepname script" +[ezsteps] +importdb loaddb prod.db prod.sql +dumpprod dumpdata prod.db "#{get var dumpsql}" +diff (echo "prod#{get var sepstr}test";diff --side-by-side \ + dumpprod.log reference.log ;echo DIFFDONE) + +[scripts] +loaddb #!/bin/bash + sqlite3 $1 <<EOF + .mode tabs + .import $2 data + .q + EOF + +dumpdata #!/bin/bash + sqlite3 $1 <<EOF + .separator , + $2 + .q + EOF + +# Test requirements are specified here +[requirements] +waiton setup +priority 0 + +# Iteration for your test is controlled by the items section +# The complicated if is needed to allow processing of the config for the dashboard when there are no actual runs. +[items] +THINGNAME [system generatethings.sh | sort -u] + +# Logpro rules for each step can be captured here in the testconfig +# note: The ;; after the stepname and the leading whitespace are required +# +[logpro] +inputdb ;; + (expect:ignore in "LogFileBody" < 99 "Ignore error in comments" #/^\/\/.*error/) + (expect:warning in "LogFileBody" = 0 "Any warning" #/warn/) + (expect:required in "LogFileBody" > 0 "Some data found" #/^[a-z]{3,4}[0-9]+_r.*/) + +diff ;; + (expect:ignore in "LogFileBody" < 99 "Ignore error in comments" #/^\/\/.*error/) + (expect:warning in "LogFileBody" = 0 "Any warning" #/warn/) + (expect:error in "LogFileBody" = 0 "< or > indicate missing entry" (list #/(<|>)/ #/error/i)) + (expect:error in "LogFileBody" = 0 "Difference in data" (list #/\s+\|\s+/ #/error/i)) + (expect:required in "LogFileBody" > 0 "DIFFDONE Marker found" #/DIFFDONE/) + (expect:required in "LogFileBody" > 0 "Some things found" #/^[a-z]{3,4}[0-9]+_r.*/) + +# NOT IMPLEMENTED YET! +# +## Also: enhance logpro to take list of command files: file1,file2... +[waivers] +createprod{target=%78/%/%/%} ;; + (disable:required "DIFFDONE Marker found") + (disable:error "Some error") + (expect:waive in "LogFileBody" < 99 "Waive if failed due to version" #/\w+3\.6.*/) + +# test_meta is a section for storing additional data on your test +[test_meta] +author matt +owner matt +description Compare things +tags tagone,tagtwo +reviewed never+
In your testconfig or megatest.config triggers can be specified