blob: 1748692dc8bce188617e3c7e1d77841da1329e2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/bin/sh
# -*- mode: scheme; -*-
exec guile --debug -s "$0" "$@"
!#
(define-module (test-runner)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1) ; for last
#:use-module (srfi srfi-13)
#:use-module (srfi srfi-64)
#:use-module (ice-9 rdelim)
)
(test-begin "runner")
(test-begin "vec-test")
(define v (make-vector 5 99))
;; Require that an expression evaluate to true.
(test-assert (vector? v))
;; Test that an expression is eqv? to some other expression.
(test-eqv 99 (vector-ref v 2))
(vector-set! v 2 7)
(test-eqv 7 (vector-ref v 2))
;; Finish the testsuite, and report results.
(test-end "vec-test")
(test-begin "external-gemma-run")
(let [(err (system "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.txt.gz -p ./example/mouse_hs1940.pheno.txt -gk -o mouse_hs1940 -debug"))]
(test-eqv 0 err))
(let [(err (system "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.txt.gz -p ./example/mouse_hs1940.pheno.txt -n 1 -a ./example/mouse_hs1940.anno.txt -k ./output/mouse_hs1940.cXX.txt -o mouse_hs1940 -lmm 9 -debug"))]
(test-eqv 0 err))
(call-with-input-file "output/mouse_hs1940.assoc.txt"
(lambda (port)
(read-line port) ; skip first line
(let* ((fields (string-split (read-line port) #\tab))
(last-field (last fields)))
(test-eqv 208.0 (truncate (* 1000 (string->number last-field)))))))
(test-end "external-gemma-run")
(test-end "runner")
|