File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,9 @@ endif()
219
219
220
220
# Test runner
221
221
# ---------------------------------------------------------------------------
222
- set (TEST_RUNNER_BIN ${CMAKE_BINARY_DIR} /testrunner${CMAKE_EXECUTABLE_SUFFIX} )
222
+ set (TEST_RUNNER_BIN ${CMAKE_BINARY_DIR} /clever extra/ testrunner.clv )
223
223
add_custom_target (run-tests
224
- COMMAND ${TEST_RUNNER_BIN} -q; ${CMAKE_CURRENT_SOURCE_DIR} /tests
224
+ COMMAND ${TEST_RUNNER_BIN}
225
225
COMMENT "Running tests" )
226
226
add_dependencies (run-tests clever-cli)
227
227
add_dependencies (run-tests testrunner)
Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ function runtest(file) {
45
45
var title = title_re.group(0) + " (" + file + ")";
46
46
var code_re = regex:Regex.new("==CODE==\s*((?s:(?!==RESULT==).)+)");
47
47
48
- io:print("\r[....] " + title);
49
- io:flush();
50
-
51
48
if (code_re.match(content)) {
52
49
var status;
53
50
var ts1 = sys:microtime();
@@ -60,19 +57,18 @@ function runtest(file) {
60
57
var result_re2 = regex:Regex.new(result_re.group(1).trim());
61
58
62
59
if (result_re2.test(result)) {
63
- status = "PASS";
64
60
++passed;
65
61
66
62
file:remove(file + ".tmp");
67
63
file:remove(file + ".tmp.out");
68
64
} else {
69
65
status = "FAIL";
70
66
++failed;
67
+
68
+ io:println("\r[" + status + "] " + title + " - " + (ts2 - ts1) + " ms");
71
69
}
72
70
73
71
time_taken += (ts2 - ts1);
74
-
75
- io:println("\r[" + status + "] " + title + " - " + (ts2 - ts1) + " ms");
76
72
} else {
77
73
io:println("Error: malformed test detected!");
78
74
sys:exit(1);
@@ -99,6 +95,6 @@ if (passed > 0 || failed > 0) {
99
95
io:println("Passed tests: " + passed);
100
96
io:println("Failed tests: " + failed);
101
97
io:println("-----------------------------------");
102
- io:println("Time taken: " + time_taken);
98
+ io:println("Time taken: " + time_taken + " ms" );
103
99
io:println("-----------------------------------");
104
100
}
You can’t perform that action at this time.
0 commit comments