;;======================================================================
;; 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/>.
;;======================================================================
(use
(prefix base64 base64:)
(prefix nanomsg nmsg:)
(prefix sqlite3 sqlite3:)
(srfi 18)
csv-xml
data-structures
directory-utils
dot-locking
extras ;; tcp
format
hostinfo
matchable
md5
message-digest
pkts
(prefix dbi dbi:)
posix
posix
regex
regex-case
srfi-1
stack
typed-records
udp ;; sql-de-lite
z3
)
(declare (unit common))
(declare (uses commonmod))
(import commonmod)
;; dbr:dbstruct is used here. should move it
(declare (uses dbmod))
(import dbmod)
(include "common_records.scm")
;; (require-library margs)
;; (include "margs.scm")
;; (define old-exit exit)
;;
;; (define (exit . code)
;; (if (null? code)
;; (old-exit)
;; (old-exit code)))
(define (common:debug-setup)
(debug:setup (cond ;; debug arg
((args:get-arg "-debug-noprop") 'noprop)
((args:get-arg "-debug") #t)
(else #f))
(cond ;; verbosity arg
((args:get-arg "-q") 'v)
((args:get-arg "-q") 'q)
(else #f))))