Skip to content
Closed
Changes from 1 commit
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
Next Next commit
fixing strawberryperl nuget path, Run.pl doesn't work yet on my machi…
…ne, maybe some of the directories or files moved and this script needs more adjustments

Runall.pl line 900:  Fatal Error: No such file or directory
Could not open fail list 'failures.lst'.
C:\dev\src\github.com\Microsoft\visualfsharp\tests\fsharpqa\..\..\tests\fsharpqa\testenv\bin\runall.pl terminated abnormally.
Can't use an undefined value as a symbol reference at C:\dev\src\github.com\Microsoft\visualfsharp\tests\fsharpqa\..\..\tests\fsharpqa\testenv\bin\runall.pl line 1002.
> System.Exception: exit code: 2
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1647.Invoke(String message)
   at FSI_0019.runPerl(String[] arguments) in C:\dev\src\github.com\Microsoft\visualfsharp\tests\fsharpqa\run.fsharpqa.test.fsx:line 59
   at <StartupCode$FSI_0019>.$FSI_0019.main@() in C:\dev\src\github.com\Microsoft\visualfsharp\tests\fsharpqa\run.fsharpqa.test.fsx:line 62
Stopped due to error
  • Loading branch information
smoothdeveloper committed Apr 20, 2019
commit b76109b363121b7c57ac70f1b1538c284def352b
21 changes: 19 additions & 2 deletions tests/fsharpqa/run.fsharpqa.test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

open System.IO
open System.Diagnostics

type Env = System.Environment
let releaseOrDebug = "Debug"
let setEnvVar name value =
System.Environment.SetEnvironmentVariable(name, value)
Expand All @@ -26,7 +26,24 @@ let runPerl arguments =
// a bit expeditive, but does the deed
Process.GetProcessesByName("perl") |> Array.iter (fun p -> p.Kill())
use perlProcess = new Process()
perlProcess.StartInfo.set_FileName (Path.Combine(rootFolder, "packages", "StrawberryPerl64.5.22.2.1", "Tools", "perl", "bin", "perl.exe"))
let userRoot = Env.SpecialFolder.UserProfile |> Env.GetFolderPath

let perlExe =
[| userRoot
".nuget"
"packages"
"strawberryperl64"
"5.22.2.1"
"Tools"
"perl"
"bin"
"perl.exe" |]
|> Path.Combine
|> FileInfo

if not perlExe.Exists then failwithf "couldn't find %s, please adjust this script" perlExe.FullName else

perlProcess.StartInfo.set_FileName (perlExe.FullName)
perlProcess.StartInfo.set_Arguments (arguments |> Array.map(fun a -> @"""" + a + @"""") |> String.concat " ")
perlProcess.StartInfo.set_WorkingDirectory (Path.Combine(rootFolder, "tests", "fsharpqa", "source"))
perlProcess.StartInfo.set_RedirectStandardOutput true
Expand Down