Skip to content
Merged
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
15 changes: 9 additions & 6 deletions source/TestAdapter/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ private List<TestResult> RunTest(List<TestCase> tests)
Settings.LoggingLevel.Verbose);

var source = tests.First().Source;
var nfUnitTestLauncherLocation = source.Replace(Path.GetFileName(source), "nanoFramework.UnitTestLauncher.pe");
var workingDirectory = Path.GetDirectoryName(nfUnitTestLauncherLocation);
var mscorlibLocation = source.Replace(Path.GetFileName(source), "mscorlib.pe");
var nfTestFrameworkLocation = source.Replace(Path.GetFileName(source), "nanoFramework.TestFramework.pe");
var nfAssemblyUnderTestLocation = source.Replace(".dll", ".pe");
var allPeFiles = Directory.GetFiles(Path.GetFileName(source), "*.pe");
var workingDirectory = Path.GetDirectoryName(source);

// prepare the process start of the WIN32 nanoCLR
_nanoClr = new Process();
Expand All @@ -169,7 +166,13 @@ private List<TestResult> RunTest(List<TestCase> tests)
// 2. mscorlib
// 3. test framework
// 4. test application
string parameter = $"-load {nfUnitTestLauncherLocation} -load {mscorlibLocation} -load {nfTestFrameworkLocation} -load {nfAssemblyUnderTestLocation}";
StringBuilder str = new StringBuilder();
foreach(var pe in allPeFiles)
{
str.Append($" -load {pe}");
}

string parameter = str.ToString();

_logger.LogMessage(
"Launching process with nanoCLR...",
Expand Down