From f58f65c30de315d4419f69a92a708cbed797ff37 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 30 Jul 2016 23:17:12 +0200 Subject: Release mode (enables some optimizations) ; fix tests. --- src/tests/utests/bam.lua | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'src/tests/utests/bam.lua') 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 -- cgit v1.2.3