-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.lua
More file actions
32 lines (25 loc) · 932 Bytes
/
test.lua
File metadata and controls
32 lines (25 loc) · 932 Bytes
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
local p = premake
if not p.modules.test then
p.modules.test = {}
newaction {
trigger = "test",
description = "Runs tests using the given config",
execute = function()
print("Testing")
local res,msg,sig;
local architecture = _OPTIONS["architecture"];
if (architecture == "x64") then
architecture = "x86_64"
end
if (os.host() == "windows") then
res,msg,sig = os.execute("bin\\".._OPTIONS["config"].."-windows-"..architecture.."\\Test.exe")
else
res,msg,sig = os.execute("bin/".._OPTIONS["config"].."-linux-"..architecture.."/Test")
end
if (not res and msg == "exit") then
error("Test "..msg.." with code: "..sig, 0)
end
end
}
end
return p.modules.test