Overview
| SHA1 Hash: | 9058dc274368d64d4d681dc41d911db249432a86 |
|---|---|
| Date: | 2012-04-30 16:22:31 |
| User: | mrwellan |
| Comment: | Added unit tests back. Tweaked a few to get them to run again |
| Timelines: | family | ancestors | v1.43 |
| Diffs: | root of this branch |
| Downloads: | Tarball | ZIP archive |
| Other Links: | files | file ages | manifest |
Tags And Properties
- branch=v1.43 inherited from [ea26754ba2]
- sym-v1.43 inherited from [ea26754ba2]
Changes
Modified tests/Makefile from [02211f7dd5a59bb9] to [283dcbd27be3baa5].
3 BINPATH=$(shell realpath ../bin) 3 BINPATH=$(shell realpath ../bin) 4 MEGATEST=$(BINPATH)/megatest 4 MEGATEST=$(BINPATH)/megatest 5 PATH := $(BINPATH):$(PATH) 5 PATH := $(BINPATH):$(PATH) 6 RUNNAME := $(shell date +w%V.%u.%H.%M) 6 RUNNAME := $(shell date +w%V.%u.%H.%M) 7 IPADDR := "-" 7 IPADDR := "-" 8 # Set SERVER to "-server -" 8 # Set SERVER to "-server -" 9 SERVER := 9 SERVER := > 10 DEBUG := 1 10 11 11 runall : test1 test2 | 12 all : test1 test 2 test3 12 13 13 test1 : cleanprep 14 test1 : cleanprep > 15 mkdir -p simplelinks simpleruns > 16 cd simplerun;echo '(load "../tests.scm")' | $(MEGATEST) -repl -debug $(D > 17 > 18 test2 : fullprep 14 cd fullrun;$(MEGATEST) -runtests ez_pass -reqtarg ubuntu/nfs/none :runna 19 cd fullrun;$(MEGATEST) -runtests ez_pass -reqtarg ubuntu/nfs/none :runna 15 20 16 test2 : cleanprep | 21 test3 : fullprep 17 cd fullrun;$(MEGATEST) -runtests runfirst -reqtarg ubuntu/nfs/none :runn 22 cd fullrun;$(MEGATEST) -runtests runfirst -reqtarg ubuntu/nfs/none :runn 18 23 19 test3 : cleanprep | 24 test4 : fullprep 20 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 25 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 21 26 22 test4 : cleanprep | 27 test5 : fullprep 23 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 28 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 24 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 29 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 25 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 30 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 26 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 31 cd fullrun;$(MEGATEST) -runall -reqtarg ubuntu/nfs/none :runname $(RUNNA 27 cd fullrun;$(MEGATEST) -runtests runfirst -itempatt %/1 -reqtarg ubuntu/ 32 cd fullrun;$(MEGATEST) -runtests runfirst -itempatt %/1 -reqtarg ubuntu/ 28 cd fullrun;$(MEGATEST) -runtests runfirst -itempatt %blahha% -reqtarg ub 33 cd fullrun;$(MEGATEST) -runtests runfirst -itempatt %blahha% -reqtarg ub 29 34 30 cleanprep : ../*.scm Makefile *.config | 35 cleanprep : ../*.scm Makefile */*.config 31 sqlite3 megatest.db "delete from metadat where var='SERVER';" 36 sqlite3 megatest.db "delete from metadat where var='SERVER';" 32 mkdir -p /tmp/mt_runs /tmp/mt_links 37 mkdir -p /tmp/mt_runs /tmp/mt_links 33 cd ..;make install 38 cd ..;make install 34 cd fullrun;$(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% - < 35 cd fullrun;$(BINPATH)/dboard -rows 15 & < 36 touch cleanprep 39 touch cleanprep 37 40 38 test : | 41 fullprep : cleanprep 39 csi -b -I .. ../megatest.scm -- -runall -target ubuntu/afs/tmp :runname | 42 cd fullrun;$(MEGATEST) -remove-runs :runname $(RUNNAME)% -target %/%/% - 40 cd ../;make test | 43 cd fullrun;$(BINPATH)/dboard -rows 15 & 41 make runall < 42 44 43 dashboard : | 45 dashboard : cleanprep 44 cd ../;make install < 45 cd fullrun;$(BINPATH)/dboard & | 46 cd fullrun && $(BINPATH)/dboard & 46 47 47 remove : 48 remove : 48 (cd ../;make);cd fullrun;$(MEGATEST) -remove-runs :runname $(RUN) -test | 49 cd fullrun;$(MEGATEST) -remove-runs :runname $(RUN) -testpatt % -itempa 49 50 50 clean : 51 clean : 51 rm cleanprep 52 rm cleanprep 52 53 53 runforever : 54 runforever : 54 while(ls); do runname=`date +%F-%R:%S`;(cd fullrun;$(MEGATEST) -runall - 55 while(ls); do runname=`date +%F-%R:%S`;(cd fullrun;$(MEGATEST) -runall -
Modified tests/simplerun/megatest.config from [12e33187cae74b02] to [c650ee9676b1325c].
4 4 5 [setup] 5 [setup] 6 # Adjust max_concurrent_jobs to limit how much you load your machines 6 # Adjust max_concurrent_jobs to limit how much you load your machines 7 max_concurrent_jobs 50 7 max_concurrent_jobs 50 8 8 9 # This is your link path, you can move it but it is generally better to keep it 9 # This is your link path, you can move it but it is generally better to keep it 10 linktree ../simplelinks 10 linktree ../simplelinks > 11 > 12 # Valid values for state and status for steps, NB// It is not recommended you us > 13 [validvalues] > 14 state start end completed 11 15 12 # Job tools are more advanced ways to control how your jobs are launched 16 # Job tools are more advanced ways to control how your jobs are launched 13 [jobtools] 17 [jobtools] 14 useshell yes 18 useshell yes 15 launcher nbfind 19 launcher nbfind 16 20 17 # You can override environment variables for all your tests here 21 # You can override environment variables for all your tests here 18 [env-override] 22 [env-override] 19 EXAMPLE_VAR example value 23 EXAMPLE_VAR example value 20 24 21 # As you run more tests you may need to add additional disks, the names are arbi 25 # As you run more tests you may need to add additional disks, the names are arbi 22 [disks] 26 [disks] 23 disk0 ../simpleruns 27 disk0 ../simpleruns
Name change from from tests/test.config to tests/simplerun/test.config.
Deleted tests/test.config version [5ec648d029f77479]
1 [section1] < 2 1 ./blah < 3 < 4 [section2] < 5 < 6 # A comment < 7 < 8 [disks] < 9 1 ./ < 10 < 11 [validvalues] < 12 state start end aborted < 13 status pass fail n/a < 14 < 15 [include a file that doesn't exist] < 16 < 17 < 18 blah nada < 19 < 20 # now inlcude a file tha tdoes exist < 21 [include megatest.config] < 22 < 23 [metadata] < 24 description This is a multiline < 25 description. The leading whitespace is discarded < 26 irrespective of amount of indenting. < 27 This line is indented more. < 28 < 29 < 30 author matt < 31 lastreview never <
Modified tests/tests.scm from [d03a123d61f75f7a] to [f9eb2206b3c7aaf3].
1 (use test) < 2 ;; (require-library args) | 1 (require-extension test) 3 < 4 (include "../megatest.scm") < 5 (include "../common.scm") < 6 (include "../keys.scm") < 7 (include "../db.scm") < 8 (include "../configf.scm") < 9 (include "../process.scm") < 10 (include "../launch.scm") < 11 (include "../items.scm") < 12 (include "../runs.scm") < 13 (include "../runconfig.scm") < 14 (include "../megatest-version.scm") < 15 2 16 (define test-work-dir (current-directory)) 3 (define test-work-dir (current-directory)) 17 4 18 (define conffile #f) 5 (define conffile #f) 19 (test "Read a config" #t (hash-table? (read-config "test.config" #f #f))) 6 (test "Read a config" #t (hash-table? (read-config "test.config" #f #f))) 20 (test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.conf 7 (test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.conf 21 8 ................................................................................................................................................................................ 59 (list "pass" "fail" "n/a")) 46 (list "pass" "fail" "n/a")) 60 47 61 (test "write env files" "nada.csh" (begin 48 (test "write env files" "nada.csh" (begin 62 (save-environment-as-files "nada") 49 (save-environment-as-files "nada") 63 (and (file-exists? "nada.sh") 50 (and (file-exists? "nada.sh") 64 (file-exists? "nada.csh")))) 51 (file-exists? "nada.csh")))) 65 52 66 (test "get all legal tests" (list "runfirst" "runwithfirst" "singletest" "single | 53 (test "get all legal tests" (list "test1" "test2") (sort (get-all-legal-tests) s 67 54 68 (test "register-test, test info" "NOT_STARTED" 55 (test "register-test, test info" "NOT_STARTED" 69 (begin 56 (begin 70 (register-test *db* 1 "nada" "" '("tag1" "tag2" "tag3")) | 57 (tests:register-test *db* 1 "nada" "") 71 (test:get-state (db:get-test-info *db* 1 "nada" "")))) | 58 (vector-ref (db:get-test-info *db* 1 "nada" "") 3))) 72 59 73 (test "get-keys" "sysname" (key:get-fieldname (car (sort (db-get-keys *db*)(lamb | 60 (test "get-keys" "SYSTEM" (vector-ref (car (db:get-keys *db*)) 0));; (key:get-fi 74 61 75 (define remargs (args:get-args 62 (define remargs (args:get-args 76 '("bar" "foo" ":runname" "bob" ":sysname" "ubuntu" ":fsname" "n 63 '("bar" "foo" ":runname" "bob" ":sysname" "ubuntu" ":fsname" "n 77 (list ":runname" ":state" ":status") 64 (list ":runname" ":state" ":status") 78 (list "-h") 65 (list "-h") 79 args:arg-hash 66 args:arg-hash 80 0)) 67 0)) 81 68 82 (test "register-run" #t (number? (register-run *db* (db-get-keys *db*)))) | 69 (test "register-run" #t (number? (runs:register-run *db* 83 (define keys (db-get-keys *db*)) | 70 (db:get-keys *db*) > 71 '(("SYSTEM" "key1")("OS" "ke > 72 "myrun" > 73 "new" > 74 "n/a" > 75 "bob"))) > 76 (define keys (db:get-keys *db*)) 84 77 85 ;;(test "update-test-info" #t (test-update-meta-info *db* 1 "nada" 78 ;;(test "update-test-info" #t (test-update-meta-info *db* 1 "nada" 86 (setenv "BLAHFOO" "1234") 79 (setenv "BLAHFOO" "1234") 87 (unsetenv "NADAFOO") 80 (unsetenv "NADAFOO") 88 (test "env temp overrides" "xyz" (let ((prevvals (alist->env-vars '(("BLAHFOO" 4 81 (test "env temp overrides" "xyz" (let ((prevvals (alist->env-vars '(("BLAHFOO" 4 89 (result (get-environment-variable "NADA 82 (result (get-environment-variable "NADA 90 (alist->env-vars prevvals) 83 (alist->env-vars prevvals)