Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore ability to test packages under debugger #1305

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NUnitConsole.sln
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{9BCA00E2-D
cake\header-check.cake = cake\header-check.cake
cake\package-checks.cake = cake\package-checks.cake
cake\package-definitions.cake = cake\package-definitions.cake
cake\package-tests.cake = cake\package-tests.cake
cake\packages.cake = cake\packages.cake
cake\test-results.cake = cake\test-results.cake
cake\utilities.cake = cake\utilities.cake
Expand Down
3 changes: 1 addition & 2 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
static string Target; Target = GetArgument("target|t", "Default");
static string Target; Target = Argument("target", Argument("t", "Default"));

#load cake/constants.cake
#load cake/build-settings.cake
#load cake/header-check.cake
#load cake/package-checks.cake
#load cake/test-results.cake
#load cake/package-tests.cake
#load cake/versioning.cake
#load cake/utilities.cake
#load cake/package-definitions.cake
Expand Down
2 changes: 1 addition & 1 deletion cake/build-settings.cake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BuildSettings
Target = context.TargetTask.Name;
TasksToExecute = context.TasksToExecute.Select(t => t.Name);

Configuration = context.Argument("configuration", "Release");
Configuration = context.Argument("configuration", context.Argument("c", "Release"));
NoPush = context.HasArgument("nopush");

BuildVersion = new BuildVersion(context);
Expand Down
20 changes: 20 additions & 0 deletions cake/package-definitions.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
//////////////////////////////////////////////////////////////////////
// PACKAGE TEST STRUCTURE
//////////////////////////////////////////////////////////////////////

public struct PackageTest
{
public string Name;
public string Description;
public string Arguments;
public ExpectedResult ExpectedResult;

public PackageTest(string name, string description, string arguments, ExpectedResult expectedResult)
{
Name = name;
Description = description;
Arguments = arguments;
ExpectedResult = expectedResult;
}
}

//////////////////////////////////////////////////////////////////////
// PACKAGE DEFINITION ABSTRACT CLASS
//////////////////////////////////////////////////////////////////////
Expand Down
17 changes: 0 additions & 17 deletions cake/package-tests.cake

This file was deleted.

9 changes: 0 additions & 9 deletions cake/utilities.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
// HELPER METHODS - GENERAL
//////////////////////////////////////////////////////////////////////

T GetArgument<T>(string pattern, T defaultValue)
{
foreach (string name in pattern.Split('|'))
if (HasArgument(name))
return Argument<T>(name);

return defaultValue;
}

bool CheckIfDotNetCoreInstalled()
{
try
Expand Down