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
|
||||
-- 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 make = premake.make
|
||||
local project = premake.project
|
||||
|
||||
local p = premake
|
||||
|
||||
|
||||
--
|
||||
@ -20,8 +20,8 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
make.cppObjects(prj)
|
||||
prj = test.getproject(wks, 1)
|
||||
p.make.cppObjects(prj)
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
--
|
||||
-- tests/actions/make/test_default_config.lua
|
||||
-- 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 = T.make_default_config
|
||||
local make = premake.make
|
||||
local suite = test.declare("make_default_config")
|
||||
|
||||
local p = premake
|
||||
|
||||
|
||||
--
|
||||
@ -20,8 +20,8 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.workspace.getproject(wks, 1)
|
||||
make.defaultconfig(prj)
|
||||
prj = test.getproject(wks, 1)
|
||||
p.make.defaultconfig(prj)
|
||||
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.
|
||||
--
|
||||
|
||||
|
@ -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
|
||||
-- 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()
|
||||
@ -42,8 +42,10 @@
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Transform solution groups into target aggregate
|
||||
-- Transform workspace groups into target aggregate
|
||||
--
|
||||
function suite.groupRule_groupRules()
|
||||
prepare()
|
||||
|
@ -1,6 +1,6 @@
|
||||
--
|
||||
-- tests/actions/make/solution/test_project_rule.lua
|
||||
-- Validate generation of project rules in solution makefile.
|
||||
-- tests/actions/make/workspace/test_project_rule.lua
|
||||
-- Validate generation of project rules in workspace makefile.
|
||||
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
--
|
||||
-- tests/actions/vstudio/cs2005/projectsettings.lua
|
||||
-- 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 = T.vstudio_cs2005_projectsettings
|
||||
local suite = test.declare("vstudio_cs2005_projectsettings")
|
||||
|
||||
local cs2005 = premake.vstudio.cs2005
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.projectProperties(prj)
|
||||
end
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
--
|
||||
-- tests/actions/vstudio/cs2005/test_assembly_refs.lua
|
||||
-- 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 = T.vstudio_cs2005_assembly_refs
|
||||
local suite = test.declare("vstudio_cs2005_assembly_refs")
|
||||
|
||||
local cs2005 = premake.vstudio.cs2005
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.assemblyReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.buildEvents(prj)
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.commonProperties(prj)
|
||||
end
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.files(prj)
|
||||
end
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.applicationIcon(prj)
|
||||
end
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
function suite.setup()
|
||||
_ACTION = "vs2010"
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
language "C#"
|
||||
end
|
||||
|
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 2)
|
||||
prj = test.getproject(wks, 2)
|
||||
cs2005.projectReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
cs2005.targets(prj)
|
||||
end
|
||||
|
||||
|
@ -30,10 +30,10 @@
|
||||
local function prepare(language)
|
||||
prj1.language = language
|
||||
prj2.language = language
|
||||
prj2 = premake.solution.getproject(wks, 2)
|
||||
prj2 = test.getproject(wks, 2)
|
||||
sln2005.projectdependencies(prj2)
|
||||
prj3.language = language
|
||||
prj3 = premake.solution.getproject(wks, 3)
|
||||
prj3 = test.getproject(wks, 3)
|
||||
sln2005.projectdependencies(prj3)
|
||||
end
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
--
|
||||
-- tests/actions/vstudio/sln2005/test_nested_projects.lua
|
||||
-- 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 = T.vstudio_sln2005_nested_projects
|
||||
local suite = test.declare("vstudio_sln2005_nested_projects")
|
||||
|
||||
local sln2005 = premake.vstudio.sln2005
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
function suite.setup()
|
||||
_ACTION = "vs2008"
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
language "C++"
|
||||
kind "ConsoleApp"
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
function suite.setup()
|
||||
_ACTION = "vs2008"
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
language "C++"
|
||||
end
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
function suite.setup()
|
||||
premake.escaper(premake.vstudio.vs2005.esc)
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
language "C++"
|
||||
kind "ConsoleApp"
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc200x.assemblyReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
--
|
||||
|
||||
function suite.usesWin32_onX86()
|
||||
solution "MySolution"
|
||||
workspace("MyWorkspace")
|
||||
platforms { "x86" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
|
@ -17,7 +17,7 @@
|
||||
function suite.setup()
|
||||
_ACTION = "vs2008"
|
||||
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
platforms { "Zeus", "Ares" }
|
||||
language "C++"
|
||||
|
@ -21,7 +21,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc200x.platforms(prj)
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc200x.visualStudioProject(prj)
|
||||
end
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 2)
|
||||
prj = test.getproject(wks, 2)
|
||||
vc200x.projectReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc2010.assemblyReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc2010.buildEvents(prj)
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
function suite.setup()
|
||||
_ACTION = "vs2010"
|
||||
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
platforms { "Zeus", "Ares" }
|
||||
language "C++"
|
||||
|
@ -29,7 +29,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc2010.files(prj)
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc2010.globals(prj)
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
vc2010.projectConfigurations(prj)
|
||||
end
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function prepare(platform)
|
||||
prj = premake.solution.getproject(wks, 2)
|
||||
prj = test.getproject(wks, 2)
|
||||
vc2010.projectReferences(prj)
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--
|
||||
-- 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
|
||||
--
|
||||
|
||||
@ -23,13 +23,13 @@
|
||||
-- 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"))
|
||||
end
|
||||
|
||||
function suite.project_createsOnFirstUse()
|
||||
project("MyProject")
|
||||
test.isnotnil(premake.solution.getproject(wks, "MyProject"))
|
||||
test.isnotnil(test.getproject(wks, "MyProject"))
|
||||
end
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@
|
||||
-- When a container is created, it should become the active scope.
|
||||
--
|
||||
|
||||
function suite.solution_setsActiveScope()
|
||||
test.issame(api.scope.solution, wks)
|
||||
function suite.workspace_setsActiveScope()
|
||||
test.issame(api.scope.workspace, wks)
|
||||
end
|
||||
|
||||
function suite.project_setsActiveScope()
|
||||
@ -52,11 +52,11 @@
|
||||
-- become the current scope.
|
||||
--
|
||||
|
||||
function suite.solution_setsActiveScope_onNoArgs()
|
||||
function suite.workspace_setsActiveScope_onNoArgs()
|
||||
project("MyProject")
|
||||
group("MyGroup")
|
||||
solution()
|
||||
test.issame(wks, api.scope.solution)
|
||||
workspace()
|
||||
test.issame(wks, api.scope.workspace)
|
||||
test.isnil(api.scope.project)
|
||||
test.isnil(api.scope.group)
|
||||
end
|
||||
@ -73,12 +73,12 @@
|
||||
-- The "*" name should activate the parent scope.
|
||||
--
|
||||
|
||||
function suite.solution_onStar()
|
||||
function suite.workspace_onStar()
|
||||
project("MyProject")
|
||||
group("MyGroup")
|
||||
filter("Debug")
|
||||
solution "*"
|
||||
test.isnil(api.scope.solution)
|
||||
workspace("*")
|
||||
test.isnil(api.scope.workspace)
|
||||
test.isnil(api.scope.project)
|
||||
test.isnil(api.scope.group)
|
||||
end
|
||||
@ -88,6 +88,6 @@
|
||||
group("MyGroup")
|
||||
filter("Debug")
|
||||
project "*"
|
||||
test.issame(wks, api.scope.solution)
|
||||
test.issame(wks, api.scope.workspace)
|
||||
test.isnil(api.scope.project)
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
--
|
||||
-- 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
|
||||
--
|
||||
|
||||
@ -67,10 +67,10 @@
|
||||
|
||||
|
||||
--
|
||||
-- Should also work with solutions.
|
||||
-- Should also work with workspaces.
|
||||
--
|
||||
|
||||
function suite.worksWithSolution()
|
||||
function suite.worksWithWorkspace()
|
||||
prepare()
|
||||
test.isequal("MySolution", path.getname(p.filename(wks)))
|
||||
end
|
||||
@ -81,7 +81,7 @@
|
||||
--
|
||||
|
||||
function suite.doesNotPropagate()
|
||||
solution ("MySolution")
|
||||
workspace ("MyWorkspace")
|
||||
filename ("Howdy")
|
||||
prepare()
|
||||
test.isequal("MyProject", path.getname(p.filename(prj)))
|
||||
|
@ -23,7 +23,7 @@
|
||||
--
|
||||
|
||||
function suite.passes_onSane()
|
||||
solution "MySolution"
|
||||
workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
project "MyProject"
|
||||
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()
|
||||
solution "MySolution"
|
||||
function suite.fails_onNoWorkspaceConfigs()
|
||||
workspace "MyWorkspace"
|
||||
project "MyProject"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
@ -50,7 +50,7 @@
|
||||
--
|
||||
|
||||
function suite.fails_onDuplicateProjectIDs()
|
||||
solution "MySolution"
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
@ -67,7 +67,7 @@
|
||||
--
|
||||
|
||||
function suite.fails_onNoConfigKind()
|
||||
solution "MySolution"
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
project "MyProject"
|
||||
language "C++"
|
||||
@ -79,8 +79,8 @@
|
||||
-- Warn if a configuration value is set in the wrong scope.
|
||||
--
|
||||
|
||||
function suite.warns_onSolutionStringField_inConfig()
|
||||
solution "MySolution"
|
||||
function suite.warns_onWorkspaceStringField_inConfig()
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
filter "Debug"
|
||||
startproject "MyProject"
|
||||
@ -92,7 +92,7 @@
|
||||
end
|
||||
|
||||
function suite.warns_onProjectStringField_inConfig()
|
||||
solution "MySolution"
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
project "MyProject"
|
||||
kind "ConsoleApp"
|
||||
@ -104,7 +104,7 @@
|
||||
end
|
||||
|
||||
function suite.warns_onProjectListField_inConfig()
|
||||
solution "MySolution"
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
project "MyProject"
|
||||
kind "ConsoleApp"
|
||||
@ -121,7 +121,7 @@
|
||||
--
|
||||
|
||||
function suite.fails_onNoSuchRule()
|
||||
solution "MySolution"
|
||||
workspace "MyWorkspace"
|
||||
configurations { "Debug", "Release" }
|
||||
project "MyProject"
|
||||
rules { "NoSuchRule" }
|
||||
|
@ -5,22 +5,20 @@
|
||||
--
|
||||
|
||||
local suite = test.declare("oven_filtering")
|
||||
local oven = premake.oven
|
||||
local solution = premake.solution
|
||||
|
||||
local wks, prj
|
||||
|
||||
|
||||
--
|
||||
-- Setup
|
||||
--
|
||||
|
||||
local wks, prj
|
||||
|
||||
function suite.setup()
|
||||
wks = test.createWorkspace()
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
wks = test.getsolution(wks)
|
||||
wks = test.getWorkspace(wks)
|
||||
prj = test.getproject(wks, 1)
|
||||
end
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
---
|
||||
-- tests/oven/test_objdirs.lua
|
||||
-- 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 oven = premake.oven
|
||||
|
||||
local wks, prj
|
||||
|
||||
---
|
||||
-- Setup
|
||||
---
|
||||
|
||||
local wks, prj
|
||||
|
||||
function suite.setup()
|
||||
end
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
function suite.singleProject_noPlatforms()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
prj = project "MyProject"
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
function suite.multipleProjects_noPlatforms()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
prj = project "MyProject"
|
||||
project "MyProject2"
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
function suite.singleProject_withPlatforms()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
platforms { "x86", "x86_64" }
|
||||
prj = project "MyProject"
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
function suite.singleProject_uniqueByTokens_noPlatforms()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
prj = project "MyProject"
|
||||
objdir "obj/%{cfg.buildcfg}"
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
|
||||
function suite.singleProject_uniqueByTokens_withPlatforms()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
platforms { "x86", "x86_64" }
|
||||
prj = project "MyProject"
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
|
||||
function suite.allowOverlap_onPrefixCode()
|
||||
wks = solution "MySolution"
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
platforms { "x86", "x86_64" }
|
||||
prj = project "MyProject"
|
||||
|
@ -1,6 +1,6 @@
|
||||
--
|
||||
-- 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
|
||||
--
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
local wks, prj, cfg
|
||||
|
||||
function suite.setup()
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
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.
|
||||
--
|
||||
|
||||
function suite.solutionConfig_onNoProjectConfigs()
|
||||
function suite.workspaceConfig_onNoProjectConfigs()
|
||||
project ("MyProject")
|
||||
prepare()
|
||||
test.isequal("Debug", cfg.buildcfg)
|
||||
|
@ -1,11 +1,10 @@
|
||||
--
|
||||
-- tests/project/test_eachconfig.lua
|
||||
-- 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 = T.project_eachconfig
|
||||
local suite = test.declare("project_eachconfig")
|
||||
|
||||
|
||||
--
|
||||
@ -15,7 +14,7 @@
|
||||
local wks, prj
|
||||
|
||||
function suite.setup()
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
end
|
||||
|
||||
local function prepare(buildcfgs)
|
||||
@ -23,7 +22,7 @@
|
||||
if buildcfgs then
|
||||
configurations ( buildcfgs )
|
||||
end
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
for cfg in premake.project.eachconfig(prj) do
|
||||
_p(2,'%s:%s', cfg.buildcfg or "", cfg.platform or "")
|
||||
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()
|
||||
@ -104,7 +103,7 @@
|
||||
|
||||
|
||||
--
|
||||
-- Test mapping a platform from solution to project.
|
||||
-- Test mapping a platform from workspace to project.
|
||||
--
|
||||
|
||||
function suite.mapsPlatform_toPlatform()
|
||||
@ -122,7 +121,7 @@
|
||||
--
|
||||
-- Test mapping a build configuration to a build config/platform pair.
|
||||
-- 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()
|
||||
@ -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
|
||||
-- unnecessarily dirtying the project file.
|
||||
--
|
||||
|
||||
function suite.maintainsProjectOrdering_onSolutionOverlap()
|
||||
function suite.maintainsProjectOrdering_onWorkspaceOverlap()
|
||||
configurations { "Debug", "Release" }
|
||||
prepare { "Debug", "Development", "Profile", "Release" }
|
||||
test.capture [[
|
||||
|
@ -13,7 +13,7 @@
|
||||
local wks, prj, cfg
|
||||
|
||||
function suite.setup()
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
configurations { "Debug", "Release" }
|
||||
end
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
prj = premake.solution.getproject(wks, 1)
|
||||
prj = test.getproject(wks, 1)
|
||||
end
|
||||
|
||||
|
||||
@ -45,12 +45,12 @@
|
||||
|
||||
|
||||
--
|
||||
-- If the solution sets a location, and the project does not, it should
|
||||
-- inherit the value from the solution.
|
||||
-- If the workspace sets a location, and the project does not, it should
|
||||
-- inherit the value from the workspace.
|
||||
--
|
||||
|
||||
function suite.inheritsSolutionLocation_onNoProjectLocation()
|
||||
solution ()
|
||||
function suite.inheritsWorkspaceLocation_onNoProjectLocation()
|
||||
workspace ()
|
||||
location "build"
|
||||
prepare()
|
||||
test.isequal(path.join(os.getcwd(), "build"), prj.location)
|
||||
|
@ -1,11 +1,12 @@
|
||||
--
|
||||
-- tests/solution/test_eachconfig.lua
|
||||
-- Automated test suite for the solution-level configuration iterator.
|
||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
||||
-- tests/workspace/test_eachconfig.lua
|
||||
-- Automated test suite for the workspace-level configuration iterator.
|
||||
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
T.solution_eachconfig = { }
|
||||
local suite = T.solution_eachconfig
|
||||
local suite = test.declare("workspace_eachconfig")
|
||||
|
||||
local p = premake
|
||||
|
||||
|
||||
--
|
||||
@ -13,24 +14,25 @@
|
||||
--
|
||||
|
||||
local wks
|
||||
|
||||
function suite.setup()
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
_p(2,"-")
|
||||
for cfg in premake.solution.eachconfig(wks) do
|
||||
_p(2, "%s:%s", cfg.buildcfg or "", cfg.platform or "")
|
||||
p.w("-")
|
||||
for cfg in p.workspace.eachconfig(wks) do
|
||||
p.w("%s:%s", cfg.buildcfg or "", cfg.platform or "")
|
||||
end
|
||||
_p(2,"-")
|
||||
p.w("-")
|
||||
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" }
|
||||
project("MyProject")
|
||||
prepare()
|
||||
@ -65,7 +67,7 @@
|
||||
|
||||
--
|
||||
-- Configurations listed at the project level should *not* be included
|
||||
-- in the solution-level lists.
|
||||
-- in the workspace-level lists.
|
||||
--
|
||||
|
||||
function suite.excludesProjectLevelConfigs()
|
||||
|
@ -1,10 +1,10 @@
|
||||
--
|
||||
-- tests/solution/test_location.lua
|
||||
-- Test handling of the solution's location field.
|
||||
-- tests/workspace/test_location.lua
|
||||
-- Test handling of the workspace's location field.
|
||||
-- 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
|
||||
|
||||
function suite.setup()
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
wks = test.getsolution(wks)
|
||||
wks = test.getWorkspace(wks)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- 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()
|
||||
|
@ -1,10 +1,10 @@
|
||||
--
|
||||
-- tests/solution/test_objdirs.lua
|
||||
-- Test the solution unique objects directory building.
|
||||
-- Copyright (c) 2012 Jason Perkins and the Premake project
|
||||
-- tests/workspace/test_objdirs.lua
|
||||
-- Test the workspace unique objects directory building.
|
||||
-- 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()
|
||||
_ACTION = "test"
|
||||
wks = solution("MySolution")
|
||||
wks = workspace("MyWorkspace")
|
||||
system "macosx"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user