aboutsummaryrefslogtreecommitdiff
path: root/src/tests/slab_test/bam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/slab_test/bam.lua')
-rw-r--r--src/tests/slab_test/bam.lua19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/tests/slab_test/bam.lua b/src/tests/slab_test/bam.lua
index 87c6666..cd5ad2d 100644
--- a/src/tests/slab_test/bam.lua
+++ b/src/tests/slab_test/bam.lua
@@ -1,11 +1,14 @@
-local source = {"src/common/libkogata/slab_alloc.c",
- "src/tests/slab_test/slab_test.c"}
-local obj = Compile(host_settings, source)
+return function(s)
+ local source = {"src/common/libkogata/slab_alloc.c",
+ "src/tests/slab_test/slab_test.c"}
+ local obj = Compile(s.host_settings, source)
-local bin = Link(host_settings, "build/tests/slab_test", obj)
+ local f = s.host_settings.cc.Output(s.host_settings, "tests/slab_test")
+ local bin = Link(s.host_settings, f, obj)
-local slab_test = "build/tests/slab_test.log"
-AddJob(slab_test, "slab_test", "./" .. bin .. " > " .. slab_test)
-AddDependency(slab_test, bin)
+ local slab_test = f .. ".log"
+ AddJob(slab_test, "slab_test", "./" .. bin .. " > " .. slab_test)
+ AddDependency(slab_test, bin)
-table.insert(tests, slab_test)
+ return slab_test
+end