Skip to content

Commit 4a867ed

Browse files
Add --testScripting option to eng/build.sh (#17327)
* arm64tests * Update build.sh --------- Co-authored-by: Petr <psfinaki@users.noreply.github.com>
1 parent 43bcb29 commit 4a867ed

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

eng/build.sh

Lines changed: 10 additions & 0 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
;;
@@ -332,4 +337,9 @@ if [[ "$test_benchmarks" == true ]]; then
332337
popd
333338
fi
334339

340+
if [[ "$test_scripting" == true ]]; then
341+
coreclrtestframework=$tfm
342+
Test --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
343+
fi
344+
335345
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)