-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlakefile
52 lines (42 loc) · 1.32 KB
/
lakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PROJECT = 'lluv'
INITLAKEFILE()
DEFINES = L{DEFINES,
IF(WINDOWS, 'DLL_EXPORT', '');
}
lluv = c.shared{'lluv',
base = 'src',
src = '*.c',
needs = {LUA_NEED, 'libuv', IF(WINDOWS, 'winsock2', 'sockets')},
defines = DEFINES,
dynamic = DYNAMIC,
strip = true,
}
target('build', lluv)
install = target('install', {
file.group{odir=LIBDIR; src = lluv };
file.group{odir=LIBDIR; src = J("src", "lua") ; recurse = true };
file.group{odir=J(ROOT, 'examples'); src = 'examples'; recurse = true };
file.group{odir=TESTDIR; src = 'test'; recurse = true };
})
target('test', install, function()
run_test(nil, 'test-close.lua')
run_test(nil, 'test-fs.lua')
run_test(nil, 'test-multi-write.lua')
run_test(nil, 'test-spawn.lua')
run_test(nil, 'test-gc-basic.lua')
run_test(nil, 'test-gc-timer.lua')
run_test(nil, 'test-gc-tcp.lua')
run_test(nil, 'test-defer-error.lua')
run_test(nil, 'test-error-handler.lua')
run_test(nil, 'test-data.lua')
local dir = J(TESTDIR, "luasocket")
if spawn_test(dir, 'testsrvr.lua') then
run_test(dir, 'corun.lua', 'testclnt.lua')
end
if spawn_test(dir, 'ts.lua') then
run_test(dir, 'defer_error.lua')
end
if not test_summary() then
quit("test fail")
end
end)