Permalink
Browse files

FIX: Use QT context to get test failure numbers

  • Loading branch information...
1 parent 8ec511a commit 7e981eab2f5662ee2883e394bce62dfd271f81c0 @earl earl committed Nov 13, 2012
Showing with 9 additions and 12 deletions.
  1. +0 −3 quick-test/quick-test.r
  2. +3 −3 red-system/tests/run-all.r
  3. +3 −3 red/tests/run-all.r
  4. +3 −3 run-all.r
View
@@ -582,13 +582,11 @@ qt: make object! [
end-file: func [] [
_end file "~~~finished test~~~"
_add-file-to-run-totals
- file/failures
]
end-test-run: func [] [
print ""
_end test-run "***Finished***"
- test-run/failures
]
end-test-run-quiet: func [] [
@@ -599,7 +597,6 @@ qt: make object! [
write/append log-file print-output
prin newline
_print-summary test-run
- test-run/failures
]
_print-summary: func [
@@ -119,15 +119,15 @@ start-time: now/precise
--run-script-quiet %source/compiler/namespace-test.r
===end-group===
-num-failures: ***end-run-quiet***
+***end-run-quiet***
end-time: now/precise
print [" in" difference end-time start-time newline]
system/options/quiet: store-quiet-mode
either batch-mode [
- quit/return either num-failures > 0 [1] [0]
+ quit/return either qt/test-run/failures > 0 [1] [0]
] [
ask "hit enter to finish"
print ""
- num-failures
+ qt/test-run/failures
]
View
@@ -38,15 +38,15 @@ start-time: now/precise
--run-script-quiet %source/compiler/regression-tests.r
===end-group===
-num-failures: ***end-run-quiet***
+***end-run-quiet***
end-time: now/precise
print [" in" difference end-time start-time newline]
system/options/quiet: store-quiet-mode
either batch-mode [
- quit/return either num-failures > 0 [1] [0]
+ quit/return either qt/test-run/failures > 0 [1] [0]
] [
ask "hit enter to finish"
print ""
- num-failures
+ qt/test-run/failures
]
View
@@ -42,16 +42,16 @@ start-time: now/precise
run-all-script %../red/tests/
run-all-script %../red-system/tests/
-num-failures: ***end-run-quiet***
+***end-run-quiet***
end-time: now/precise
print [" in" difference end-time start-time newline]
system/options/quiet: store-quiet-mode
change-dir store-current-dir
either batch-mode [
- quit/return either num-failures > 0 [1] [0]
+ quit/return either qt/test-run/failures > 0 [1] [0]
] [
ask "hit enter to finish"
print ""
- num-failures
+ qt/test-run/failures
]

1 comment on commit 7e981ea

Contributor

PeterWAWood commented on 7e981ea Nov 14, 2012

Looks great Andreas. I'm even more embarrassed that after not noticing that it could have been done like this in the first place, you've refactored the code for me. Many thanks.

Please sign in to comment.