aboutsummaryrefslogblamecommitdiff
path: root/src/tests/utests/bam.lua
blob: abbce889125c3a0bfe6824e677e40c1e3d782ca6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                               
 







                                                             
 

                                                                                      
 







                                                                                                                           
   
return function(s, kernel, lib)
	local tests = {}

	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, lib.libkogata})

		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