Megatest

Artifact [3d319588ad]
Login

Artifact 3d319588ad4d724e62a03da656baa45c54c46fe5:


;;======================================================================
;; Copyright 2006-2012, Matthew Welland.
;; 
;; This file is part of Megatest.
;; 
;;     Megatest is free software: you can redistribute it and/or modify
;;     it under the terms of the GNU General Public License as published by
;;     the Free Software Foundation, either version 3 of the License, or
;;     (at your option) any later version.
;; 
;;     Megatest is distributed in the hope that it will be useful,
;;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     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 <http://www.gnu.org/licenses/>.
;;
;;======================================================================

(define (runs:runrec-make-record) (make-vector 13))
(define (runs:runrec-get-target  vec)(vector-ref vec 0))  ;; a/b/c
(define (runs:runrec-get-runname vec)(vector-ref vec 1))  ;; string
(define (runs:runrec-testpatt    vec)(vector-ref vec 2))  ;; a,b/c,d%
(define (runs:runrec-keys        vec)(vector-ref vec 3))  ;; (key1 key2 ...)
(define (runs:runrec-keyvals     vec)(vector-ref vec 4))  ;; ((key1 val1)(key2 val2) ...)
(define (runs:runrec-environment vec)(vector-ref vec 5))  ;; environment, alist key val
(define (runs:runrec-mconfig     vec)(vector-ref vec 6))  ;; megatest.config
(define (runs:runrec-runconfig   vec)(vector-ref vec 7))  ;; runconfigs.config
(define (runs:runrec-serverdat   vec)(vector-ref vec 8))  ;; (host port)
(define (runs:runrec-transport   vec)(vector-ref vec 9))  ;; 'http
(define (runs:runrec-db          vec)(vector-ref vec 10)) ;; <sqlite3db> (if 'fs)
(define (runs:runrec-top-path    vec)(vector-ref vec 11)) ;; *toppath*
(define (runs:runrec-run_id      vec)(vector-ref vec 12)) ;; run-id

(define (test:get-id vec)       (vector-ref vec 0))
(define (test:get-run_id vec)   (vector-ref vec 1))
(define (test:get-test-name vec)(vector-ref vec 2))
(define (test:get-state vec)    (vector-ref vec 3))
(define (test:get-status vec)   (vector-ref vec 4))
(define (test:get-item-path vec)(vector-ref vec 5))

(define (test:test-get-fullname test)
   (conc (db:test-get-testname test)
	 (if (equal? (db:test-get-item-path test) "")
	     ""
	     (conc "(" (db:test-get-item-path test) ")"))))