forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup functional tests / Structure them like libraries tests (dotne…
…t#46810) You should now be able to run the functional tests locally the same way as running the libraries tests. Example: `./dotnet.sh build /t:Test src/tests/FunctionalTests/wasm/Interpreter/console/ /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release` Co-authored-by: Steve Pfister <[email protected]> Co-authored-by: Maxim Lipnin <[email protected]>
- Loading branch information
1 parent
7b24471
commit c260375
Showing
32 changed files
with
169 additions
and
521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 9 additions & 75 deletions
84
...sts/FunctionalTests/Android/Emulator/Interpreter/Android.Emulator.Interpreter.Test.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="..\..\common.props" /> | ||
|
||
<!-- Redirect 'dotnet publish' to in-tree runtime pack --> | ||
<Target Name="TrickRuntimePackLocation" AfterTargets="ProcessFrameworkReferences"> | ||
<ItemGroup> | ||
<RuntimePack> | ||
<PackageDirectory>$(ArtifactsBinDir)microsoft.netcore.app.runtime.$(RuntimeIdentifier)\$(Configuration)</PackageDirectory> | ||
</RuntimePack> | ||
</ItemGroup> | ||
<Message Text="Packaged ID: %(RuntimePack.PackageDirectory)" Importance="high" /> | ||
</Target> | ||
|
||
<UsingTask TaskName="AndroidAppBuilderTask" AssemblyFile="$(AndroidAppBuilderTasksAssemblyPath)"/> | ||
|
||
<Target Name="BuildApp" AfterTargets="CopyFilesToPublishDirectory"> | ||
<PropertyGroup> | ||
<StripDebugSymbols>False</StripDebugSymbols> | ||
<StripDebugSymbols Condition="'$(Configuration)' == 'Release'">True</StripDebugSymbols> | ||
<AdbTool>$(ANDROID_SDK_ROOT)\platform-tools\adb</AdbTool> | ||
<ApkDir>$(PublishDir)apk\</ApkDir> | ||
</PropertyGroup> | ||
|
||
<RemoveDir Directories="$(ApkDir)" /> | ||
|
||
<PropertyGroup> | ||
<AndroidAbi Condition="'$(TargetArchitecture)' == 'arm64'">arm64-v8a</AndroidAbi> | ||
<AndroidAbi Condition="'$(TargetArchitecture)' == 'arm'">armeabi-v7a</AndroidAbi> | ||
<AndroidAbi Condition="'$(TargetArchitecture)' == 'x64'">x86_64</AndroidAbi> | ||
<AndroidAbi Condition="'$(TargetArchitecture)' == 'x86'">x86</AndroidAbi> | ||
</PropertyGroup> | ||
|
||
<!-- TODO: delete once we switch to Android Crypto --> | ||
<Copy Condition="'$(ANDROID_OPENSSL_AAR)' != ''" | ||
SourceFiles="$(ANDROID_OPENSSL_AAR)\prefab\modules\crypto\libs\android.$(AndroidAbi)\libcrypto.so" | ||
DestinationFolder="$(PublishDir)" SkipUnchangedFiles="true"/> | ||
<Copy Condition="'$(ANDROID_OPENSSL_AAR)' != ''" | ||
SourceFiles="$(ANDROID_OPENSSL_AAR)\prefab\modules\ssl\libs\android.$(AndroidAbi)\libssl.so" | ||
DestinationFolder="$(PublishDir)" SkipUnchangedFiles="true"/> | ||
|
||
<AndroidAppBuilderTask | ||
RuntimeIdentifier="$(RuntimeIdentifier)" | ||
SourceDir="$(PublishDir)" | ||
ProjectName="Android.Emulator.Interpreter.Test" | ||
ForceInterpreter="True" | ||
MonoRuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackDir)\native\include\mono-2.0" | ||
MainLibraryFileName="Android.Emulator.Interpreter.Test.dll" | ||
StripDebugSymbols="$(StripDebugSymbols)" | ||
OutputDir="$(ApkDir)"> | ||
<Output TaskParameter="ApkBundlePath" PropertyName="ApkBundlePath" /> | ||
<Output TaskParameter="ApkPackageId" PropertyName="ApkPackageId" /> | ||
</AndroidAppBuilderTask> | ||
|
||
<Message Importance="High" Text="Apk: $(ApkBundlePath)"/> | ||
<Message Importance="High" Text="PackageId: $(ApkPackageId)"/> | ||
</Target> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<MonoForceInterpreter>true</MonoForceInterpreter> | ||
<RunAOTCompilation>false</RunAOTCompilation> | ||
<TestRuntime>true</TestRuntime> | ||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
<MainLibraryFileName>Android.Emulator.Interpreter.Test.dll</MainLibraryFileName> | ||
<ExpectedExitCode>42</ExpectedExitCode> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
</ItemGroup> | ||
|
||
<Target Name="CopySampleAppToHelixTestDir" | ||
AfterTargets="Build" | ||
DependsOnTargets="Publish;BuildApp" > | ||
<PropertyGroup> | ||
<OSPlatformConfig>$(TargetOS).AnyCPU.$(Configuration)</OSPlatformConfig> | ||
<HelixArchiveRoot>$(ArtifactsDir)helix/</HelixArchiveRoot> | ||
<HelixArchiveRunOnlyRoot>$(HelixArchiveRoot)runonly/</HelixArchiveRunOnlyRoot> | ||
<HelixArchiveRunOnlyAppsDir>$(HelixArchiveRunOnlyRoot)$(OSPlatformConfig)/</HelixArchiveRunOnlyAppsDir> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<_apkFiles Include="$(ApkBundlePath)" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(_apkFiles)" | ||
DestinationFolder="$(HelixArchiveRunOnlyAppsDir)/%(RecursiveDir)" /> | ||
|
||
<Message Importance="High" Text="ApkBundlePath: $(ApkBundlePath)"/> | ||
<Message Importance="High" Text="TestArchiveTestsDir: $(TestArchiveTestsDir)"/> | ||
</Target> | ||
</Project> |
14 changes: 14 additions & 0 deletions
14
src/tests/FunctionalTests/Android/Emulator/JIT/Android.Emulator.JIT.Test.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<RunAOTCompilation>false</RunAOTCompilation> | ||
<TestRuntime>true</TestRuntime> | ||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
<MainLibraryFileName>Android.Emulator.JIT.Test.dll</MainLibraryFileName> | ||
<ExpectedExitCode>42</ExpectedExitCode> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
|
||
public class Program | ||
{ | ||
public static int Main(string[] args) | ||
{ | ||
Console.WriteLine("Hello, Android!"); // logcat | ||
return 42; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<Project> | ||
<Import Project="..\..\mono\Directory.Build.targets" /> | ||
<Import Project="..\..\libraries\Directory.Build.targets" /> | ||
</Project> |
Oops, something went wrong.