forked from red/red
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-all.r
83 lines (66 loc) · 2.29 KB
/
run-all.r
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
REBOL [
Title: "Builds and Runs the Red Tests"
File: %run-all.r
Author: "Peter W A Wood"
Version: 0.5.0
License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt"
]
;; should we run non-interactively?
each-mode: batch-mode: ci-each: debug-mode: no
if args: any [system/script/args system/options/args][
batch-mode: find args "--batch"
each-mode: find args "--each"
ci-each: find args "--ci-each"
debug-mode: find args "--debug"
]
;; supress script messages
store-quiet-mode: system/options/quiet
system/options/quiet: true
do %../quick-test/quick-test.r
qt/tests-dir: system/script/path
do %source/units/run-all-init.r
;; run the tests
print ["Quick-Test v" qt/version]
print ["REBOL " system/version]
start-time: now/precise
print ["This test started at" start-time]
if debug-mode [qt/compile-flag: " -d "]
qt/script-header: "Red []"
--setup-temp-files
***start-run-quiet*** "Red Test Suite"
do %source/units/run-pre-extra-tests.r
===start-group=== "Main Red Tests"
either any [each-mode ci-each][
do %source/units/auto-tests/run-each-comp.r
do %source/units/auto-tests/run-each-interp.r
][
--run-test-file-quiet %source/units/auto-tests/run-all-comp1.red
--run-test-file-quiet %source/units/auto-tests/run-all-comp2.red
--run-test-file-quiet %source/units/auto-tests/run-all-interp.red
]
===end-group===
do %source/units/run-post-extra-tests.r
===start-group=== "Red Compiler Regression Tests"
--run-script-quiet %source/compiler/regression-test-redc-1.r
--run-script-quiet %source/compiler/regression-test-redc-2.r
--run-script-quiet %source/compiler/regression-test-redc-3.r
--run-script-quiet %source/compiler/regression-test-redc-4.r
--run-script-quiet %source/compiler/regression-test-redc-5.r
===end-group===
;===start-group=== "View Engine Tests"
; --run-test-file-quiet %source/view/base-self-test.red
;===end-group===
***end-run-quiet***
--delete-temp-files
end-time: now/precise
print [" in" difference end-time start-time newline]
print ["The test finished at" end-time]
system/options/quiet: store-quiet-mode
either any [batch-mode ci-each][
quit/return either qt/test-run/failures > 0 [1] [0]
][
print ["The test output was logged to" qt/log-file]
ask "hit enter to finish"
print ""
qt/test-run/failures
]