diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-13 22:31:46 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-13 22:31:46 +0200 |
commit | 360da84db0d7165c84d160b518f39cd16006c758 (patch) | |
tree | a6fea5da753ec4ac5a37237cefda52801f9647ac /src/tests/utests/bam.lua | |
parent | 27a6934ea3073c3eaf782cc7615ce4ed0dbf4a18 (diff) | |
download | kogata-360da84db0d7165c84d160b518f39cd16006c758.tar.gz kogata-360da84db0d7165c84d160b518f39cd16006c758.zip |
Migrate to BAM build tool
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 |