Rename solution to workspace in test suites
This commit is contained in:
parent
e4db08ef8a
commit
c3d2e226a3
@ -1,12 +1,12 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/make/cpp/test_objects.lua
|
-- tests/actions/make/cpp/test_objects.lua
|
||||||
-- Validate the list of objects for a makefile.
|
-- Validate the list of objects for a makefile.
|
||||||
-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
|
-- Copyright (c) 2009-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
local suite = test.declare("make_cpp_objects")
|
local suite = test.declare("make_cpp_objects")
|
||||||
local make = premake.make
|
|
||||||
local project = premake.project
|
local p = premake
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -20,8 +20,8 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
make.cppObjects(prj)
|
p.make.cppObjects(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/make/test_default_config.lua
|
-- tests/actions/make/test_default_config.lua
|
||||||
-- Validate generation of default configuration block for makefiles.
|
-- Validate generation of default configuration block for makefiles.
|
||||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.make_default_config = {}
|
local suite = test.declare("make_default_config")
|
||||||
local suite = T.make_default_config
|
|
||||||
local make = premake.make
|
local p = premake
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -20,8 +20,8 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.workspace.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
make.defaultconfig(prj)
|
p.make.defaultconfig(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- If the project excludes a solution build cfg, it should be skipped
|
-- If the project excludes a workspace build cfg, it should be skipped
|
||||||
-- over as the default config as well.
|
-- over as the default config as well.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/make/solution/test_group_rule.lua
|
-- tests/actions/make/workspace/test_group_rule.lua
|
||||||
-- Validate generation of group rules
|
-- Validate generation of group rules
|
||||||
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Groups should be added to solution's PHONY
|
-- Groups should be added to workspace's PHONY
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.groupRule_groupAsPhony()
|
function suite.groupRule_groupAsPhony()
|
||||||
@ -42,8 +42,10 @@
|
|||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Transform solution groups into target aggregate
|
-- Transform workspace groups into target aggregate
|
||||||
--
|
--
|
||||||
function suite.groupRule_groupRules()
|
function suite.groupRule_groupRules()
|
||||||
prepare()
|
prepare()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/make/solution/test_project_rule.lua
|
-- tests/actions/make/workspace/test_project_rule.lua
|
||||||
-- Validate generation of project rules in solution makefile.
|
-- Validate generation of project rules in workspace makefile.
|
||||||
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/vstudio/cs2005/projectsettings.lua
|
-- tests/actions/vstudio/cs2005/projectsettings.lua
|
||||||
-- Validate generation of root <PropertyGroup/> in Visual Studio 2005+ .csproj
|
-- Validate generation of root <PropertyGroup/> in Visual Studio 2005+ .csproj
|
||||||
-- Copyright (c) 2009-2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2009-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.vstudio_cs2005_projectsettings = { }
|
local suite = test.declare("vstudio_cs2005_projectsettings")
|
||||||
local suite = T.vstudio_cs2005_projectsettings
|
|
||||||
local cs2005 = premake.vstudio.cs2005
|
local cs2005 = premake.vstudio.cs2005
|
||||||
|
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.projectProperties(prj)
|
cs2005.projectProperties(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/vstudio/cs2005/test_assembly_refs.lua
|
-- tests/actions/vstudio/cs2005/test_assembly_refs.lua
|
||||||
-- Test the assembly linking block of a Visual Studio 2005+ C# project.
|
-- Test the assembly linking block of a Visual Studio 2005+ C# project.
|
||||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.vstudio_cs2005_assembly_refs = {}
|
local suite = test.declare("vstudio_cs2005_assembly_refs")
|
||||||
local suite = T.vstudio_cs2005_assembly_refs
|
|
||||||
local cs2005 = premake.vstudio.cs2005
|
local cs2005 = premake.vstudio.cs2005
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.assemblyReferences(prj)
|
cs2005.assemblyReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.buildEvents(prj)
|
cs2005.buildEvents(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.commonProperties(prj)
|
cs2005.commonProperties(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.files(prj)
|
cs2005.files(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.applicationIcon(prj)
|
cs2005.applicationIcon(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "vs2010"
|
_ACTION = "vs2010"
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
language "C#"
|
language "C#"
|
||||||
end
|
end
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 2)
|
prj = test.getproject(wks, 2)
|
||||||
cs2005.projectReferences(prj)
|
cs2005.projectReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
cs2005.targets(prj)
|
cs2005.targets(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
local function prepare(language)
|
local function prepare(language)
|
||||||
prj1.language = language
|
prj1.language = language
|
||||||
prj2.language = language
|
prj2.language = language
|
||||||
prj2 = premake.solution.getproject(wks, 2)
|
prj2 = test.getproject(wks, 2)
|
||||||
sln2005.projectdependencies(prj2)
|
sln2005.projectdependencies(prj2)
|
||||||
prj3.language = language
|
prj3.language = language
|
||||||
prj3 = premake.solution.getproject(wks, 3)
|
prj3 = test.getproject(wks, 3)
|
||||||
sln2005.projectdependencies(prj3)
|
sln2005.projectdependencies(prj3)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--
|
--
|
||||||
-- tests/actions/vstudio/sln2005/test_nested_projects.lua
|
-- tests/actions/vstudio/sln2005/test_nested_projects.lua
|
||||||
-- Check Visual Studio 2005+ Nested Projects solution block.
|
-- Check Visual Studio 2005+ Nested Projects solution block.
|
||||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.vstudio_sln2005_nested_projects = { }
|
local suite = test.declare("vstudio_sln2005_nested_projects")
|
||||||
local suite = T.vstudio_sln2005_nested_projects
|
|
||||||
local sln2005 = premake.vstudio.sln2005
|
local sln2005 = premake.vstudio.sln2005
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "vs2008"
|
_ACTION = "vs2008"
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
language "C++"
|
language "C++"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "vs2008"
|
_ACTION = "vs2008"
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
language "C++"
|
language "C++"
|
||||||
end
|
end
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
premake.escaper(premake.vstudio.vs2005.esc)
|
premake.escaper(premake.vstudio.vs2005.esc)
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
language "C++"
|
language "C++"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc200x.assemblyReferences(prj)
|
vc200x.assemblyReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.usesWin32_onX86()
|
function suite.usesWin32_onX86()
|
||||||
solution "MySolution"
|
workspace("MyWorkspace")
|
||||||
platforms { "x86" }
|
platforms { "x86" }
|
||||||
prepare()
|
prepare()
|
||||||
test.capture [[
|
test.capture [[
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "vs2008"
|
_ACTION = "vs2008"
|
||||||
|
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
platforms { "Zeus", "Ares" }
|
platforms { "Zeus", "Ares" }
|
||||||
language "C++"
|
language "C++"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc200x.platforms(prj)
|
vc200x.platforms(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc200x.visualStudioProject(prj)
|
vc200x.visualStudioProject(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 2)
|
prj = test.getproject(wks, 2)
|
||||||
vc200x.projectReferences(prj)
|
vc200x.projectReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc2010.assemblyReferences(prj)
|
vc2010.assemblyReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc2010.buildEvents(prj)
|
vc2010.buildEvents(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "vs2010"
|
_ACTION = "vs2010"
|
||||||
|
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
platforms { "Zeus", "Ares" }
|
platforms { "Zeus", "Ares" }
|
||||||
language "C++"
|
language "C++"
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc2010.files(prj)
|
vc2010.files(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc2010.globals(prj)
|
vc2010.globals(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
vc2010.projectConfigurations(prj)
|
vc2010.projectConfigurations(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(platform)
|
local function prepare(platform)
|
||||||
prj = premake.solution.getproject(wks, 2)
|
prj = test.getproject(wks, 2)
|
||||||
vc2010.projectReferences(prj)
|
vc2010.projectReferences(prj)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- tests/api/test_containers.lua
|
-- tests/api/test_containers.lua
|
||||||
-- Tests the API's solution() and project() container definitions.
|
-- Tests the API's workspace() and project() container definitions.
|
||||||
-- Copyright (c) 2013-2014 Jason Perkins and the Premake project
|
-- Copyright (c) 2013-2014 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
@ -23,13 +23,13 @@
|
|||||||
-- The first time a name is encountered, a new container should be created.
|
-- The first time a name is encountered, a new container should be created.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.solution_createsOnFirstUse()
|
function suite.workspace_createsOnFirstUse()
|
||||||
test.isnotnil(premake.global.getWorkspace("MyWorkspace"))
|
test.isnotnil(premake.global.getWorkspace("MyWorkspace"))
|
||||||
end
|
end
|
||||||
|
|
||||||
function suite.project_createsOnFirstUse()
|
function suite.project_createsOnFirstUse()
|
||||||
project("MyProject")
|
project("MyProject")
|
||||||
test.isnotnil(premake.solution.getproject(wks, "MyProject"))
|
test.isnotnil(test.getproject(wks, "MyProject"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -37,8 +37,8 @@
|
|||||||
-- When a container is created, it should become the active scope.
|
-- When a container is created, it should become the active scope.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.solution_setsActiveScope()
|
function suite.workspace_setsActiveScope()
|
||||||
test.issame(api.scope.solution, wks)
|
test.issame(api.scope.workspace, wks)
|
||||||
end
|
end
|
||||||
|
|
||||||
function suite.project_setsActiveScope()
|
function suite.project_setsActiveScope()
|
||||||
@ -52,11 +52,11 @@
|
|||||||
-- become the current scope.
|
-- become the current scope.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.solution_setsActiveScope_onNoArgs()
|
function suite.workspace_setsActiveScope_onNoArgs()
|
||||||
project("MyProject")
|
project("MyProject")
|
||||||
group("MyGroup")
|
group("MyGroup")
|
||||||
solution()
|
workspace()
|
||||||
test.issame(wks, api.scope.solution)
|
test.issame(wks, api.scope.workspace)
|
||||||
test.isnil(api.scope.project)
|
test.isnil(api.scope.project)
|
||||||
test.isnil(api.scope.group)
|
test.isnil(api.scope.group)
|
||||||
end
|
end
|
||||||
@ -73,12 +73,12 @@
|
|||||||
-- The "*" name should activate the parent scope.
|
-- The "*" name should activate the parent scope.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.solution_onStar()
|
function suite.workspace_onStar()
|
||||||
project("MyProject")
|
project("MyProject")
|
||||||
group("MyGroup")
|
group("MyGroup")
|
||||||
filter("Debug")
|
filter("Debug")
|
||||||
solution "*"
|
workspace("*")
|
||||||
test.isnil(api.scope.solution)
|
test.isnil(api.scope.workspace)
|
||||||
test.isnil(api.scope.project)
|
test.isnil(api.scope.project)
|
||||||
test.isnil(api.scope.group)
|
test.isnil(api.scope.group)
|
||||||
end
|
end
|
||||||
@ -88,6 +88,6 @@
|
|||||||
group("MyGroup")
|
group("MyGroup")
|
||||||
filter("Debug")
|
filter("Debug")
|
||||||
project "*"
|
project "*"
|
||||||
test.issame(wks, api.scope.solution)
|
test.issame(wks, api.scope.workspace)
|
||||||
test.isnil(api.scope.project)
|
test.isnil(api.scope.project)
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- tests/base/test_filename.lua
|
-- tests/base/test_filename.lua
|
||||||
-- Verify generation of project/solution/rule filenames.
|
-- Verify generation of project/workspace/rule filenames.
|
||||||
-- Copyright (c) 2008-2014 Jason Perkins and the Premake project
|
-- Copyright (c) 2008-2014 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
@ -67,10 +67,10 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Should also work with solutions.
|
-- Should also work with workspaces.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.worksWithSolution()
|
function suite.worksWithWorkspace()
|
||||||
prepare()
|
prepare()
|
||||||
test.isequal("MySolution", path.getname(p.filename(wks)))
|
test.isequal("MySolution", path.getname(p.filename(wks)))
|
||||||
end
|
end
|
||||||
@ -81,7 +81,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.doesNotPropagate()
|
function suite.doesNotPropagate()
|
||||||
solution ("MySolution")
|
workspace ("MyWorkspace")
|
||||||
filename ("Howdy")
|
filename ("Howdy")
|
||||||
prepare()
|
prepare()
|
||||||
test.isequal("MyProject", path.getname(p.filename(prj)))
|
test.isequal("MyProject", path.getname(p.filename(prj)))
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.passes_onSane()
|
function suite.passes_onSane()
|
||||||
solution "MySolution"
|
workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
@ -33,11 +33,11 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Fail if no configurations are present on the solution.
|
-- Fail if no configurations are present on the workspace.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.fails_onNoSolutionConfigs()
|
function suite.fails_onNoWorkspaceConfigs()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
language "C++"
|
language "C++"
|
||||||
@ -50,7 +50,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.fails_onDuplicateProjectIDs()
|
function suite.fails_onDuplicateProjectIDs()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
language "C++"
|
language "C++"
|
||||||
@ -67,7 +67,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.fails_onNoConfigKind()
|
function suite.fails_onNoConfigKind()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
language "C++"
|
language "C++"
|
||||||
@ -79,8 +79,8 @@
|
|||||||
-- Warn if a configuration value is set in the wrong scope.
|
-- Warn if a configuration value is set in the wrong scope.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.warns_onSolutionStringField_inConfig()
|
function suite.warns_onWorkspaceStringField_inConfig()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
filter "Debug"
|
filter "Debug"
|
||||||
startproject "MyProject"
|
startproject "MyProject"
|
||||||
@ -92,7 +92,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
function suite.warns_onProjectStringField_inConfig()
|
function suite.warns_onProjectStringField_inConfig()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
@ -104,7 +104,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
function suite.warns_onProjectListField_inConfig()
|
function suite.warns_onProjectListField_inConfig()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
@ -121,7 +121,7 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
function suite.fails_onNoSuchRule()
|
function suite.fails_onNoSuchRule()
|
||||||
solution "MySolution"
|
workspace "MyWorkspace"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project "MyProject"
|
project "MyProject"
|
||||||
rules { "NoSuchRule" }
|
rules { "NoSuchRule" }
|
||||||
|
@ -5,22 +5,20 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
local suite = test.declare("oven_filtering")
|
local suite = test.declare("oven_filtering")
|
||||||
local oven = premake.oven
|
|
||||||
local solution = premake.solution
|
|
||||||
|
|
||||||
local wks, prj
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Setup
|
-- Setup
|
||||||
--
|
--
|
||||||
|
|
||||||
|
local wks, prj
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = test.createWorkspace()
|
wks = test.createWorkspace()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
wks = test.getsolution(wks)
|
wks = test.getWorkspace(wks)
|
||||||
prj = test.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
-- tests/oven/test_objdirs.lua
|
-- tests/oven/test_objdirs.lua
|
||||||
-- Test the per-configuration object directory assignments.
|
-- Test the per-configuration object directory assignments.
|
||||||
-- Copyright (c) 2014 Jason Perkins and the Premake project
|
-- Copyright (c) 2014-2015 Jason Perkins and the Premake project
|
||||||
---
|
---
|
||||||
|
|
||||||
local suite = test.declare("oven_objdirs")
|
local suite = test.declare("oven_objdirs")
|
||||||
local oven = premake.oven
|
local oven = premake.oven
|
||||||
|
|
||||||
local wks, prj
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Setup
|
-- Setup
|
||||||
---
|
---
|
||||||
|
|
||||||
|
local wks, prj
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.singleProject_noPlatforms()
|
function suite.singleProject_noPlatforms()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.multipleProjects_noPlatforms()
|
function suite.multipleProjects_noPlatforms()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
project "MyProject2"
|
project "MyProject2"
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.singleProject_withPlatforms()
|
function suite.singleProject_withPlatforms()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
platforms { "x86", "x86_64" }
|
platforms { "x86", "x86_64" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.singleProject_uniqueByTokens_noPlatforms()
|
function suite.singleProject_uniqueByTokens_noPlatforms()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
objdir "obj/%{cfg.buildcfg}"
|
objdir "obj/%{cfg.buildcfg}"
|
||||||
@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.singleProject_uniqueByTokens_withPlatforms()
|
function suite.singleProject_uniqueByTokens_withPlatforms()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
platforms { "x86", "x86_64" }
|
platforms { "x86", "x86_64" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function suite.allowOverlap_onPrefixCode()
|
function suite.allowOverlap_onPrefixCode()
|
||||||
wks = solution "MySolution"
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
platforms { "x86", "x86_64" }
|
platforms { "x86", "x86_64" }
|
||||||
prj = project "MyProject"
|
prj = project "MyProject"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--
|
--
|
||||||
-- tests/project/test_config_maps.lua
|
-- tests/project/test_config_maps.lua
|
||||||
-- Test mapping from solution to project configurations.
|
-- Test mapping from workspace to project configurations.
|
||||||
-- Copyright (c) 2012-2014 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2014 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
local wks, prj, cfg
|
local wks, prj, cfg
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -25,11 +25,11 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- When no configuration is specified in the project, the solution
|
-- When no configuration is specified in the project, the workspace
|
||||||
-- settings should map directly to a configuration object.
|
-- settings should map directly to a configuration object.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.solutionConfig_onNoProjectConfigs()
|
function suite.workspaceConfig_onNoProjectConfigs()
|
||||||
project ("MyProject")
|
project ("MyProject")
|
||||||
prepare()
|
prepare()
|
||||||
test.isequal("Debug", cfg.buildcfg)
|
test.isequal("Debug", cfg.buildcfg)
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
--
|
--
|
||||||
-- tests/project/test_eachconfig.lua
|
-- tests/project/test_eachconfig.lua
|
||||||
-- Test the project object configuration iterator function.
|
-- Test the project object configuration iterator function.
|
||||||
-- Copyright (c) 2011-2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2011-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.project_eachconfig = { }
|
local suite = test.declare("project_eachconfig")
|
||||||
local suite = T.project_eachconfig
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -15,7 +14,7 @@
|
|||||||
local wks, prj
|
local wks, prj
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function prepare(buildcfgs)
|
local function prepare(buildcfgs)
|
||||||
@ -23,7 +22,7 @@
|
|||||||
if buildcfgs then
|
if buildcfgs then
|
||||||
configurations ( buildcfgs )
|
configurations ( buildcfgs )
|
||||||
end
|
end
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
for cfg in premake.project.eachconfig(prj) do
|
for cfg in premake.project.eachconfig(prj) do
|
||||||
_p(2,'%s:%s', cfg.buildcfg or "", cfg.platform or "")
|
_p(2,'%s:%s', cfg.buildcfg or "", cfg.platform or "")
|
||||||
end
|
end
|
||||||
@ -89,7 +88,7 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Test the mapping of a build configuration from solution to project.
|
-- Test the mapping of a build configuration from workspace to project.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.mapsBuildCfg_toBuildCfg()
|
function suite.mapsBuildCfg_toBuildCfg()
|
||||||
@ -104,7 +103,7 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Test mapping a platform from solution to project.
|
-- Test mapping a platform from workspace to project.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.mapsPlatform_toPlatform()
|
function suite.mapsPlatform_toPlatform()
|
||||||
@ -122,7 +121,7 @@
|
|||||||
--
|
--
|
||||||
-- Test mapping a build configuration to a build config/platform pair.
|
-- Test mapping a build configuration to a build config/platform pair.
|
||||||
-- This will cause a second platform to appear in the project, alongside
|
-- This will cause a second platform to appear in the project, alongside
|
||||||
-- the one defined by the solution.
|
-- the one defined by the workspace.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.mapsBuildCfg_toBuildCfgAndPlatform()
|
function suite.mapsBuildCfg_toBuildCfgAndPlatform()
|
||||||
@ -155,12 +154,12 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- If there is overlap in the solution and project configuration lists,
|
-- If there is overlap in the workspace and project configuration lists,
|
||||||
-- the ordering at the project level should be maintained to avoid
|
-- the ordering at the project level should be maintained to avoid
|
||||||
-- unnecessarily dirtying the project file.
|
-- unnecessarily dirtying the project file.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.maintainsProjectOrdering_onSolutionOverlap()
|
function suite.maintainsProjectOrdering_onWorkspaceOverlap()
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
prepare { "Debug", "Development", "Profile", "Release" }
|
prepare { "Debug", "Development", "Profile", "Release" }
|
||||||
test.capture [[
|
test.capture [[
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
local wks, prj, cfg
|
local wks, prj, cfg
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
prj = premake.solution.getproject(wks, 1)
|
prj = test.getproject(wks, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -45,12 +45,12 @@
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- If the solution sets a location, and the project does not, it should
|
-- If the workspace sets a location, and the project does not, it should
|
||||||
-- inherit the value from the solution.
|
-- inherit the value from the workspace.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.inheritsSolutionLocation_onNoProjectLocation()
|
function suite.inheritsWorkspaceLocation_onNoProjectLocation()
|
||||||
solution ()
|
workspace ()
|
||||||
location "build"
|
location "build"
|
||||||
prepare()
|
prepare()
|
||||||
test.isequal(path.join(os.getcwd(), "build"), prj.location)
|
test.isequal(path.join(os.getcwd(), "build"), prj.location)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
--
|
--
|
||||||
-- tests/solution/test_eachconfig.lua
|
-- tests/workspace/test_eachconfig.lua
|
||||||
-- Automated test suite for the solution-level configuration iterator.
|
-- Automated test suite for the workspace-level configuration iterator.
|
||||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
T.solution_eachconfig = { }
|
local suite = test.declare("workspace_eachconfig")
|
||||||
local suite = T.solution_eachconfig
|
|
||||||
|
local p = premake
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -13,32 +14,33 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
local wks
|
local wks
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
_p(2,"-")
|
p.w("-")
|
||||||
for cfg in premake.solution.eachconfig(wks) do
|
for cfg in p.workspace.eachconfig(wks) do
|
||||||
_p(2, "%s:%s", cfg.buildcfg or "", cfg.platform or "")
|
p.w("%s:%s", cfg.buildcfg or "", cfg.platform or "")
|
||||||
end
|
end
|
||||||
_p(2,"-")
|
p.w("-")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- All configurations listed at the solution level should be enumerated.
|
-- All configurations listed at the workspace level should be enumerated.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.listsBuildConfigurations_onSolutionLevel()
|
function suite.listsBuildConfigurations_onWorkspaceLevel()
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
project("MyProject")
|
project("MyProject")
|
||||||
prepare()
|
prepare()
|
||||||
test.capture [[
|
test.capture [[
|
||||||
-
|
-
|
||||||
Debug:
|
Debug:
|
||||||
Release:
|
Release:
|
||||||
-
|
-
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -53,19 +55,19 @@
|
|||||||
project("MyProject")
|
project("MyProject")
|
||||||
prepare()
|
prepare()
|
||||||
test.capture [[
|
test.capture [[
|
||||||
-
|
-
|
||||||
Debug:x86
|
Debug:x86
|
||||||
Debug:x86_64
|
Debug:x86_64
|
||||||
Release:x86
|
Release:x86
|
||||||
Release:x86_64
|
Release:x86_64
|
||||||
-
|
-
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Configurations listed at the project level should *not* be included
|
-- Configurations listed at the project level should *not* be included
|
||||||
-- in the solution-level lists.
|
-- in the workspace-level lists.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.excludesProjectLevelConfigs()
|
function suite.excludesProjectLevelConfigs()
|
||||||
@ -75,9 +77,9 @@
|
|||||||
platforms { "x86", "x86_64" }
|
platforms { "x86", "x86_64" }
|
||||||
prepare()
|
prepare()
|
||||||
test.capture [[
|
test.capture [[
|
||||||
-
|
-
|
||||||
Debug:
|
Debug:
|
||||||
Release:
|
Release:
|
||||||
-
|
-
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
--
|
--
|
||||||
-- tests/solution/test_location.lua
|
-- tests/workspace/test_location.lua
|
||||||
-- Test handling of the solution's location field.
|
-- Test handling of the workspace's location field.
|
||||||
-- Copyright (c) 2013-2015 Jason Perkins and the Premake project
|
-- Copyright (c) 2013-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
local suite = test.declare("solution_location")
|
local suite = test.declare("workspace_location")
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -14,17 +14,17 @@
|
|||||||
local wks
|
local wks
|
||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function prepare()
|
local function prepare()
|
||||||
wks = test.getsolution(wks)
|
wks = test.getWorkspace(wks)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- If no explicit location is set, the location should be set to the
|
-- If no explicit location is set, the location should be set to the
|
||||||
-- directory containing the script which defined the solution.
|
-- directory containing the script which defined the workspace.
|
||||||
--
|
--
|
||||||
|
|
||||||
function suite.usesScriptLocation_onNoLocation()
|
function suite.usesScriptLocation_onNoLocation()
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
--
|
--
|
||||||
-- tests/solution/test_objdirs.lua
|
-- tests/workspace/test_objdirs.lua
|
||||||
-- Test the solution unique objects directory building.
|
-- Test the workspace unique objects directory building.
|
||||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||||
--
|
--
|
||||||
|
|
||||||
local suite = test.declare("solution_objdir")
|
local suite = test.declare("workspace_objdir")
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
function suite.setup()
|
function suite.setup()
|
||||||
_ACTION = "test"
|
_ACTION = "test"
|
||||||
wks = solution("MySolution")
|
wks = workspace("MyWorkspace")
|
||||||
system "macosx"
|
system "macosx"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user