From 62edb906418a3121604d988a68c4b954d4a2f01b Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 11 Dec 2016 23:06:37 +0100 Subject: [PATCH] Convert the inn test to work with the test library and not import InOut; it now runs on qemuppc again. Reenable qemuppc tests. --- build.lua | 2 +- tests/plat/bugs/bug-22-inn_mod.mod | 14 +++++--------- tests/plat/build.lua | 5 ++++- tests/plat/lib/Test.def | 6 ++++++ tests/plat/lib/build.lua | 7 ------- 5 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 tests/plat/lib/Test.def delete mode 100644 tests/plat/lib/build.lua diff --git a/build.lua b/build.lua index 91415d689..6364e5f75 100644 --- a/build.lua +++ b/build.lua @@ -18,7 +18,7 @@ vars.plats = { vars.plats_with_tests = { "linux386", "linuxppc", - -- "qemuppc", FIXME: disable until we figure out why qemu won't run binaries bigger than 4kB + "qemuppc", "pc86", } diff --git a/tests/plat/bugs/bug-22-inn_mod.mod b/tests/plat/bugs/bug-22-inn_mod.mod index 8f3a2d00a..53fe93568 100644 --- a/tests/plat/bugs/bug-22-inn_mod.mod +++ b/tests/plat/bugs/bug-22-inn_mod.mod @@ -1,5 +1,5 @@ MODULE test; -FROM InOut IMPORT WriteLn, WriteString; +FROM Test IMPORT fail, finished; TYPE charset = SET OF CHAR; @@ -10,17 +10,13 @@ END Space; BEGIN IF Space('a') THEN - WriteString("@@FAIL 1"); - WriteLn; + fail(1); END; IF NOT Space(' ') THEN - WriteString("@@FAIL 2"); - WriteLn; + fail(2); END; IF NOT Space(12C) THEN - WriteString("@@FAIL 3"); - WriteLn; + fail(3); END; - WriteString("@@FINISHED"); - WriteLn; + finished; END test. \ No newline at end of file diff --git a/tests/plat/build.lua b/tests/plat/build.lua index d8362b3a0..3f43fb95b 100644 --- a/tests/plat/build.lua +++ b/tests/plat/build.lua @@ -18,7 +18,10 @@ definerule("plat_testsuite", acklibrary { name = "lib", srcs = { "tests/plat/lib/test.c" }, - hdrs = { "tests/plat/lib/test.h" }, + hdrs = { + "tests/plat/lib/test.h", + "tests/plat/lib/Test.def" + }, vars = { plat = e.plat }, } diff --git a/tests/plat/lib/Test.def b/tests/plat/lib/Test.def new file mode 100644 index 000000000..cab31f2e8 --- /dev/null +++ b/tests/plat/lib/Test.def @@ -0,0 +1,6 @@ +(*$Foreign*) +DEFINITION MODULE Test; + PROCEDURE finished(); + PROCEDURE writehex(code: LONGINT); + PROCEDURE fail(code: LONGINT); +END Test. diff --git a/tests/plat/lib/build.lua b/tests/plat/lib/build.lua deleted file mode 100644 index be9928c84..000000000 --- a/tests/plat/lib/build.lua +++ /dev/null @@ -1,7 +0,0 @@ -include("plat/build.lua") - -acklibrary { - name = "lib", - srcs = { "./test.c" }, - hdrs = { "./test.h" }, -} -- 2.34.1