Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit a7e398b

Browse files
committed
fix scripts
1 parent 558e47e commit a7e398b

File tree

8 files changed

+51
-78
lines changed

8 files changed

+51
-78
lines changed

build.cmd

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -540,41 +540,41 @@ if '%BUILD_CORECLR%' == '1' (
540540
if ERRORLEVEL 1 ( goto :failure )
541541

542542
echo Deploy x86 version of compiler and dependencies, ready for testing
543-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
544-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
543+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
544+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x86 --copyCompiler:yes --v:quiet
545545
if ERRORLEVEL 1 ( goto :failure )
546-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
547-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
546+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
547+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x86 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x86 --copyCompiler:no --v:quiet
548548
if ERRORLEVEL 1 ( goto :failure )
549549

550550
echo Deploy x64 compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64, ready for testing
551-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
552-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
551+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
552+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\win7-x64 --copyCompiler:yes --v:quiet
553553
if ERRORLEVEL 1 ( goto :failure )
554554

555555
echo Deploy x64 runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64, ready for testing
556-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
557-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
556+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
557+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:win7-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\win7-x64 --copyCompiler:no --v:quiet
558558
if ERRORLEVEL 1 ( goto :failure )
559559

560560
echo Deploy linux compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64, ready for testing
561-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
562-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
561+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
562+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\ubuntu.14.04-x64 --copyCompiler:yes --v:quiet
563563
if ERRORLEVEL 1 ( goto :failure )
564564

565565
echo Deploy linux runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64, ready for testing
566-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
567-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
566+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
567+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:ubuntu.14.04-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\ubuntu.14.04-x64 --copyCompiler:no --v:quiet
568568
if ERRORLEVEL 1 ( goto :failure )
569569

570570
echo Deploy OSX compiler to tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64, ready for testing
571-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
572-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
571+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
572+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\fsc\osx.10.10-x64 --copyCompiler:yes --v:quiet
573573
if ERRORLEVEL 1 ( goto :failure )
574574

575575
echo Deploy OSX runtime and FSharp.Core library to tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64, ready for testing
576-
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
577-
%_fsiexe% --exec tests\scripts\DeployProj.fsx --targetPlatformName:.NETStandard,Version=v1.6/osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
576+
echo %_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
577+
%_fsiexe% --exec tests\scripts\DeployProj.fsx --platform:osx.10.10-x64 --projectJsonLock:%~dp0tests\fsharp\project.lock.json --packagesDir:%~dp0packages --fsharpCore:%BUILD_CONFIG%\coreclr\bin\FSharp.Core.dll --output:tests\testbin\%BUILD_CONFIG%\coreclr\osx.10.10-x64 --copyCompiler:no --v:quiet
578578
if ERRORLEVEL 1 ( goto :failure )
579579
)
580580

src/scripts/scriptlib.fsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ module Scripting =
4949
| null -> failwith (sprintf "The argument %s is required" switchName)
5050
| x -> x
5151

52-
let getCmdLineExtraArgs switchName =
53-
if argv |> Array.contains switchName then
54-
argv |> Array.skipWhile (fun s -> s <> switchName) |> Array.skip 1
55-
else
56-
[| |]
52+
let getCmdLineExtraArgs isSwitch = argv |> Array.skipWhile isSwitch
5753

5854
#endif
5955

@@ -168,3 +164,10 @@ module Scripting =
168164
let redirectToLog () = redirectTo System.Console.Out
169165

170166

167+
let defaultPlatform =
168+
match Environment.OSVersion.Platform, Environment.Is64BitOperatingSystem with
169+
| PlatformID.MacOSX, true -> "osx.10.10-x64"
170+
| PlatformID.Unix,true -> "ubuntu.14.04-x64"
171+
| _, true -> "win7-x64"
172+
| _, false -> "win7-x86"
173+

tests/fsharp/single-test.fs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,20 @@ let singleTestBuildAndRunAux cfg p =
4141
testOkFile.CheckExists()
4242

