Converted premake-core tests over to use premake.action.set() instead of _ACTION

This commit is contained in:
Sam Surtees 2015-10-14 22:04:22 +10:00
parent f60a1b391f
commit d382228ceb
65 changed files with 98 additions and 83 deletions

View File

@ -15,6 +15,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks = test.createWorkspace()
end

View File

@ -29,7 +29,7 @@
--
function suite.on2005()
_ACTION = "vs2005"
premake.action.set("vs2005")
prepare()
test.capture [[
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@ -38,7 +38,7 @@
function suite.on2008()
_ACTION = "vs2008"
premake.action.set("vs2008")
prepare()
test.capture [[
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@ -47,7 +47,7 @@
function suite.on2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.capture [[
<?xml version="1.0" encoding="utf-8"?>
@ -57,7 +57,7 @@
function suite.on2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
prepare()
test.capture [[
<?xml version="1.0" encoding="utf-8"?>
@ -67,7 +67,7 @@
function suite.on2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
prepare()
test.capture [[
<?xml version="1.0" encoding="utf-8"?>

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2005"
premake.action.set("vs2005")
wks = test.createWorkspace()
language "C#"
uuid "AE61726D-187C-E440-BD07-2556188A6565"
@ -51,7 +51,7 @@
function suite.OnVs2008()
_ACTION = "vs2008"
premake.action.set("vs2008")
prepare()
test.capture [[
<PropertyGroup>
@ -70,7 +70,7 @@
function suite.OnVs2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.capture [[
<PropertyGroup>
@ -93,7 +93,7 @@
function suite.onVs2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
prepare()
test.capture [[
<PropertyGroup>
@ -183,7 +183,7 @@
--
function suite.projectTypeGuids_onWPF()
_ACTION = "vs2010"
premake.action.set("vs2010")
flags { "WPF" }
prepare()
test.capture [[

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
language "C#"
end

View File

@ -15,6 +15,7 @@
local wks, prj, cfg
function suite.setup()
premake.action.set("vs2005")
premake.escaper(premake.vstudio.vs2010.esc)
wks = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2012"
premake.action.set("vs2012")
wks = test.createWorkspace()
language "C#"
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2005"
premake.action.set("vs2005")
wks, prj = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2005"
premake.action.set("vs2005")
wks, prj = test.createWorkspace()
end

View File

@ -15,6 +15,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2005")
wks = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2005"
premake.action.set("vs2005")
wks, prj = test.createWorkspace()
language "C#"
end
@ -45,7 +45,7 @@
--
function suite.intermediateDirectory_onVs2008()
_ACTION = "vs2008"
premake.action.set("vs2008")
prepare()
test.capture [[
<OutputPath>bin\Debug\</OutputPath>
@ -54,7 +54,7 @@
end
function suite.intermediateDirectory_onVs2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.capture [[
<OutputPath>bin\Debug\</OutputPath>

View File

@ -14,7 +14,7 @@
local wks
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }
language "C#"
@ -32,7 +32,7 @@
--
function suite.vs2008()
_ACTION = "vs2008"
premake.action.set("vs2008")
prepare()
test.capture [[
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -41,7 +41,7 @@
function suite.vs2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.capture [[
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -55,7 +55,7 @@
--
function suite.vs2008_onAnyCpu()
_ACTION = "vs2008"
premake.action.set("vs2008")
platforms "Any CPU"
prepare("Any CPU")
test.capture [[
@ -65,7 +65,7 @@
function suite.vs2010_onAnyCpu()
_ACTION = "vs2010"
premake.action.set("vs2010")
platforms "Any CPU"
prepare("Any CPU")
test.capture [[

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
uuid "00112233-4455-6677-8888-99AABBCCDDEE"
test.createproject(wks)

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2012"
premake.action.set("vs2012")
wks = test.createWorkspace()
language "C#"
end

View File

@ -15,7 +15,7 @@
local wks
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
language "C#"
end

View File

@ -16,7 +16,7 @@
local wks, prj1, prj2
function suite.setup()
_ACTION = "vs2005"
premake.action.set("vs2005")
wks, prj1 = test.createWorkspace()
uuid "AE61726D-187C-E440-BD07-2556188A6565"
prj2 = test.createproject(wks)
@ -71,7 +71,7 @@ EndProjectSection
--
function suite.dependency_onCSharpProjectsVs2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare("C#")
test.capture [[
ProjectSection(ProjectDependencies) = postProject
@ -87,7 +87,7 @@ EndProjectSection
--
function suite.dependency_onCSharpProjectsVs2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
prepare("C#")
test.capture [[
ProjectSection(ProjectDependencies) = postProject

View File

@ -28,7 +28,7 @@
--
function suite.on2005()
_ACTION = "vs2005"
premake.action.set("vs2005")
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 9.00
@ -38,7 +38,7 @@ Microsoft Visual Studio Solution File, Format Version 9.00
function suite.on2008()
_ACTION = "vs2008"
premake.action.set("vs2008")
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 10.00
@ -48,7 +48,7 @@ Microsoft Visual Studio Solution File, Format Version 10.00
function suite.on2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 11.00
@ -58,7 +58,7 @@ Microsoft Visual Studio Solution File, Format Version 11.00
function suite.on2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
@ -68,7 +68,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
function suite.on2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00

View File

@ -16,7 +16,7 @@
local wks
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }
language "C++"

View File

@ -15,7 +15,7 @@
local wks
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }
language "C++"

View File

@ -15,6 +15,7 @@
local wks
function suite.setup()
premake.action.set("vs2005")
premake.escaper(premake.vstudio.vs2005.esc)
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }

View File

@ -15,6 +15,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2005")
wks = test.createWorkspace()
clr "On"
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks, prj = test.createWorkspace()
end
@ -382,7 +382,7 @@
--
function suite._64BitPortabilityOn_onVS2005()
_ACTION = "vs2005"
premake.action.set("vs2005")
prepare()
test.capture [[
<Tool
@ -400,7 +400,7 @@
end
function suite._64BitPortabilityOff_onVS2005_andCLR()
_ACTION = "vs2005"
premake.action.set("vs2005")
clr "On"
prepare()
test.capture [[
@ -422,7 +422,7 @@
--
function suite.runtimeLibraryIsDebug_onVS2005_NoWarnings()
_ACTION = "vs2005"
premake.action.set("vs2005")
warnings "Off"
prepare()
test.capture [[

View File

@ -17,7 +17,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks, prj = test.createWorkspace()
end

View File

@ -16,6 +16,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2005")
premake.escaper(premake.vstudio.vs2005.esc)
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
premake.escaper(premake.vstudio.vs2005.esc)
wks = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
premake.escaper(premake.vstudio.vs2005.esc)
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks, prj = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
uuid "00112233-4455-6677-8888-99AABBCCDDEE"
test.createproject(wks)

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks
function suite.setup()
_ACTION = "vs2008"
premake.action.set("vs2008")
wks = test.createWorkspace()
end

View File

@ -15,6 +15,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks = test.createWorkspace()
clr "On"
end

View File

@ -15,6 +15,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -16,6 +16,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -16,6 +16,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = workspace("MyWorkspace")
configurations { "Debug", "Release" }

View File

@ -16,6 +16,7 @@
local wks
function suite.setup()
premake.action.set("vs2010")
rule "MyRules"
rule "MyOtherRules"
wks = test.createWorkspace()

View File

@ -16,6 +16,7 @@
local wks
function suite.setup()
premake.action.set("vs2010")
rule "MyRules"
rule "MyOtherRules"
wks = test.createWorkspace()

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
rule "Animation"
fileextension ".dae"

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
end

View File

@ -13,7 +13,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
end
@ -78,7 +78,7 @@
end
function suite.frameworkVersionIsCorrect_on2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
clr "On"
prepare()
test.capture [[
@ -180,7 +180,7 @@
--
function suite.structureIsCorrect_on2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
prepare()
test.capture [[
<PropertyGroup Label="Globals">

View File

@ -14,7 +14,7 @@
--
function suite.project_on2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@ -22,7 +22,7 @@
end
function suite.project_on2011()
_ACTION = "vs2012"
premake.action.set("vs2012")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@ -30,7 +30,7 @@
end
function suite.project_on2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

View File

@ -16,6 +16,7 @@
local wks
function suite.setup()
premake.action.set("vs2010")
rule "MyRules"
rule "MyOtherRules"
wks = test.createWorkspace()

View File

@ -16,6 +16,7 @@
local wks
function suite.setup()
premake.action.set("vs2010")
rule "MyRules"
rule "MyOtherRules"
wks = test.createWorkspace()

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
kind "SharedLib"
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
kind "ConsoleApp"
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
kind "Makefile"
end

View File

@ -15,7 +15,7 @@
local wks
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2012"
premake.action.set("vs2012")
wks, prj = test.createWorkspace()
files "hello.cpp"
end
@ -32,14 +32,14 @@
--
function suite.correctDefault_onVS2010()
_ACTION = "vs2010"
premake.action.set("vs2010")
prepare()
test.isemptycapture()
end
function suite.correctDefault_onVS2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
prepare()
test.capture [[
<PlatformToolset>v110</PlatformToolset>
@ -48,7 +48,7 @@
function suite.correctDefault_onVS2013()
_ACTION = "vs2013"
premake.action.set("vs2013")
prepare()
test.capture [[
<PlatformToolset>v120</PlatformToolset>

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
end

View File

@ -16,7 +16,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
uuid "00112233-4455-6677-8888-99AABBCCDDEE"
test.createproject(wks)

View File

@ -16,6 +16,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end

View File

@ -16,6 +16,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
premake.escaper(premake.vstudio.vs2010.esc)
wks, prj = test.createWorkspace()
end

View File

@ -18,6 +18,7 @@
local wks, prj
function suite.setup()
premake.action.set("vs2010")
rule "MyRule"
wks, prj = test.createWorkspace()
rules { "MyRule" }

View File

@ -15,7 +15,7 @@
local wks
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks = test.createWorkspace()
end

View File

@ -13,7 +13,7 @@
local wks, prj
function suite.setup()
_ACTION = "vs2010"
premake.action.set("vs2010")
wks, prj = test.createWorkspace()
end
@ -46,7 +46,7 @@
end
function suite.instructionSet_onAVX()
_ACTION = "vs2013"
premake.action.set("vs2013")
vectorextensions "AVX"
prepare()
test.capture [[
@ -61,7 +61,7 @@
end
function suite.instructionSet_onAVX2()
_ACTION = "vs2013"
premake.action.set("vs2013")
vectorextensions "AVX2"
prepare()
test.capture [[
@ -70,7 +70,7 @@
end
function suite.instructionSet_onAVX2_onVS2012()
_ACTION = "vs2012"
premake.action.set("vs2012")
vectorextensions "AVX2"
prepare()
test.isemptycapture()

View File

@ -392,13 +392,11 @@
function suite.translate_ReturnsTargetOSSeparator_Windows()
_OPTIONS["os"] = "windows"
test.isequal("dir\\dir\\file", path.translate("dir/dir\\file"))
_OPTIONS["os"] = nil
end
function suite.translate_ReturnsTargetOSSeparator_Linux()
_OPTIONS["os"] = "linux"
test.isequal("dir/dir/file", path.translate("dir/dir\\file"))
_OPTIONS["os"] = nil
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "test"
premake.action.set("test")
wks, prj = test.createWorkspace()
kind "StaticLib"
system "Windows"

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "test"
premake.action.set("test")
_OS = "windows"
wks, prj = test.createWorkspace()
end

View File

@ -15,7 +15,7 @@
local wks, prj
function suite.setup()
_ACTION = "test"
premake.action.set("test")
wks, prj = test.createWorkspace()
system "macosx"
end

View File

@ -28,7 +28,7 @@
--
function suite.onAction()
_ACTION = "vs2012"
premake.action.set("vs2012")
filter { "action:vs2012" }
defines { "USE_VS2012" }
prepare()
@ -36,7 +36,7 @@
end
function suite.onActionMismatch()
_ACTION = "vs2010"
premake.action.set("vs2010")
filter { "action:vs2012" }
defines { "USE_VS2012" }
prepare()

View File

@ -14,7 +14,7 @@
local wks
function suite.setup()
_ACTION = "test"
premake.action.set("test")
wks = workspace("MyWorkspace")
system "macosx"
end