Skip to content

Commit 50acf65

Browse files
Run all tests with debug symbols.
1 parent 309ef7d commit 50acf65

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,11 @@ foreach(TERRA_TEST ${TERRA_TESTS})
386386
COMMAND $<TARGET_FILE:TerraExecutable> ${TERRA_TEST}
387387
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests
388388
)
389+
# again, with debug symbols
390+
add_test(NAME ${TERRA_TEST}
391+
COMMAND $<TARGET_FILE:TerraExecutable> -mg ${TERRA_TEST}
392+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests
393+
)
389394
endforeach()
390395
foreach(TERRA_TEST ${TERRA_TESTS_INSTALL})
391396
get_filename_component(TERRA_TEST_DIR ${TERRA_TEST} DIRECTORY)

tests/run

+9-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ for line in io.popen(lscmd):lines() do
3232
end
3333
local file = line:match("^([^/]*%.t)$") or line:match("^(fails/[^/]*%.t)$")
3434
if file then
35-
print(file .. ":")
36-
local execstring = getcommand(file) .. " " .. file
37-
local result = os.execute(execstring)
38-
if type(result) == "number" and result == 0 or result == true then
35+
local pass = true
36+
for test_debug = 0, 1 do
37+
debug_flag = test_debug == 1 and "-mg" or ""
38+
print(debug_flag .. file .. ":")
39+
local execstring = getcommand(file) .. " " .. file
40+
local result = os.execute(execstring)
41+
pass = pass and (type(result) == "number" and result == 0 or result == true)
42+
end
43+
if pass then
3944
table.insert(passed,file)
4045
else
4146
--error("fail")

0 commit comments

Comments
 (0)