diff --git a/eng/build.sh b/eng/build.sh index ce85f543ef9..e678acefae3 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -26,6 +26,7 @@ usage() echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)" echo " --testCompilerComponentTests Run FSharp.Compiler.ComponentTests on .NET Core" echo " --testBenchmarks Build and Run Benchmark suite" + echo " --testScripting Run FSharp.Private.ScriptingTests on .NET Core" echo "" echo "Advanced settings:" echo " --ci Building in CI" @@ -60,6 +61,7 @@ publish=false test_core_clr=false test_compilercomponent_tests=false test_benchmarks=false +test_scripting=false configuration="Debug" verbosity='minimal' binary_log=false @@ -136,6 +138,9 @@ while [[ $# > 0 ]]; do --testbenchmarks) test_benchmarks=true ;; + --testscripting) + test_scripting=true + ;; --ci) ci=true ;; @@ -332,4 +337,9 @@ if [[ "$test_benchmarks" == true ]]; then popd fi +if [[ "$test_scripting" == true ]]; then + coreclrtestframework=$tfm + Test --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework +fi + ExitWithExitCode 0 diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs index 19c3009b17a..18e96ddbced 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs @@ -264,6 +264,10 @@ TorchSharp.Tensor.LongTensor.From([| 0L .. 100L |]).Device [] member _.``Use Dependency Manager to restore packages with native dependencies, build and run script that depends on the results``() = + // Skip test on arm64, because there is not an arm64 netive library + if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then + () + else let packagemanagerlines = [| "r", "Microsoft.ML,version=1.4.0-preview" "r", "Microsoft.ML.AutoML,version=0.16.0-preview" @@ -360,6 +364,10 @@ printfn ""%A"" result [] member _.``Use NativeResolver to resolve native dlls.``() = + // Skip test on arm64, because there is not an arm64 netive library + if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then + () + else let packagemanagerlines = [| "r", "Microsoft.ML,version=1.4.0-preview" "r", "Microsoft.ML.AutoML,version=0.16.0-preview" @@ -442,6 +450,10 @@ printfn ""%A"" result [] member _.``Use AssemblyResolver to resolve assemblies``() = + // Skip test on arm64, because there is not an arm64 netive library + if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then + () + else let packagemanagerlines = [| "r", "Microsoft.ML,version=1.4.0-preview" "r", "Microsoft.ML.AutoML,version=0.16.0-preview" diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs index 78a535c39b9..0e8175d950d 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs @@ -247,6 +247,10 @@ System.Configuration.ConfigurationManager.AppSettings.Item "Environment" <- "LOC #if NETSTANDARD [] member _.``ML - use assembly with native dependencies``() = + // Skip test on arm64, because there is not an arm64 netive library + if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then + () + else let code = @" #r ""nuget:Microsoft.ML,version=1.4.0-preview"" #r ""nuget:Microsoft.ML.AutoML,version=0.16.0-preview""