Megatest

Diff
Login

Differences From Artifact [6fc7061e87]:

To Artifact [51a14a8524]:


1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
(use test)
;; (require-library args)

(include "../common.scm")
(include "../keys.scm")
(include "../db.scm")
(include "../configf.scm")
(include "../process.scm")
(include "../launch.scm")
(include "../items.scm")
(include "../runs.scm")


(define conffile #f)
(test "Read a config" #t (hash-table? (read-config "test.config")))
(test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.config")))

(set! conffile (read-config "test.config"))
(test "Get available diskspace" #t (number? (get-df "./")))











>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(use test)
;; (require-library args)

(include "../common.scm")
(include "../keys.scm")
(include "../db.scm")
(include "../configf.scm")
(include "../process.scm")
(include "../launch.scm")
(include "../items.scm")
(include "../runs.scm")
(include "../megatest-version.scm")

(define conffile #f)
(test "Read a config" #t (hash-table? (read-config "test.config")))
(test "Read a config that doesn't exist" #t (hash-table? (read-config "nada.config")))

(set! conffile (read-config "test.config"))
(test "Get available diskspace" #t (number? (get-df "./")))
28
29
30
31
32
33
34



35
36
37
38
39
40
41
;; (define *toppath* "tests")
(define *db* #f)
(test "setup for run" #t (begin (setup-for-run)
				(string? (getenv "MT_RUN_AREA_HOME"))))
(test "open-db" #t (begin
		     (set! *db* (open-db))
		     (if *db* #t #f)))




(test "get cpu load" #t (number? (get-cpu-load)))
(test "get uname"    #t (string? (get-uname)))

(test "get validvalues as list" (list "start" "end" "completed")
      (string-split (config-lookup *configdat* "validvalues" "state")))








>
>
>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;; (define *toppath* "tests")
(define *db* #f)
(test "setup for run" #t (begin (setup-for-run)
				(string? (getenv "MT_RUN_AREA_HOME"))))
(test "open-db" #t (begin
		     (set! *db* (open-db))
		     (if *db* #t #f)))

;; quit wasting time changing db to *db*
(define db *db*)

(test "get cpu load" #t (number? (get-cpu-load)))
(test "get uname"    #t (string? (get-uname)))

(test "get validvalues as list" (list "start" "end" "completed")
      (string-split (config-lookup *configdat* "validvalues" "state")))