Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIX: Use QT context to get test failure numbers

  • Loading branch information...
commit 7e981eab2f5662ee2883e394bce62dfd271f81c0 1 parent 8ec511a
@earl earl authored
View
3  quick-test/quick-test.r
@@ -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 [
View
6 red-system/tests/run-all.r
@@ -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
6 red/tests/run-all.r
@@ -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
6 run-all.r
@@ -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

@PeterWAWood

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.
Something went wrong with that request. Please try again.