Skip to content

Commit

Permalink
please
Browse files Browse the repository at this point in the history
  • Loading branch information
connorivy committed Dec 3, 2024
1 parent 561eb8f commit 4606b31
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
3 changes: 2 additions & 1 deletion src/MockMe.Generator/MockStoreGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
Expand Down Expand Up @@ -37,7 +38,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
);

//System.Diagnostics.Debugger.Launch();
Console.WriteLine("Running source gen");
Debug.WriteLine("Running source gen!");
context.RegisterSourceOutput(
compilationAndMethods,
(ctx, source) =>
Expand Down
52 changes: 26 additions & 26 deletions tests/MockMe.Tests.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,44 @@
// ?? throw new InvalidOperationException("process must not be null");
//await clean.WaitForExitAsync();

ProcessStartInfo cleanStartInfo =
new()
{
FileName = "dotnet",
Arguments = $"build {Path.Combine(testsFolderPath, "..\\", "src", "MockMe")} -c Debug",
};
//ProcessStartInfo cleanStartInfo =
// new()
// {
// FileName = "dotnet",
// Arguments = $"build {Path.Combine(testsFolderPath, "..\\", "src", "MockMe")} -c Debug",
// };

using Process clean =
Process.Start(cleanStartInfo)
?? throw new InvalidOperationException("process must not be null");
await clean.WaitForExitAsync();
//using Process clean =
// Process.Start(cleanStartInfo)
// ?? throw new InvalidOperationException("process must not be null");
//await clean.WaitForExitAsync();

var generatorBinPath = Path.Combine(
testsFolderPath,
"..",
"src",
"MockMe.Generator",
"bin",
"Debug",
"netstandard2.0"
);
foreach (var x in Directory.GetFiles(generatorBinPath))
{
Console.WriteLine(x);
}
//var generatorBinPath = Path.Combine(
// testsFolderPath,
// "..",
// "src",
// "MockMe.Generator",
// "bin",
// "Debug",
// "netstandard2.0"
//);
//foreach (var x in Directory.GetFiles(generatorBinPath))
//{
// Console.WriteLine(x);
//}

Assembly.LoadFrom(Path.Combine(generatorBinPath, "MockMe.Generator.dll"));
//Assembly.LoadFrom(Path.Combine(generatorBinPath, "MockMe.Generator.dll"));

ProcessStartInfo buildStartInfo =
new() { FileName = "dotnet", Arguments = $"build {slnf} --no-incremental -c Debug" };
new() { FileName = "dotnet", Arguments = $"build --no-incremental -c Debug" };

using Process build =
Process.Start(buildStartInfo)
?? throw new InvalidOperationException("process must not be null");
await build.WaitForExitAsync();

ProcessStartInfo testStartInfo =
new() { FileName = "dotnet", Arguments = $"test {slnf} --no-build -c Debug" };
new() { FileName = "dotnet", Arguments = $"test --no-build -c Debug" };

using Process test =
Process.Start(testStartInfo) ?? throw new InvalidOperationException("process must not be null");
Expand Down

0 comments on commit 4606b31

Please sign in to comment.