2011-02-16 20:16:07 +00:00
|
|
|
--
|
2012-01-12 21:59:15 +00:00
|
|
|
-- tests/actions/vstudio/sln2005/test_dependencies.lua
|
2011-02-16 20:16:07 +00:00
|
|
|
-- Validate generation of Visual Studio 2005+ solution project dependencies.
|
2012-01-12 21:59:15 +00:00
|
|
|
-- Copyright (c) 2009-2012 Jason Perkins and the Premake project
|
2011-02-16 20:16:07 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
T.vstudio_sln2005_dependencies = { }
|
|
|
|
local suite = T.vstudio_sln2005_dependencies
|
|
|
|
local sln2005 = premake.vstudio.sln2005
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2012-11-19 21:08:48 +00:00
|
|
|
-- Setup
|
2011-02-16 20:16:07 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj1, prj2
|
2012-11-19 21:08:48 +00:00
|
|
|
|
2011-02-16 20:16:07 +00:00
|
|
|
function suite.setup()
|
|
|
|
_ACTION = "vs2005"
|
|
|
|
sln, prj1 = test.createsolution()
|
|
|
|
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
|
|
|
prj2 = test.createproject(sln)
|
|
|
|
uuid "2151E83B-997F-4A9D-955D-380157E88C31"
|
2012-11-19 21:08:48 +00:00
|
|
|
prj3 = test.createproject(sln)
|
|
|
|
uuid "CAA68162-8B96-11E1-8D5E-5885BBE59B18"
|
2011-02-16 20:16:07 +00:00
|
|
|
links "MyProject"
|
2012-11-19 21:08:48 +00:00
|
|
|
dependson "MyProject2"
|
2011-02-16 20:16:07 +00:00
|
|
|
end
|
2012-11-19 21:08:48 +00:00
|
|
|
|
2011-02-16 20:16:07 +00:00
|
|
|
local function prepare(language)
|
|
|
|
prj1.language = language
|
|
|
|
prj2.language = language
|
2012-02-19 17:31:20 +00:00
|
|
|
prj2 = premake.solution.getproject_ng(sln, 2)
|
2012-01-12 21:59:15 +00:00
|
|
|
sln2005.projectdependencies_ng(prj2)
|
2012-11-19 21:08:48 +00:00
|
|
|
prj3.language = language
|
|
|
|
prj3 = premake.solution.getproject_ng(sln, 3)
|
|
|
|
sln2005.projectdependencies_ng(prj3)
|
2011-02-16 20:16:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2012-01-12 21:59:15 +00:00
|
|
|
-- Verify dependencies between C++ projects are listed.
|
2011-02-16 20:16:07 +00:00
|
|
|
--
|
2012-01-12 21:59:15 +00:00
|
|
|
function suite.dependency_onCppProjects()
|
2011-02-16 20:16:07 +00:00
|
|
|
prepare("C++")
|
|
|
|
test.capture [[
|
|
|
|
ProjectSection(ProjectDependencies) = postProject
|
|
|
|
{AE61726D-187C-E440-BD07-2556188A6565} = {AE61726D-187C-E440-BD07-2556188A6565}
|
2012-11-19 21:08:48 +00:00
|
|
|
{2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31}
|
2011-02-16 20:16:07 +00:00
|
|
|
EndProjectSection
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2012-01-12 21:59:15 +00:00
|
|
|
--
|
|
|
|
-- Verify dependencies between C# projects are listed.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.dependency_onCSharpProjects()
|
2011-02-16 20:16:07 +00:00
|
|
|
prepare("C#")
|
|
|
|
test.capture [[
|
|
|
|
ProjectSection(ProjectDependencies) = postProject
|
|
|
|
{AE61726D-187C-E440-BD07-2556188A6565} = {AE61726D-187C-E440-BD07-2556188A6565}
|
2012-11-19 21:08:48 +00:00
|
|
|
{2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31}
|
2011-02-16 20:16:07 +00:00
|
|
|
EndProjectSection
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2012-01-12 21:59:15 +00:00
|
|
|
--
|
2012-02-10 19:53:43 +00:00
|
|
|
-- Most C# references should go into the project rather than the solution,
|
|
|
|
-- but until I know the conditions, put everything here to be safe.
|
2012-01-12 21:59:15 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
function suite.nothingOutput_onVs2010()
|
2011-02-16 20:16:07 +00:00
|
|
|
_ACTION = "vs2010"
|
|
|
|
prepare("C#")
|
2012-02-10 19:53:43 +00:00
|
|
|
test.capture [[
|
|
|
|
ProjectSection(ProjectDependencies) = postProject
|
|
|
|
{AE61726D-187C-E440-BD07-2556188A6565} = {AE61726D-187C-E440-BD07-2556188A6565}
|
2012-11-19 21:08:48 +00:00
|
|
|
{2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31}
|
2012-02-10 19:53:43 +00:00
|
|
|
EndProjectSection
|
|
|
|
]]
|
2011-02-16 20:16:07 +00:00
|
|
|
end
|
2012-02-10 19:53:43 +00:00
|
|
|
|