4343
| FSC_CORECLR ->
44-
let platform = "win7-x64"
4544
let testName = getBasename cfg.Directory
4645
let extraSource = (__SOURCE_DIRECTORY__ ++ "coreclr_utilities.fs")
4746
let outFile = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/fsharp/core/%s/output/test.exe" cfg.BUILD_CONFIG testName)
48-
let coreRunExe = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/%s/corerun.exe" cfg.BUILD_CONFIG platform)
47+
let coreRunExe = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/%s/corerun.exe" cfg.BUILD_CONFIG defaultPlatform)
4948
makeDirectory (getDirectoryName outFile)
5049
let fscArgs =
5150
sprintf """--debug:portable --debug+ --out:%s --define:BASIC_TEST --target:exe -g --define:NETSTANDARD1_6 --define:FSCORE_PORTABLE_NEW --define:FX_PORTABLE_OR_NETSTANDARD "%s" %s """
5251
outFile
5352
extraSource
5453
(String.concat " " sources)
5554

56-
let fsccArgs =
57-
sprintf """--platform:%s -- %s"""
58-
platform
59-
fscArgs
55+
let fsccArgs = fscArgs
56+
//sprintf """--platform:%s -- %s"""
57+
// fscArgs
6058

6159
fsi cfg "--exec %s %s %s"
6260
cfg.fsi_flags

tests/fsharp/test-framework.fs

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,9 @@ type TestConfig =
120120

121121

122122
module WindowsPlatform =
123-
type ProcessorArchitecture =
124-
| X86
125-
| AMD64
126-
override this.ToString() = (sprintf "%A" this)
127123

128124
let clrPaths envVars =
129125

130-
let parseProcessorArchitecture (s : string) =
131-
match s.ToUpper() with
132-
| "X86" -> X86
133-
| "AMD64" -> AMD64
134-
| _ -> AMD64
135-
136126
let regQuery path value (baseKey: RegistryKey) =
137127
use regKey = baseKey.OpenSubKey(path, false)
138128

@@ -148,12 +138,6 @@ module WindowsPlatform =
148138
| Some (:? string as d) -> Some d
149139
| Some _ | None -> None
150140

151-
/// current process architecture, using PROCESSOR_ARCHITECTURE environment variable
152-
let PROCESSOR_ARCHITECTURE =
153-
match envVars |> Map.tryFind "PROCESSOR_ARCHITECTURE" |> Option.map parseProcessorArchitecture with
154-
| Some x -> x
155-
| None -> failwithf "environment variable '%s' required " "PROCESSOR_ARCHITECTURE"
156-
157141
let windir =
158142
match envVars |> Map.tryFind "windir" with
159143
| Some x -> x
@@ -166,9 +150,8 @@ module WindowsPlatform =
166150

167151
// == Use the same runtime as our architecture
168152
// == ASSUMPTION: This could be a good or bad thing.
169-
match PROCESSOR_ARCHITECTURE with
170-
| X86 -> ()
171-
| _ -> CORDIR <- CORDIR.Replace("Framework", "Framework64")
153+
if Environment.Is64BitOperatingSystem then
154+
CORDIR <- CORDIR.Replace("Framework", "Framework64")
172155

