Skip to content

Commit

Permalink
Merge pull request #1305 from nunit/port-1284
Browse files Browse the repository at this point in the history
Restore ability to test packages under debugger
  • Loading branch information
CharliePoole authored Jan 11, 2023
2 parents 90fc732 + 9ec2366 commit b5380ec
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 30 deletions.
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

0 comments on commit b5380ec

Please sign in to comment.