Skip to content

Commit 8dc335c

Browse files
committed
arm64tests
1 parent 075e884 commit 8dc335c

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

eng/build.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ usage()
2626
echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)"
2727
echo " --testCompilerComponentTests Run FSharp.Compiler.ComponentTests on .NET Core"
2828
echo " --testBenchmarks Build and Run Benchmark suite"
29+
echo " --testScripting Run FSharp.Private.ScriptingTests on .NET Core"
2930
echo ""
3031
echo "Advanced settings:"
3132
echo " --ci Building in CI"
@@ -60,6 +61,7 @@ publish=false
6061
test_core_clr=false
6162
test_compilercomponent_tests=false
6263
test_benchmarks=false
64+
test_scripting=false
6365
configuration="Debug"
6466
verbosity='minimal'
6567
binary_log=false
@@ -136,6 +138,9 @@ while [[ $# > 0 ]]; do
136138
--testbenchmarks)
137139
test_benchmarks=true
138140
;;
141+
--testscripting)
142+
test_scripting=true
143+
;;
139144
--ci)
140145
ci=true
141146
;;
@@ -219,7 +224,7 @@ function TestUsingNUnit() {
219224
projectname=$(basename -- "$testproject")
220225
projectname="${projectname%.*}"
221226
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
222-
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs --blame --results-directory $artifacts_dir/TestResults/$configuration"
227+
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs --blame --results-directory $artifacts_dir/TestResults/$configuration -p:vstestusemsbuildoutput=false"
223228
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
224229
}
225230

@@ -325,9 +330,9 @@ BuildSolution
325330
if [[ "$test_core_clr" == true ]]; then
326331
coreclrtestframework=$tfm
327332
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter
328-
TestUsingXUnit --testproject "$repo_root/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj" --targetframework $coreclrtestframework --notestfilter
333+
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj" --targetframework $coreclrtestframework --notestfilter
329334
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
330-
TestUsingXUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
335+
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
331336
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework $coreclrtestframework
332337
fi
333338

@@ -342,4 +347,9 @@ if [[ "$test_benchmarks" == true ]]; then
342347
popd
343348
fi
344349

345-
ExitWithExitCode 0
350+
if [[ "$test_scripting" == true ]]; then
351+
coreclrtestframework=$tfm
352+
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
353+
fi
354+
355+
ExitWithExitCode 0

tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ TorchSharp.Tensor.LongTensor.From([| 0L .. 100L |]).Device
264264

265265
[<Fact>]
266266
member _.``Use Dependency Manager to restore packages with native dependencies, build and run script that depends on the results``() =
267+
// Skip test on arm64, because there is not an arm64 netive library
268+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
269+
()
270+
else
267271
let packagemanagerlines = [|
268272
"r", "Microsoft.ML,version=1.4.0-preview"
269273
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"
@@ -360,6 +364,10 @@ printfn ""%A"" result
360364

361365
[<Fact>]
362366
member _.``Use NativeResolver to resolve native dlls.``() =
367+
// Skip test on arm64, because there is not an arm64 netive library
368+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
369+
()
370+
else
363371
let packagemanagerlines = [|
364372
"r", "Microsoft.ML,version=1.4.0-preview"
365373
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"
@@ -442,6 +450,10 @@ printfn ""%A"" result
442450

443451
[<Fact>]
444452
member _.``Use AssemblyResolver to resolve assemblies``() =
453+
// Skip test on arm64, because there is not an arm64 netive library
454+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
455+
()
456+
else
445457
let packagemanagerlines = [|
446458
"r", "Microsoft.ML,version=1.4.0-preview"
447459
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"

tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ System.Configuration.ConfigurationManager.AppSettings.Item "Environment" <- "LOC
247247
#if NETSTANDARD
248248
[<Fact>]
249249
member _.``ML - use assembly with native dependencies``() =
250+
// Skip test on arm64, because there is not an arm64 netive library
251+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
252+
()
253+
else
250254
let code = @"
251255
#r ""nuget:Microsoft.ML,version=1.4.0-preview""
252256
#r ""nuget:Microsoft.ML.AutoML,version=0.16.0-preview""

0 commit comments

Comments
 (0)