2008-10-31 18:38:05 +00:00
|
|
|
--
|
|
|
|
-- tests/premake4.lua
|
|
|
|
-- Automated test suite for Premake 4.x
|
|
|
|
-- Copyright (c) 2008 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
dofile("testfx.lua")
|
|
|
|
dofile("test_dofile.lua")
|
2008-11-13 00:54:41 +00:00
|
|
|
dofile("test_os.lua")
|
2008-10-31 18:38:05 +00:00
|
|
|
dofile("test_path.lua")
|
|
|
|
dofile("test_string.lua")
|
|
|
|
dofile("test_table.lua")
|
|
|
|
dofile("test_template.lua")
|
|
|
|
dofile("test_premake.lua")
|
|
|
|
dofile("test_project.lua")
|
2008-12-15 15:00:35 +00:00
|
|
|
dofile("test_api.lua")
|
2008-12-05 21:18:47 +00:00
|
|
|
dofile("test_targets.lua")
|
2008-12-18 17:53:57 +00:00
|
|
|
dofile("test_keywords.lua")
|
2008-10-31 18:38:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Register a test action
|
|
|
|
--
|
|
|
|
|
|
|
|
premake.actions["test"] = {
|
|
|
|
description = "Run the automated test suite",
|
|
|
|
|
|
|
|
execute = function ()
|
|
|
|
passed, failed = test.runall()
|
|
|
|
msg = string.format("%d tests passed, %d failed", passed, failed)
|
|
|
|
if (failed > 0) then
|
|
|
|
error(msg, 0)
|
|
|
|
else
|
|
|
|
print(msg)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
}
|