Skip to content

Commit

Permalink
TESTS: changes to red/run-all.r in preparation of a --fast option
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter W A Wood committed Feb 5, 2015
1 parent be91560 commit 9dba79d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions run-all.r
Expand Up @@ -9,9 +9,10 @@ REBOL [
;; function to find and run-tests
run-all-script: func [
dir [file!]
file [file!]
][
qt/tests-dir: system/script/path/:dir
foreach line read/lines dir/run-all.r [
foreach line read/lines dir/:file [
if any [
find line "===start-group"
find line "--run-"
Expand All @@ -22,17 +23,24 @@ run-all-script: func [
]

batch-mode: false
fast-mode: false
binary?: false
if system/script/args [
;; should we run non-interactively?
batch-mode: find system/script/args "--batch"

;; should we run quickly?
fast-mode: find system/script/args "--fast"

;; should we use the binary compiler?
args: parse system/script/args " "
if find system/script/args "--binary" [
binary?: true
bin-compiler: select args "--binary"
if bin-compiler = "--batch" [
if any [
bin-compiler = "--batch"
bin-complier = "--fast"
][
bin-compiler: none ;; use default
]
if bin-compiler [
Expand Down Expand Up @@ -76,10 +84,14 @@ qt/tests-dir: clean-path %tests/
do %tests/source/units/make-red-auto-tests.r
do %tests/source/units/make-interpreter-auto-tests.r
qt/script-header: "Red []"
run-all-script %tests/
either fast-mode [
run-all-script %tests/ %run-all-fast.r
][
run-all-script %tests/ %run-all.r
]
qt/script-header: "Red/System []"
qt/tests-dir: clean-path %system/tests/
run-all-script %system/tests/
qt/tests-dir: clean-path %system/tests/
run-all-script %system/tests/ %run-all.r

***end-run-quiet***

Expand Down

0 comments on commit 9dba79d

Please sign in to comment.