Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -14,12 +14,16 @@ OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) ADTLSCR=mt_laststep mt_runstep mt_ezstep HELPERS=$(addprefix $(PREFIX)/bin/,$(ADTLSCR)) -DEPLOYHELPERS=$(addprefix $(DEPLOYTARG)/,$(ADTLSCR)) +DEPLOYHELPERS=$(addprefix deploytarg/,$(ADTLSCR)) MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}') + +CSIPATH=$(shell which csi) +CKPATH=$(shell dirname $(shell dirname $(CSIPATH))) + all : mtest dboard newdashboard mtest: $(OFILES) megatest.o csc $(CSCOPTS) $(OFILES) megatest.o -o mtest @@ -27,15 +31,24 @@ csc $(OFILES) dashboard.scm $(GOFILES) -o dboard newdashboard : newdashboard.scm $(OFILES) csc $(OFILES) newdashboard.scm -o newdashboard -$(DEPLOYTARG)/megatest : $(OFILES) megatest.o - csc -deployed $(CSCOPTS) $(OFILES) megatest.o -o $(DEPLOYTARG)/megatest +deploytarg/libiupcd.so : $(CKPATH)/lib/libiupcd.so + for i in iup im cd av call sqlite; do \ + cp $(CKPATH)/lib/lib$$i* deploytarg/ ; \ + done + cp $(CKPATH)/include/*.h deploytarg + +# puts deployed megatest in directory "megatest" +deploytarg/megatest : $(OFILES) megatest.o + csc -deploy $(CSCOPTS) $(OFILES) megatest.scm + rsync -av megatest/ deploytarg/ -$(DEPLOYTARG)/dashboard : $(OFILES) $(GOFILES) - csc -deployed $(OFILES) $(GOFILES) -o $(DEPLOYTARG)/dashboard +deploytarg/dashboard : $(OFILES) $(GOFILES) + csc -deploy $(OFILES) $(GOFILES) dashboard.scm + rsync -av dashboard/ deploytarg/ # Special dependencies for the includes tests.o db.o launch.o runs.o dashboard-tests.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o megatest.o : db_records.scm tests.o runs.o dashboard.o dashboard-tests.o dashboard-main.o : run_records.scm @@ -57,10 +70,13 @@ @echo Installing to PREFIX=$(PREFIX) $(INSTALL) mtest $(PREFIX)/bin/mtest utils/mk_wrapper $(PREFIX) mtest > $(PREFIX)/bin/megatest chmod a+x $(PREFIX)/bin/megatest +$(PREFIX)/bin/newdashboard : newdashboard + $(INSTALL) newdashboard $(PREFIX)/bin/newdashboard + $(HELPERS) : utils/mt_* $(INSTALL) $< $@ chmod a+x $@ $(DEPLOYHELPERS) : utils/mt_* @@ -73,15 +89,15 @@ $(PREFIX)/bin/nbfind : utils/nbfind $(INSTALL) $< $@ chmod a+x $@ -$(DEPLOYTARG)/nbfake : utils/nbfake +deploytarg/nbfake : utils/nbfake $(INSTALL) $< $@ chmod a+x $@ -$(DEPLOYTARG)/nbfind : utils/nbfind +deploytarg/nbfind : utils/nbfind $(INSTALL) $< $@ chmod a+x $@ # install dashboard as dboard so wrapper script can be called dashboard @@ -88,13 +104,22 @@ $(PREFIX)/bin/dboard : dboard $(FILES) $(INSTALL) dboard $(PREFIX)/bin/dboard utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard chmod a+x $(PREFIX)/bin/dashboard -install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake $(PREFIX)/bin/nbfind +install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdashboard + +deploytarg/apropos.so : Makefile + for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common zmq check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \ + chicken-install -prefix deploytarg -deploy $$i;done + +deploytarg/libsqlite3.so : + CSC_OPTIONS="-Ideploytarg -Ldeploytarg" $CHICKEN_INSTALL -prefix deploytarg -deploy sqlite3 + + -deploy : $(DEPLOYTARG)/megatest $(DEPLOYTARG)/dashboard $(DEPLOYHELPERS) $(DEPLOYTARG)/nbfake $(DEPLOYTARG)/nbfind +deploy : deploytarg/megatest deploytarg/dashboard $(DEPLOYHELPERS) deploytarg/nbfake deploytarg/nbfind deploytarg/libiupcd.so deploytarg/apropos.so bin : mkdir -p $(PREFIX)/bin ADDED docs/dashboard-and-other-windows.png Index: docs/dashboard-and-other-windows.png ================================================================== --- /dev/null +++ docs/dashboard-and-other-windows.png cannot compute difference between binary files ADDED docs/dashboard-small.png Index: docs/dashboard-small.png ================================================================== --- /dev/null +++ docs/dashboard-small.png cannot compute difference between binary files Index: docs/dashboard-test.png ================================================================== --- docs/dashboard-test.png +++ docs/dashboard-test.png cannot compute difference between binary files Index: docs/manual/megatest_manual.html ================================================================== --- docs/manual/megatest_manual.html +++ docs/manual/megatest_manual.html @@ -745,24 +745,20 @@

