@@ -415,7 +415,7 @@ public void TestDefaultCSharpAutoBuilder()
415
415
actions . RunProcess [ "cmd.exe /C dotnet --info" ] = 0 ;
416
416
actions . RunProcess [ @"cmd.exe /C dotnet clean C:\Project\test.csproj" ] = 0 ;
417
417
actions . RunProcess [ @"cmd.exe /C dotnet restore C:\Project\test.csproj" ] = 0 ;
418
- actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\odasa index --auto dotnet build --no-incremental C:\Project\test.csproj" ] = 0 ;
418
+ actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\odasa index --auto dotnet build --no-incremental /p:UseSharedCompilation=false C:\Project\test.csproj" ] = 0 ;
419
419
actions . FileExists [ "csharp.log" ] = true ;
420
420
actions . FileExists [ @"C:\Project\test.csproj" ] = true ;
421
421
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_TRAP_DIR" ] = "" ;
@@ -439,9 +439,6 @@ public void TestDefaultCSharpAutoBuilder()
439
439
[ Fact ]
440
440
public void TestLinuxCSharpAutoBuilder ( )
441
441
{
442
- actions . RunProcess [ "dotnet --list-runtimes" ] = 0 ;
443
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = @"Microsoft.AspNetCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
444
- Microsoft.NETCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]" ;
445
442
actions . RunProcess [ "dotnet --info" ] = 0 ;
446
443
actions . RunProcess [ @"dotnet clean C:\Project/test.csproj" ] = 0 ;
447
444
actions . RunProcess [ @"dotnet restore C:\Project/test.csproj" ] = 0 ;
@@ -463,7 +460,7 @@ public void TestLinuxCSharpAutoBuilder()
463
460
actions . LoadXml [ @"C:\Project/test.csproj" ] = xml ;
464
461
465
462
var autobuilder = CreateAutoBuilder ( false ) ;
466
- TestAutobuilderScript ( autobuilder , 0 , 5 ) ;
463
+ TestAutobuilderScript ( autobuilder , 0 , 4 ) ;
467
464
}
468
465
469
466
[ Fact ]
@@ -603,8 +600,6 @@ private void TestAutobuilderScript(Autobuilder autobuilder, int expectedOutput,
603
600
[ Fact ]
604
601
public void TestLinuxBuildCommand ( )
605
602
{
606
- actions . RunProcess [ "dotnet --list-runtimes" ] = 1 ;
607
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = "" ;
608
603
actions . RunProcess [ @"C:\odasa/tools/odasa index --auto ""./build.sh --skip-tests""" ] = 0 ;
609
604
actions . FileExists [ "csharp.log" ] = true ;
610
605
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_TRAP_DIR" ] = "" ;
@@ -615,7 +610,7 @@ public void TestLinuxBuildCommand()
615
610
SkipVsWhere ( ) ;
616
611
617
612
var autobuilder = CreateAutoBuilder ( false , buildCommand : "./build.sh --skip-tests" ) ;
618
- TestAutobuilderScript ( autobuilder , 0 , 2 ) ;
613
+ TestAutobuilderScript ( autobuilder , 0 , 1 ) ;
619
614
}
620
615
621
616
[ Fact ]
@@ -626,14 +621,12 @@ public void TestLinuxBuildSh()
626
621
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_TRAP_DIR" ] = "" ;
627
622
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_SOURCE_ARCHIVE_DIR" ] = "" ;
628
623
actions . RunProcess [ @"/bin/chmod u+x C:\Project/build/build.sh" ] = 0 ;
629
- actions . RunProcess [ "dotnet --list-runtimes" ] = 1 ;
630
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = "" ;
631
624
actions . RunProcess [ @"C:\odasa/tools/odasa index --auto C:\Project/build/build.sh" ] = 0 ;
632
625
actions . RunProcessWorkingDirectory [ @"C:\odasa/tools/odasa index --auto C:\Project/build/build.sh" ] = @"C:\Project/build" ;
633
626
actions . FileExists [ "csharp.log" ] = true ;
634
627
635
628
var autobuilder = CreateAutoBuilder ( false ) ;
636
- TestAutobuilderScript ( autobuilder , 0 , 3 ) ;
629
+ TestAutobuilderScript ( autobuilder , 0 , 2 ) ;
637
630
}
638
631
639
632
[ Fact ]
@@ -645,14 +638,12 @@ public void TestLinuxBuildShCSharpLogMissing()
645
638
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_SOURCE_ARCHIVE_DIR" ] = "" ;
646
639
647
640
actions . RunProcess [ @"/bin/chmod u+x C:\Project/build.sh" ] = 0 ;
648
- actions . RunProcess [ "dotnet --list-runtimes" ] = 1 ;
649
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = "" ;
650
641
actions . RunProcess [ @"C:\odasa/tools/odasa index --auto C:\Project/build.sh" ] = 0 ;
651
642
actions . RunProcessWorkingDirectory [ @"C:\odasa/tools/odasa index --auto C:\Project/build.sh" ] = @"C:\Project" ;
652
643
actions . FileExists [ "csharp.log" ] = false ;
653
644
654
645
var autobuilder = CreateAutoBuilder ( false ) ;
655
- TestAutobuilderScript ( autobuilder , 1 , 3 ) ;
646
+ TestAutobuilderScript ( autobuilder , 1 , 2 ) ;
656
647
}
657
648
658
649
[ Fact ]
@@ -664,14 +655,12 @@ public void TestLinuxBuildShFailed()
664
655
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_SOURCE_ARCHIVE_DIR" ] = "" ;
665
656
666
657
actions . RunProcess [ @"/bin/chmod u+x C:\Project/build.sh" ] = 0 ;
667
- actions . RunProcess [ "dotnet --list-runtimes" ] = 1 ;
668
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = "" ;
669
658
actions . RunProcess [ @"C:\odasa/tools/odasa index --auto C:\Project/build.sh" ] = 5 ;
670
659
actions . RunProcessWorkingDirectory [ @"C:\odasa/tools/odasa index --auto C:\Project/build.sh" ] = @"C:\Project" ;
671
660
actions . FileExists [ "csharp.log" ] = true ;
672
661
673
662
var autobuilder = CreateAutoBuilder ( false ) ;
674
- TestAutobuilderScript ( autobuilder , 1 , 3 ) ;
663
+ TestAutobuilderScript ( autobuilder , 1 , 2 ) ;
675
664
}
676
665
677
666
[ Fact ]
@@ -872,9 +861,6 @@ public void TestSkipNugetBuildless()
872
861
[ Fact ]
873
862
public void TestSkipNugetDotnet ( )
874
863
{
875
- actions . RunProcess [ "dotnet --list-runtimes" ] = 0 ;
876
- actions . RunProcessOut [ "dotnet --list-runtimes" ] = @"Microsoft.AspNetCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
877
- Microsoft.NETCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]" ;
878
864
actions . RunProcess [ "dotnet --info" ] = 0 ;
879
865
actions . RunProcess [ @"dotnet clean C:\Project/test.csproj" ] = 0 ;
880
866
actions . RunProcess [ @"dotnet restore C:\Project/test.csproj" ] = 0 ;
@@ -896,7 +882,7 @@ public void TestSkipNugetDotnet()
896
882
actions . LoadXml [ @"C:\Project/test.csproj" ] = xml ;
897
883
898
884
var autobuilder = CreateAutoBuilder ( false , dotnetArguments : "--no-restore" ) ; // nugetRestore=false does not work for now.
899
- TestAutobuilderScript ( autobuilder , 0 , 5 ) ;
885
+ TestAutobuilderScript ( autobuilder , 0 , 4 ) ;
900
886
}
901
887
902
888
[ Fact ]
@@ -907,13 +893,10 @@ public void TestDotnetVersionNotInstalled()
907
893
actions . RunProcess [ @"chmod u+x dotnet-install.sh" ] = 0 ;
908
894
actions . RunProcess [ @"./dotnet-install.sh --channel release --version 2.1.3 --install-dir C:\Project/.dotnet" ] = 0 ;
909
895
actions . RunProcess [ @"rm dotnet-install.sh" ] = 0 ;
910
- actions . RunProcess [ @"C:\Project/.dotnet/dotnet --list-runtimes" ] = 0 ;
911
- actions . RunProcessOut [ @"C:\Project/.dotnet/dotnet --list-runtimes" ] = @"Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
912
- Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]" ;
913
896
actions . RunProcess [ @"C:\Project/.dotnet/dotnet --info" ] = 0 ;
914
897
actions . RunProcess [ @"C:\Project/.dotnet/dotnet clean C:\Project/test.csproj" ] = 0 ;
915
898
actions . RunProcess [ @"C:\Project/.dotnet/dotnet restore C:\Project/test.csproj" ] = 0 ;
916
- actions . RunProcess [ @"C:\odasa/tools/odasa index --auto C:\Project/.dotnet/dotnet build --no-incremental C:\Project/test.csproj" ] = 0 ;
899
+ actions . RunProcess [ @"C:\odasa/tools/odasa index --auto C:\Project/.dotnet/dotnet build --no-incremental /p:UseSharedCompilation=false C:\Project/test.csproj" ] = 0 ;
917
900
actions . FileExists [ "csharp.log" ] = true ;
918
901
actions . FileExists [ "test.csproj" ] = true ;
919
902
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_TRAP_DIR" ] = "" ;
@@ -933,7 +916,7 @@ public void TestDotnetVersionNotInstalled()
933
916
actions . DownloadFiles . Add ( ( "https://dot.net/v1/dotnet-install.sh" , "dotnet-install.sh" ) ) ;
934
917
935
918
var autobuilder = CreateAutoBuilder ( false , dotnetVersion : "2.1.3" ) ;
936
- TestAutobuilderScript ( autobuilder , 0 , 9 ) ;
919
+ TestAutobuilderScript ( autobuilder , 0 , 8 ) ;
937
920
}
938
921
939
922
[ Fact ]
@@ -945,11 +928,6 @@ public void TestDotnetVersionAlreadyInstalled()
945
928
actions . RunProcess [ @"chmod u+x dotnet-install.sh" ] = 0 ;
946
929
actions . RunProcess [ @"./dotnet-install.sh --channel release --version 2.1.3 --install-dir C:\Project/.dotnet" ] = 0 ;
947
930
actions . RunProcess [ @"rm dotnet-install.sh" ] = 0 ;
948
- actions . RunProcess [ @"C:\Project/.dotnet/dotnet --list-runtimes" ] = 0 ;
949
- actions . RunProcessOut [ @"C:\Project/.dotnet/dotnet --list-runtimes" ] = @"Microsoft.AspNetCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
950
- Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
951
- Microsoft.NETCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
952
- Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]" ;
953
931
actions . RunProcess [ @"C:\Project/.dotnet/dotnet --info" ] = 0 ;
954
932
actions . RunProcess [ @"C:\Project/.dotnet/dotnet clean C:\Project/test.csproj" ] = 0 ;
955
933
actions . RunProcess [ @"C:\Project/.dotnet/dotnet restore C:\Project/test.csproj" ] = 0 ;
@@ -973,7 +951,7 @@ Microsoft.NETCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.Ap
973
951
actions . DownloadFiles . Add ( ( "https://dot.net/v1/dotnet-install.sh" , "dotnet-install.sh" ) ) ;
974
952
975
953
var autobuilder = CreateAutoBuilder ( false , dotnetVersion : "2.1.3" ) ;
976
- TestAutobuilderScript ( autobuilder , 0 , 9 ) ;
954
+ TestAutobuilderScript ( autobuilder , 0 , 8 ) ;
977
955
}
978
956
979
957
private void TestDotnetVersionWindows ( Action action , int commandsRun )
@@ -984,7 +962,7 @@ private void TestDotnetVersionWindows(Action action, int commandsRun)
984
962
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet --info" ] = 0 ;
985
963
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet clean C:\Project\test.csproj" ] = 0 ;
986
964
actions . RunProcess [ @"cmd.exe /C C:\Project\.dotnet\dotnet restore C:\Project\test.csproj" ] = 0 ;
987
- actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\odasa index --auto C:\Project\.dotnet\dotnet build --no-incremental C:\Project\test.csproj" ] = 0 ;
965
+ actions . RunProcess [ @"cmd.exe /C C:\odasa\tools\odasa index --auto C:\Project\.dotnet\dotnet build --no-incremental /p:UseSharedCompilation=false C:\Project\test.csproj" ] = 0 ;
988
966
actions . FileExists [ "csharp.log" ] = true ;
989
967
actions . FileExists [ @"C:\Project\test.csproj" ] = true ;
990
968
actions . GetEnvironmentVariable [ "CODEQL_EXTRACTOR_CSHARP_TRAP_DIR" ] = "" ;
0 commit comments