diff options
Diffstat (limited to 'src/tests/utests/bam.lua')
-rw-r--r-- | src/tests/utests/bam.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/utests/bam.lua b/src/tests/utests/bam.lua new file mode 100644 index 0000000..6137399 --- /dev/null +++ b/src/tests/utests/bam.lua @@ -0,0 +1,21 @@ +for _, name in pairs({ + "chan1", "chan2", + "fs1", "fs2", + "malloc", + "subfs" +}) do + local map = "build/tests/utest_" .. name .. ".map" + + local config = TableDeepCopy(user_settings) + config.link.flags:Add( '-Xlinker -Map=' .. map, + '-T src/sysbin/linker.ld') + + local obj = Compile(config, 'src/tests/utests/' .. name .. '/test.c') + local bin = Link(config, 'tests/utest_' .. name, {obj, libkogata}) + + local out = "build/tests/utest_"..name..".log" + AddJob(out, "utest " .. name, "./src/tests/utests/run_qemu_test.sh " .. bin .. " " .. out .. " " .. map) + AddDependency(out, bin) + AddDependency(out, kernel) + table.insert(tests, out) +end |