diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-30 23:17:12 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-30 23:17:12 +0200 |
commit | f58f65c30de315d4419f69a92a708cbed797ff37 (patch) | |
tree | efaaa82089523dc0f7a3b9a6ab4c963550f9b241 /src/tests/utests/bam.lua | |
parent | fa5327d4cc5e47656326b8c0c55d23cd71b04462 (diff) | |
download | kogata-f58f65c30de315d4419f69a92a708cbed797ff37.tar.gz kogata-f58f65c30de315d4419f69a92a708cbed797ff37.zip |
Release mode (enables some optimizations) ; fix tests.
Diffstat (limited to 'src/tests/utests/bam.lua')
-rw-r--r-- | src/tests/utests/bam.lua | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/tests/utests/bam.lua b/src/tests/utests/bam.lua index 6137399..abbce88 100644 --- a/src/tests/utests/bam.lua +++ b/src/tests/utests/bam.lua @@ -1,21 +1,24 @@ -for _, name in pairs({ - "chan1", "chan2", - "fs1", "fs2", - "malloc", - "subfs" -}) do - local map = "build/tests/utest_" .. name .. ".map" +return function(s, kernel, lib) + local tests = {} - local config = TableDeepCopy(user_settings) - config.link.flags:Add( '-Xlinker -Map=' .. map, - '-T src/sysbin/linker.ld') + for _, name in pairs({ + "chan1", "chan2", + "fs1", "fs2", + "malloc", + "subfs" + }) do + local config = TableDeepCopy(s.user_settings) + config.link.flags:Add('-T src/lib/linker.ld') - local obj = Compile(config, 'src/tests/utests/' .. name .. '/test.c') - local bin = Link(config, 'tests/utest_' .. name, {obj, libkogata}) + local obj = Compile(config, 'src/tests/utests/' .. name .. '/test.c') + local bin = Link(config, 'tests/utest_' .. name, {obj, lib.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) + local out = bin .. ".log" + AddJob(out, "utest " .. name, "./src/tests/utests/run_qemu_test.sh " .. bin .. " " .. out .. " " .. kernel) + AddDependency(out, bin) + AddDependency(out, kernel) + table.insert(tests, out) + end + + return tests end |