Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -11,16 +11,17 @@ all : test1 test2 test3 test4 test5 test1 : cleanprep rm -f simplerun/megatest.db + rm -rf simplelinks/ simpleruns/ mkdir -p simplelinks simpleruns cd simplerun;cp ../../*_records.scm .;perl -pi.bak -e 's/define-inline/define/' *_records.scm cd simplerun;echo '(load "../tests.scm")' | $(MEGATEST) -repl -debug $(DEBUG) test2 : fullprep - cd fullrun;$(MEGATEST) -runtests ez_pass -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_a $(SERVER) + cd fullrun;$(MEGATEST) -runtests ez_pass,runfirst -reqtarg ubuntu/nfs/none -itempatt a/1 :runname $(RUNNAME)_a $(SERVER) test3 : fullprep cd fullrun;$(MEGATEST) -runtests runfirst -reqtarg ubuntu/nfs/none :runname $(RUNNAME)_b $(SERVER) -debug 10 test4 : fullprep Index: tests/simplerun/megatest.config ================================================================== --- tests/simplerun/megatest.config +++ tests/simplerun/megatest.config @@ -5,11 +5,11 @@ [setup] # Adjust max_concurrent_jobs to limit how much you load your machines max_concurrent_jobs 50 # This is your link path, you can move it but it is generally better to keep it stable -linktree #{getenv PWD}/../simplelinks +linktree #{shell realpath #{getenv PWD}/../simplelinks} # Valid values for state and status for steps, NB// It is not recommended you use this [validvalues] state start end completed @@ -22,6 +22,6 @@ [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}/../simpleruns +disk0 #{shell realpath #{getenv PWD}/../simpleruns} Index: tests/simplerun/tests/test1/step1.sh ================================================================== --- tests/simplerun/tests/test1/step1.sh +++ tests/simplerun/tests/test1/step1.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash # Run your step here +echo Got here! Index: tests/simplerun/tests/test1/step2.sh ================================================================== --- tests/simplerun/tests/test1/step2.sh +++ tests/simplerun/tests/test1/step2.sh @@ -1,3 +1,5 @@ #!/usr/bin/env bash # Run your step here +echo Got here eh! + Index: tests/tests.scm ================================================================== --- tests/tests.scm +++ tests/tests.scm @@ -130,36 +130,38 @@ (sqlite3#database? db))) (sqlite3#finalize! *tdb*) ;; (test "Remove the rollup run" #t (begin (remove-runs) #t)) -(set! *verbosity* 20) +;; (set! *verbosity* 20) (test "Run a test" #t (general-run-call "-runtests" "run a test" (lambda (target runname keys keynames keyvallst) - (let ((test-patts "test1")) + (let ((test-patts "test%")) (runs:run-tests target runname test-patts user (make-hash-table)) )))) (change-directory test-work-dir) (test "Add a step" #t (begin - (db:teststep-set-status! db 1 "step1" "start" 0 "This is a comment" "mylogfile.html") + (db:teststep-set-status! db 2 "step1" "start" 0 "This is a comment" "mylogfile.html") (sleep 2) - (db:teststep-set-status! db 1 "step1" "end" "pass" "This is a different comment" "finallogfile.html") - (set! test-id (db:test-get-id (car (db:get-tests-for-run db 1 "test1" "" '() '())))) + (db:teststep-set-status! db 2 "step1" "end" "pass" "This is a different comment" "finallogfile.html") + (set! test-id (db:test-get-id (car (db:get-tests-for-run db 2 "test1" "" '() '())))) (number? test-id))) -(test "Get nice table for steps" "2.0s" +(sleep 5) +(test "Get nice table for steps" "2s" (begin - (vector-ref (hash-table-ref (db:get-steps-table db test-id) "test1") 4))) + (vector-ref (hash-table-ref (db:get-steps-table db test-id) "step1") 4))) -(hash-table-set! args:arg-hash ":runname" "rollup") - -(test "Remove the rollup run" #t (begin (remove-runs) #t)) (test "Rollup the run(s)" #t (begin - (runs:rollup-run db keys) + (runs:rollup-run keys (keys->alist keys "na") "rollup" "matt") #t)) +(hash-table-set! args:arg-hash ":runname" "%") + +(test "Remove the rollup run" #t (begin (operate-on 'remove-runs))) + ;; ADD ME!!!! (db:get-prereqs-not-met *db* 1 '("runfirst") "" mode: 'normal) ;; ADD ME!!!! (rdb:get-tests-for-run *db* 1 "runfirst" #f '() '())