diff options
author | Damien Courtois <none@none> | 2014-04-22 16:27:27 +0400 |
---|---|---|
committer | Damien Courtois <none@none> | 2014-04-22 16:27:27 +0400 |
commit | 0c1e1741b36b6beb83c8b5288b0cca0d340fde5b (patch) | |
tree | 7a42aefa621c93953295396ac337ac34ce7f67c8 /tests | |
parent | 80adf90f70ae04e75216b014cc0f8983bb24de0b (diff) |
added post and pre build events support for C# projects
--HG--
branch : issue_60
Diffstat (limited to 'tests')
-rw-r--r-- | tests/actions/vstudio/cs2005/buildevents.lua | 53 | ||||
-rw-r--r-- | tests/premake4.lua | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/tests/actions/vstudio/cs2005/buildevents.lua b/tests/actions/vstudio/cs2005/buildevents.lua new file mode 100644 index 0000000..213de1b --- /dev/null +++ b/tests/actions/vstudio/cs2005/buildevents.lua @@ -0,0 +1,53 @@ +--
+-- tests/actions/vstudio/cs2005/buildevents.lua
+-- Validate the build events in Visual Studio 2005+ .csproj
+-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
+--
+
+ T.vstudio_cs2005_buildevents = { }
+ local suite = T.vstudio_cs2005_buildevents
+ local cs2005 = premake.vstudio.cs2005
+
+--
+-- Setup
+--
+
+ local sln, prj
+
+ function suite.setup()
+ sln = test.createsolution()
+ end
+
+ local function prepare()
+ premake.bake.buildconfigs()
+ prj = premake.solution.getproject(sln, 1)
+ cs2005.buildevents(prj)
+ end
+
+--
+-- Prebuild events
+--
+
+ function suite.prebuildEvents()
+ prebuildcommands { "pre" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PreBuildEvent>pre</PreBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
+
+--
+-- Postbuild events
+--
+
+ function suite.postbuildEvents()
+ postbuildcommands { "post" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PostBuildEvent>post</PostBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
diff --git a/tests/premake4.lua b/tests/premake4.lua index b0ebde9..6c149e3 100644 --- a/tests/premake4.lua +++ b/tests/premake4.lua @@ -86,6 +86,7 @@ dofile("actions/vstudio/cs2005/projectelement.lua") dofile("actions/vstudio/cs2005/projectsettings.lua") dofile("actions/vstudio/cs2005/propertygroup.lua") + dofile("actions/vstudio/cs2005/buildevents.lua") -- Visual Studio 2005-2010 solutions dofile("actions/vstudio/sln2005/dependencies.lua") |