Permalink
Browse files

Fixed the Cake build packaging

  • Loading branch information...
1 parent ed571e6 commit c19d23c1ad720dd0995dfc44d5098f7ed05581fa @rprouse rprouse committed Mar 5, 2016
Showing with 33 additions and 33 deletions.
  1. +33 −33 build.cake
View
@@ -33,7 +33,7 @@ var LinuxFrameworks = new string[] {
"net-4.5", "net-4.0", "net-2.0" };
var AllFrameworks = IsRunningOnWindows() ? WindowsFrameworks : LinuxFrameworks;
-
+
//////////////////////////////////////////////////////////////////////
// DEFINE RUN CONSTANTS
//////////////////////////////////////////////////////////////////////
@@ -161,7 +161,7 @@ Task("BuildCppTestFiles")
.SetNodeReuse(false)
);
});
-
+
//////////////////////////////////////////////////////////////////////
// TEST
//////////////////////////////////////////////////////////////////////
@@ -197,8 +197,8 @@ Task("TestFramework")
{
ErrorDetail.Add(exception.Message);
})
- .Does(() =>
- {
+ .Does(() =>
+ {
RunTest(BIN_DIR + File(framework + "/" + NUNITLITE_RUNNER), BIN_DIR + "/" + framework, FRAMEWORK_TESTS, framework, ref ErrorDetail);
});
@@ -208,8 +208,8 @@ Task("TestNUnitLite")
{
ErrorDetail.Add(exception.Message);
})
- .Does(() =>
- {
+ .Does(() =>
+ {
if (framework == "sl-5.0")
RunTest(BIN_DIR + File(framework + "/" + NUNITLITE_RUNNER), BIN_DIR + "/" + framework, "nunitlite.tests.dll", framework, ref ErrorDetail);
else
@@ -222,16 +222,16 @@ Task("TestEngine")
{
ErrorDetail.Add(exception.Message);
})
- .Does(() =>
- {
+ .Does(() =>
+ {
RunTest(NUNIT3_CONSOLE, BIN_DIR, ENGINE_TESTS, "TestEngine", ref ErrorDetail);
});
Task("TestDriver")
.IsDependentOn("Build")
.WithCriteria(IsRunningOnWindows)
- .Does(() =>
- {
+ .Does(() =>
+ {
RunTest(NUNIT3_CONSOLE, BIN_DIR, PORTABLE_AGENT_TESTS, ref ErrorDetail);
});
@@ -241,9 +241,9 @@ Task("TestAddins")
ErrorDetail.Add(exception.Message);
})
.IsDependentOn("Build")
- .Does(() =>
+ .Does(() =>
{
- RunTest(NUNIT3_CONSOLE, BIN_DIR, ADDIN_TESTS,"TestAddins", ref ErrorDetail);
+ RunTest(NUNIT3_CONSOLE, BIN_DIR, ADDIN_TESTS,"TestAddins", ref ErrorDetail);
});
Task("TestV2Driver")
@@ -252,8 +252,8 @@ Task("TestV2Driver")
{
ErrorDetail.Add(exception.Message);
})
- .Does(() =>
- {
+ .Does(() =>
+ {
RunTest(NUNIT3_CONSOLE, BIN_DIR, V2_PORTABLE_AGENT_TESTS,"TestV2Driver", ref ErrorDetail);
});
@@ -263,8 +263,8 @@ Task("TestConsole")
{
ErrorDetail.Add(exception.Message);
})
- .Does(() =>
- {
+ .Does(() =>
+ {
RunTest(NUNIT3_CONSOLE, BIN_DIR, CONSOLE_TESTS, "TestConsole", ref ErrorDetail);
});
@@ -276,15 +276,15 @@ var RootFiles = new FilePath[]
{
"LICENSE.txt",
"NOTICES.txt",
- "CHANGES.txt",
+ "CHANGES.txt",
"nunit.ico"
};
var BinFiles = new FilePath[]
{
"ConsoleTests.nunit",
"EngineTests.nunit",
- "mock-nunit-assembly.exe",
+ "mock-assembly.exe",
"Mono.Cecil.dll",
"nunit-agent-x86.exe",
"nunit-agent-x86.exe.config",
@@ -369,7 +369,7 @@ Task("CreateImage")
CreateDirectory(imageBinDir + file.GetDirectory());
CopyFile(BIN_DIR + file, imageBinDir + file);
}
- }
+ }
foreach (var runtime in AllFrameworks)
{
@@ -393,7 +393,7 @@ Task("PackageZip")
var currentImageDir = IMAGE_DIR + "NUnit-" + packageVersion + "/";
- var zipFiles =
+ var zipFiles =
GetFiles(currentImageDir + "*.*") +
GetFiles(currentImageDir + "bin/*.*") +
GetFiles(currentImageDir + "bin/addins/*.*") +
@@ -542,7 +542,7 @@ Task("PackageCF")
var currentImageDir = IMAGE_DIR + "NUnit-" + packageVersion + "/";
- var zipFiles =
+ var zipFiles =
GetFiles(currentImageDir + "*.*") +
GetFiles(currentImageDir + "bin/netcf-3.5/*.*");
@@ -581,12 +581,12 @@ Teardown(() =>
void CheckForError(ref List<string> errorDetail)
{
- if(errorDetail.Count != 0)
+ if(errorDetail.Count != 0)
{
var copyError = new List<string>();
copyError = errorDetail.Select(s => s).ToList();
errorDetail.Clear();
- throw new Exception("One or more unit test failed, breaking the build.\n"
+ throw new Exception("One or more unit test failed, breaking the build.\n"
+ copyError.Aggregate((x,y) => x + "\n" + y));
}
}
@@ -637,9 +637,9 @@ void BuildEngine(string configuration)
BuildProject("./src/NUnitEngine/nunit.engine/nunit.engine.csproj", configuration);
BuildProject("./src/NUnitEngine/nunit-agent/nunit-agent.csproj", configuration);
BuildProject("./src/NUnitEngine/nunit-agent/nunit-agent-x86.csproj", configuration);
-
+
// Engine tests
- BuildProject("./src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj", configuration);
+ BuildProject("./src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj", configuration);
// Driver and tests
if(IsRunningOnWindows())
@@ -649,8 +649,8 @@ void BuildEngine(string configuration)
}
// Addins
- BuildProject("./src/NUnitEngine/Addins/nunit-project-loader/nunit-project-loader.csproj", configuration);
- BuildProject("./src/NUnitEngine/Addins/vs-project-loader/vs-project-loader.csproj", configuration);
+ BuildProject("./src/NUnitEngine/Addins/nunit-project-loader/nunit-project-loader.csproj", configuration);
+ BuildProject("./src/NUnitEngine/Addins/vs-project-loader/vs-project-loader.csproj", configuration);
BuildProject("./src/NUnitEngine/Addins/nunit-v2-result-writer/nunit-v2-result-writer.csproj", configuration);
BuildProject("./src/NUnitEngine/Addins/nunit.v2.driver/nunit.v2.driver.csproj", configuration);
@@ -692,16 +692,16 @@ void BuildProject(string projectPath, string configuration, MSBuildPlatform buil
);
}
}
-
+
void RunTest(FilePath exePath, DirectoryPath workingDir, string framework, ref List<string> errorDetail)
{
int rc = StartProcess(
- MakeAbsolute(exePath),
+ MakeAbsolute(exePath),
new ProcessSettings()
{
WorkingDirectory = workingDir
});
-
+
if (rc > 0)
errorDetail.Add(string.Format("{0}: {1} tests failed",framework, rc));
else if (rc < 0)
@@ -711,13 +711,13 @@ void RunTest(FilePath exePath, DirectoryPath workingDir, string framework, ref L
void RunTest(FilePath exePath, DirectoryPath workingDir, string arguments, string framework, ref List<string> errorDetail)
{
int rc = StartProcess(
- MakeAbsolute(exePath),
+ MakeAbsolute(exePath),
new ProcessSettings()
{
Arguments = arguments,
WorkingDirectory = workingDir
});
-
+
if (rc > 0)
errorDetail.Add(string.Format("{0}: {1} tests failed",framework, rc));
else if (rc < 0)
@@ -740,7 +740,7 @@ Task("Build")
.IsDependentOn("BuildAllFrameworks")
.IsDependentOn("BuildEngine")
.IsDependentOn("BuildConsole");
-
+
Task("Rebuild")
.IsDependentOn("Clean")
.IsDependentOn("Build");

0 comments on commit c19d23c

Please sign in to comment.