From 360da84db0d7165c84d160b518f39cd16006c758 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 13 Jul 2016 22:31:46 +0200 Subject: Migrate to BAM build tool --- src/tests/utests/bam.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/tests/utests/bam.lua (limited to 'src/tests/utests/bam.lua') 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 -- cgit v1.2.3