Dedication

-

Dedicated to my wife, Joanna, who has, for many years now, supported -all my wacky ideas and nutty projects with only the occasional grumble -and roll of the eyes.

+

Dedicated to my wife Joanna who has kindly supported my working on various projects over the years.

Thanks

-

To all the great people from the various places I’ve worked over the -years, thank you. I’ve benefitted from your patience and insight and I -hope that some of what I’ve learned from you has been incorporated -into Megatest.

-

Also, my thanks to all the wonderful open source creators. These -truly free projects, from Linux, xemacs, chicken scheme, and fossil to -asciidoc and bash are the philosophical and direct underpinnings of -the Megatest project.

+

Thank you the many people I’ve worked over the years who have +shared their knowledge and insights with me.

+

Thanks also to the creators of the various open source projects that +Megatest is built on. These include Linux, xemacs, chicken scheme, +fossil and asciidoc. Without these projects something like Megatest +would be difficult or impossible to do.

@@ -1004,10 +1000,10 @@

Index: docs/manual/megatest_manual.txt ================================================================== --- docs/manual/megatest_manual.txt +++ docs/manual/megatest_manual.txt @@ -7,26 +7,22 @@ [dedication] Dedication ========== -Dedicated to my wife, Joanna, who has, for many years now, supported -all my wacky ideas and nutty projects with only the occasional grumble -and roll of the eyes. +Dedicated to my wife Joanna who has kindly supported my working on various projects over the years. Thanks ------ -To all the great people from the various places I've worked over the -years, thank you. I've benefitted from your patience and insight and I -hope that some of what I've learned from you has been incorporated -into Megatest. - -Also, my thanks to all the wonderful open source creators. These -truly free projects, from Linux, xemacs, chicken scheme, and fossil to -asciidoc and bash are the philosophical and direct underpinnings of -the Megatest project. +Thank you the many people I've worked over the years who have +shared their knowledge and insights with me. + +Thanks also to the creators of the various open source projects that +Megatest is built on. These include Linux, xemacs, chicken scheme, +fossil and asciidoc. Without these projects something like Megatest +would be difficult or impossible to do. [preface] Preface ======= This book is organised as three sub-books; getting started, writing tests and reference. ADDED docs/megatest-training.odp Index: docs/megatest-training.odp ================================================================== --- /dev/null +++ docs/megatest-training.odp cannot compute difference between binary files ADDED docs/megatest-training.pdf Index: docs/megatest-training.pdf ================================================================== --- /dev/null +++ docs/megatest-training.pdf cannot compute difference between binary files ADDED docs/new-dashboard.png Index: docs/new-dashboard.png ================================================================== --- /dev/null +++ docs/new-dashboard.png cannot compute difference between binary files ADDED example/megatest.config Index: example/megatest.config ================================================================== --- /dev/null +++ example/megatest.config @@ -0,0 +1,24 @@ +[fields] +PLATFORM TEXT +OS TEXT + +[setup] +# Adjust max_concurrent_jobs to limit parallel jobs +max_concurrent_jobs 50 + +# This is your link path, best to set it and then not change it +linktree #{getenv PWD}/linktree + +# Job tools control how your jobs are launched +[jobtools] +useshell yes +launcher nbfind + +# You can override environment variables for all your tests here +[env-override] +EXAMPLE_VAR example value + +# As you run more tests you may need to add additional disks +# the names are arbitrary but must be unique +[disks] +disk0 #{getenv PWD}/runs ADDED example/runconfigs.config Index: example/runconfigs.config ================================================================== --- /dev/null +++ example/runconfigs.config @@ -0,0 +1,6 @@ +[default] +ALLTESTS see this variable + +# Your variables here are grouped by targets [SYSTEM/RELEASE] +[SYSTEM_val/RELEASE_val] +ANOTHERVAR only defined if target is SYSTEM_val/RELEASE_val ADDED example/tests/checkspace/checkspace.logpro Index: example/tests/checkspace/checkspace.logpro ================================================================== --- /dev/null +++ example/tests/checkspace/checkspace.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/adequate space/) + ADDED example/tests/checkspace/checkspace.sh Index: example/tests/checkspace/checkspace.sh ================================================================== --- /dev/null +++ example/tests/checkspace/checkspace.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e +freespace=`df -k $DIRECTORY | grep $DIRECTORY | awk '{print $4}'` +if [[ $freespace -lt $REQUIRED ]];then + echo "ERROR: insufficient space on $DIRECTORY" + exit 1 +else + echo "There is adequate space on $DIRECTORY" +fi ADDED example/tests/checkspace/testconfig Index: example/tests/checkspace/testconfig ================================================================== --- /dev/null +++ example/tests/checkspace/testconfig @@ -0,0 +1,9 @@ +# Add steps here. Format is "stepname script" +[ezsteps] +checkspace checkspace.sh + +# Iteration for your tests are controlled by the items section +[itemstable] +DIRECTORY /tmp /opt +REQUIRED 1000000 100000 + ADDED mkdeploy/megatest.config Index: mkdeploy/megatest.config ================================================================== --- /dev/null +++ mkdeploy/megatest.config @@ -0,0 +1,28 @@ +[fields] +PLATFORM TEXT +OS TEXT +OSVER TEXT + +[setup] +# Adjust max_concurrent_jobs to limit parallel jobs +max_concurrent_jobs 20 + +# This is your link path, best to set it and then not change it +linktree #{getenv MT_RUN_AREA_HOME}/linktree + +# Job tools control how your jobs are launched +[jobtools] +useshell yes +launcher nbfind + +# As you run more tests you may need to add additional disks +# the names are arbitrary but must be unique +# +[disks] +disk0 #{getenv MT_RUN_AREA_HOME}/runs + +# put env-override last so definitions in site.config by default +# are added as env-override variables +# +[env-override] +[include site.config] ADDED mkdeploy/runconfigs.config Index: mkdeploy/runconfigs.config ================================================================== --- /dev/null +++ mkdeploy/runconfigs.config @@ -0,0 +1,9 @@ +[default] +TARGDIR_tmp /tmp +TARGDIR_opt /opt +TARGDIR_runs #{getenv MT_RUN_AREA_HOME}/runs +BUILDDIR #{getenv MT_RUN_AREA_HOME}/.. + +# Your variables here are grouped by targets [SYSTEM/RELEASE] +[SYSTEM_val/RELEASE_val] +ANOTHERVAR only defined if target is SYSTEM_val/RELEASE_val ADDED mkdeploy/tests/checkspace/checkspace.logpro Index: mkdeploy/tests/checkspace/checkspace.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/checkspace/checkspace.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/adequate space/) + ADDED mkdeploy/tests/checkspace/checkspace.sh Index: mkdeploy/tests/checkspace/checkspace.sh ================================================================== --- /dev/null +++ mkdeploy/tests/checkspace/checkspace.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e +freespace=`df -k /$DIRECTORY | grep $DIRECTORY | awk '{print $4}'` +if [[ $freespace -lt $REQUIRED ]];then + echo "ERROR: insufficient space on /$DIRECTORY" + exit 1 +else + echo "There is adequate space on /$DIRECTORY" +fi ADDED mkdeploy/tests/checkspace/testconfig Index: mkdeploy/tests/checkspace/testconfig ================================================================== --- /dev/null +++ mkdeploy/tests/checkspace/testconfig @@ -0,0 +1,11 @@ +# Add steps here. Format is "stepname script" +[ezsteps] +checkspace checkspace.sh + +# Iteration for your tests are controlled by the items section +# However it is impractical to code the actual directory here +# so use names here and dereference to variables in runconfigs +[itemstable] +DIRECTORY tmp opt runs +REQUIRED 100000 100000 1000000 + ADDED mkdeploy/tests/eggs/install.logpro Index: mkdeploy/tests/eggs/install.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/eggs/install.logpro @@ -0,0 +1,5 @@ +(expect:ignore in "LogFileBody" >= 0 "ignore setup-error-handling" #/setup-error-handling/) +(expect:ignore in "LogFileBody" >= 0 "ignore check-errors" (list #/check-errors/ #/type-errors/ #/srfi-4-errors/)) +(expect:error in "LogFileBody" = 0 "Any error" #/error/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/DONE/) + ADDED mkdeploy/tests/eggs/install.sh Index: mkdeploy/tests/eggs/install.sh ================================================================== --- /dev/null +++ mkdeploy/tests/eggs/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash -e +targpath=`megatest -test-paths -target $MT_TARGET :runname $MT_RUNNAME -testpatt executables/megatest` +chicken-install -prefix $targpath/megatest -deploy $EGGNAME +echo DONE ADDED mkdeploy/tests/eggs/testconfig Index: mkdeploy/tests/eggs/testconfig ================================================================== --- /dev/null +++ mkdeploy/tests/eggs/testconfig @@ -0,0 +1,12 @@ +# Add steps here. Format is "stepname script" +[ezsteps] +install install.sh + +[requirements] +waiton executables + +# Iteration for your tests are controlled by the items section +# However it is impractical to code the actual directory here +# so use names here and dereference to variables in runconfigs +[items] +EGGNAME apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common zmq check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile openssl lookup-table list-utils stack ADDED mkdeploy/tests/executables/addlibs.logpro Index: mkdeploy/tests/executables/addlibs.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/executables/addlibs.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/libchicken.so.6/) + ADDED mkdeploy/tests/executables/addlibs.sh Index: mkdeploy/tests/executables/addlibs.sh ================================================================== --- /dev/null +++ mkdeploy/tests/executables/addlibs.sh @@ -0,0 +1,10 @@ +#!/bin/bash -e + +CSIPATH=$(echo $(type csi)|awk '{print $3}') +CKPATH=$(dirname $(dirname $CSIPATH)) +rsync -av $EXECUTABLE/ ../deploytarg/ +for i in iup im cd av call sqlite; do + cp $(CKPATH)/lib/lib$i* ../deploytarg/ +done + +cp $(CKPATH)/include/*.h ../deploytarg/ ADDED mkdeploy/tests/executables/install.logpro Index: mkdeploy/tests/executables/install.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/executables/install.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/libchicken.so.6/) + ADDED mkdeploy/tests/executables/install.sh Index: mkdeploy/tests/executables/install.sh ================================================================== --- /dev/null +++ mkdeploy/tests/executables/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +unset LD_LIBRARY_PATH +rm -rf $EXECUTABLE +mkdir $EXECUTABLE +csc -deploy $EXECUTABLE +ls $EXECUTABLE ADDED mkdeploy/tests/executables/linksrc.logpro Index: mkdeploy/tests/executables/linksrc.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/executables/linksrc.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/Makefile/) + ADDED mkdeploy/tests/executables/linksrc.sh Index: mkdeploy/tests/executables/linksrc.sh ================================================================== --- /dev/null +++ mkdeploy/tests/executables/linksrc.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +rm -f *.scm *.o Makefile +ln -s $BUILDDIR/*.scm . +ln -s $BUILDDIR/Makefile . +ls Makefile *.scm ADDED mkdeploy/tests/executables/make_mt.logpro Index: mkdeploy/tests/executables/make_mt.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/executables/make_mt.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/mtest/) + ADDED mkdeploy/tests/executables/testconfig Index: mkdeploy/tests/executables/testconfig ================================================================== --- /dev/null +++ mkdeploy/tests/executables/testconfig @@ -0,0 +1,13 @@ +# Add steps here. Format is "stepname script" +[ezsteps] +linksrc linksrc.sh +make_mt make +install install.sh +addlibs addlibs.sh + +# Iteration for your tests are controlled by the items section +# However it is impractical to code the actual directory here +# so use names here and dereference to variables in runconfigs +[itemstable] +EXECUTABLE megatest dashboard + ADDED mkdeploy/tests/helpers/install.logpro Index: mkdeploy/tests/helpers/install.logpro ================================================================== --- /dev/null +++ mkdeploy/tests/helpers/install.logpro @@ -0,0 +1,3 @@ +(expect:error in "LogFileBody" = 0 "Any error" #/err/i) +(expect:required in "LogFileBody" = 1 "Sucess signature" #/adequate space/) + ADDED mkdeploy/tests/helpers/install.sh Index: mkdeploy/tests/helpers/install.sh ================================================================== --- /dev/null +++ mkdeploy/tests/helpers/install.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e +freespace=`df -k /$DIRECTORY | grep $DIRECTORY | awk '{print $4}'` +if [[ $freespace -lt $REQUIRED ]];then + echo "ERROR: insufficient space on /$DIRECTORY" + exit 1 +else + echo "There is adequate space on /$DIRECTORY" +fi ADDED mkdeploy/tests/helpers/testconfig Index: mkdeploy/tests/helpers/testconfig ================================================================== --- /dev/null +++ mkdeploy/tests/helpers/testconfig @@ -0,0 +1,11 @@ +# Add steps here. Format is "stepname script" +[ezsteps] +install install.sh + +# Iteration for your tests are controlled by the items section +# However it is impractical to code the actual directory here +# so use names here and dereference to variables in runconfigs +[itemstable] +DIRECTORY tmp opt runs +REQUIRED 100000 100000 1000000 +