173156
let allSDK =
174157
[ regQueryREG_SOFTWARE @"Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" "InstallationFolder"
@@ -179,22 +162,10 @@ module WindowsPlatform =
179162

180163
let mutable CORSDK = allSDK |> Seq.tryPick id |> function None -> failwith "couldn't find CORSDK" | Some d -> d
181164

182-
// == Fix up CORSDK for 64bit platforms...
183-
match PROCESSOR_ARCHITECTURE with
184-
| AMD64 -> CORSDK <- CORSDK ++ "x64"
185-
| _ -> ()
186-
187-
188-
/// Return real processor architecture (ignore WOW64)
189-
/// more info: http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx
190-
/// use PROCESSOR_ARCHITEW6432 and PROCESSOR_ARCHITECTURE environment variables
191-
let OSARCH =
192-
match envVars |> Map.tryFind "PROCESSOR_ARCHITEW6432" |> Option.map parseProcessorArchitecture with
193-
| Some arc -> arc
194-
| None -> PROCESSOR_ARCHITECTURE
195-
165+
if Environment.Is64BitOperatingSystem then
166+
CORSDK <- CORSDK ++ "x64"
196167

197-
OSARCH, CORDIR, CORSDK
168+
CORDIR, CORSDK
198169

199170
type FSLibPaths =
200171
{ FSCOREDLLPATH : string }
@@ -212,12 +183,9 @@ let config configurationName envVars =
212183
let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED"
213184
let fsi_flags = "-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror"
214185

215-
let OSARCH, CORDIR, CORSDK = WindowsPlatform.clrPaths envVars
186+
let CORDIR, CORSDK = WindowsPlatform.clrPaths envVars
216187

217-
let fsiroot =
218-
match OSARCH with
219-
| WindowsPlatform.X86 -> "fsi"
220-
| _ -> "fsiAnyCpu"
188+
let fsiroot = if Environment.Is64BitOperatingSystem then "fsiAnyCpu" else "fsi"
221189

222190
let CSC = requireFile (CORDIR ++ "csc.exe")
223191
let NGEN = requireFile (CORDIR ++ "ngen.exe")

tests/fsharp/tests.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ open SingleTest
1818

1919
module CoreTests =
2020

21-
[<Test>]
22-
let ``access-FSC_CORECLR``() = singleTestBuildAndRun "core/access" FSC_CORECLR
21+
//[<Test>]
22+
//let ``access-FSC_CORECLR``() = singleTestBuildAndRun "core/access" FSC_CORECLR
2323

2424
[<Test>]
2525
let ``access-FSI_FILE``() = singleTestBuildAndRun "core/access" FSI_FILE

tests/scripts/DeployProj.fsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#load "../../src/scripts/scriptlib.fsx"
22
#load "crackProjectJson.fsx"
33

4+
open System
45
open System.IO
56
open FSharp.Data
67
open FSharp.Data.JsonExtensions
8+
let root = Path.GetFullPath (__SOURCE_DIRECTORY__ ++ ".." ++ "..")
79

810
try
9-
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" @"tests\fsharp\project.lock.json"
10-
let PackagesDir = getCmdLineArg "--packagesDir:" @"packages"
11-
let TargetPlatformName = getCmdLineArg "--targetPlatformName:" @".NETStandard,Version=v1.6/win7-x64"
12-
let FSharpCore = getCmdLineArg "--fsharpCore:" @"release\coreclr\bin\FSharp.Core.dll"
11+
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" (root ++ "tests" ++ "fsharp" ++ "project.lock.json")
12+
let PackagesDir = getCmdLineArg "--packagesDir:" (root ++ "packages")
13+
let Framework = getCmdLineArg "--framework:" ".NETCoreApp,Version=v1.0"
14+
let Platform = getCmdLineArg "--platform:" defaultPlatform
15+
let FSharpCore = getCmdLineArg "--fsharpCore:" @"release/coreclr/bin/FSharp.Core.dll"
1316
let Output = getCmdLineArg "--output:" @"."
1417
let Verbosity = getCmdLineArg "--v:" @"quiet"
1518
let CopyCompiler = getCmdLineArg "--copyCompiler:" @"no"
@@ -26,7 +29,7 @@ try
2629

2730
let isVerbose = Verbosity = "verbose"
2831

29-
let dependencies = CrackProjectJson.collectReferences (isVerbose, PackagesDir, TargetPlatformName, ProjectJsonLock, true)
32+
let dependencies = CrackProjectJson.collectReferences (isVerbose, PackagesDir, Framework + "/" + Platform, ProjectJsonLock, true)
3033

3134
//Okay copy everything
3235
makeDirectory Output

tests/scripts/fscc.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ let root = Path.GetFullPath (__SOURCE_DIRECTORY__ ++ ".." ++ "..")
1010
let Platform = getCmdLineArg "--platform:" "win7-x64"
1111
let ProjectJsonLock = getCmdLineArg "--projectJsonLock:" (root ++ "tests" ++ "fsharp" ++ "project.lock.json")
1212
let PackagesDir = getCmdLineArg "--packagesDir:" (root ++ "packages")
13-
let FrameworkName = getCmdLineArg "--frameworkName:" ".NETStandard,Version=v1.6"
13+
let FrameworkName = getCmdLineArg "--framework:" ".NETStandard,Version=v1.6"
1414
let Verbosity = getCmdLineArg "--v:" "quiet"
1515
let CompilerPathOpt = getCmdLineArgOptional "--compilerPath:"
1616
let Flavour = getCmdLineArg "--flavour:" "release"
17-
let ExtraArgs = getCmdLineExtraArgs "--"
17+
let ExtraArgs = getCmdLineExtraArgs (fun x -> x.StartsWith "--")
1818

1919
let CompilerPath = defaultArg CompilerPathOpt (root ++ "tests" ++ "testbin" ++ Flavour ++ "coreclr" ++ "fsc" ++ Platform)
2020
let Win32Manifest = CompilerPath ++ "default.win32manifest"

0 commit comments

Comments
 (0)