Tests can now specify (via a hacky filename suffix) which runtime they want.

This commit is contained in:
David Given 2016-11-16 21:08:03 +01:00
parent 71e6ca26d5
commit c25ad82a89
7 changed files with 7 additions and 2 deletions

View file

@ -10,6 +10,10 @@ else
for _, f in ipairs(testcases) do for _, f in ipairs(testcases) do
local fs = replace(basename(f), "%..$", "") local fs = replace(basename(f), "%..$", "")
local _, _, lang = fs:find("_(.)$")
if not lang then
lang = "e"
end
local bin = ackprogram { local bin = ackprogram {
name = fs.."_bin", name = fs.."_bin",
@ -17,7 +21,8 @@ else
deps = { "plat/qemuppc/tests/lib+lib" }, deps = { "plat/qemuppc/tests/lib+lib" },
vars = { vars = {
plat = "qemuppc", plat = "qemuppc",
lang = "e", lang = lang,
ackcflags = "-O0"
} }
} }

View file

@ -25,7 +25,7 @@ void writehex(uint32_t code)
void fail(uint32_t code) void fail(uint32_t code)
{ {
write(1, "@@FAIL ", 7); write(1, "@@FAIL on line 0x", 7);
writehex(code); writehex(code);
write(1, "\n", 1); write(1, "\n", 1);
} }