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
14 changes: 12 additions & 2 deletions tests/FSharp.Test.Utilities/TestFramework.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module TestFramework
open Microsoft.Win32
open System
open System.IO
open System.Reflection
open System.Text.RegularExpressions
open System.Diagnostics
open Scripting
Expand Down Expand Up @@ -55,8 +56,17 @@ module Commands =
else
p.WaitForExit()
#if DEBUG
File.WriteAllLines(Path.Combine(workingDir, "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir, "StandardError.txt"), errorsList)
let workingDir' =
if workingDir = ""
then
// Assign working dir to prevent default to C:\Windows\System32
let executionLocation = Assembly.GetExecutingAssembly().Location
Path.GetDirectoryName executionLocation
else
workingDir

File.WriteAllLines(Path.Combine(workingDir', "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir', "StandardError.txt"), errorsList)
#endif
p.ExitCode, outputList.ToArray(), errorsList.ToArray()
| None -> -1, Array.empty, Array.empty
Expand Down