@@ -1,6 +1,6 @@ -;;====================================================================== +>;;====================================================================== ;; Copyright 2006-2013, Matthew Welland. ;; ;; This file is part of Megatest. ;; ;; Megatest is free software: you can redistribute it and/or modify @@ -28,13 +28,24 @@ (declare (uses keys)) (declare (uses mt)) (declare (uses commonmod)) (declare (uses mtargs)) (declare (uses rmtmod)) + +(module tdb + * + +(import scheme + chicken + data-structures + ) (require-extension (srfi 18) extras tcp) -(use sqlite3 srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 message-digest base64) + +(import srfi-1 posix regex regex-case srfi-69 csv-xml s11n md5 + message-digest base64) + (import (prefix sqlite3 sqlite3:)) (import (prefix base64 base64:)) (import commonmod debugprint @@ -42,11 +53,11 @@ (prefix mtargs args:)) ;; (include "common_records.scm") ;; (include "db_records.scm") ;; (include "key_records.scm") -(include "run_records.scm") +;; (include "run_records.scm") ;;====================================================================== ;; ;; T E S T D A T A B A S E S ;; @@ -53,10 +64,19 @@ ;;====================================================================== ;;====================================================================== ;; T E S T S P E C I F I C D B ;;====================================================================== + +;; (define (rmt:open-test-db-by-test-id run-id test-id #!key (work-area #f)) +;; (assert (number? run-id) "FATAL: Run id required.") +;; (let* ((test-path (if (string? work-area) +;; work-area +;; (rmt:test-get-rundir-from-test-id run-id test-id)))) +;; (debug:print 3 *default-log-port* "TEST PATH: " test-path) +;; (open-test-db test-path))) + ;; =not-used= ;; Create the sqlite db for the individual test(s) ;; =not-used= ;; ;; =not-used= ;; Moved these tables into .db ;; =not-used= ;; THIS CODE TO BE REMOVED @@ -232,23 +252,23 @@ (loop (read-line))))) ;; roll up the current results. ;; FIXME: Add the status too (rmt:test-data-rollup run-id test-id #f)) -;; NOTE: Run this local with #f for db !!! -(define (tdb:load-logpro-data run-id test-id) - (let loop ((lin (read-line))) - (if (not (eof-object? lin)) - (begin - (debug:print 4 *default-log-port* lin) - ;;(when lin ;; this when blocked stack dump caused by .dat file from logpro being 0-byte. fixed by upgrading logpro - (rmt:csv->test-data run-id test-id lin) - ;;) - (loop (read-line))))) - ;; roll up the current results. - ;; FIXME: Add the status too - (rmt:test-data-rollup run-id test-id #f)) +;; ;; NOTE: Run this local with #f for db !!! +;; (define (tdb:load-logpro-data run-id test-id) +;; (let loop ((lin (read-line))) +;; (if (not (eof-object? lin)) +;; (begin +;; (debug:print 4 *default-log-port* lin) +;; ;;(when lin ;; this when blocked stack dump caused by .dat file from logpro being 0-byte. fixed by upgrading logpro +;; (rmt:csv->test-data run-id test-id lin) +;; ;;) +;; (loop (read-line))))) +;; ;; roll up the current results. +;; ;; FIXME: Add the status too +;; (rmt:test-data-rollup run-id test-id #f)) ;;====================================================================== ;; S T E P S ;;====================================================================== @@ -403,14 +423,16 @@ (conc (vector-ref b 2))) #f)) (string