aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2022-11-20 20:18:21 +0100
committerGitHub <noreply@github.com>2022-11-20 20:18:21 +0100
commit905a191e28fd9262d0fde97f3c2d100f74693c8d (patch)
treee430239067d37d25aaf8d6f476b3b5d5aaab0858 /Ryujinx.Tests
parentab0491817e87b9dd134c41764ba213f8c8559e9b (diff)
Use upstream unicorn for Ryujinx.Tests.Unicorn (#3771)
* unicorn: Add modified ver of unicorns const gen * unicorn: Use upstream consts These consts were generated from the dev branch of unicorn * unicorn: Split common consts into multiple enums * unicorn: Remove arch prefix from consts * unicorn: Add new windows dll Windows 10 - MSVC x64 shared build * unicorn: Use absolute path for const generation * unicorn: Remove fspcr patch * unicorn: Fix using the wrong file extension For some reason _NativeLibraryExtension evaluates to ".so" even on Windows. * unicorn: Add linux shared object again * unicron: Add DllImportResolver * unicorn: Try to import unicorn using an absolute path * unicorn: Add clean target * unicorn: Replace IsUnicornAvailable() methods * unicorn: Skip tests instead of silently passing them if unicorn is missing * unicorn: Write error message to stderr * unicorn: Make Interface static * unicron: Include prefixed unicorn libs (libunicorn.so) Co-authored-by: merry <git@mary.rs> * unicorn: Add lib prefix to shared object for linux Co-authored-by: merry <git@mary.rs>
Diffstat (limited to 'Ryujinx.Tests')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTest.cs11
-rw-r--r--Ryujinx.Tests/Cpu/CpuTest32.cs9
-rw-r--r--Ryujinx.Tests/Ryujinx.Tests.csproj12
3 files changed, 18 insertions, 14 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTest.cs b/Ryujinx.Tests/Cpu/CpuTest.cs
index f983a03f..cafed37d 100644
--- a/Ryujinx.Tests/Cpu/CpuTest.cs
+++ b/Ryujinx.Tests/Cpu/CpuTest.cs
@@ -38,14 +38,11 @@ namespace Ryujinx.Tests.Cpu
private bool _usingMemory;
- static CpuTest()
+ [OneTimeSetUp]
+ public void OneTimeSetup()
{
_unicornAvailable = UnicornAArch64.IsAvailable();
-
- if (!_unicornAvailable)
- {
- Console.WriteLine("WARNING: Could not find Unicorn.");
- }
+ Assume.That(_unicornAvailable, "Unicorn is not available");
}
[SetUp]
@@ -610,4 +607,4 @@ namespace Ryujinx.Tests.Cpu
return rnd & 0x800FFFFFFFFFFFFFul;
}
}
-}
+} \ No newline at end of file
diff --git a/Ryujinx.Tests/Cpu/CpuTest32.cs b/Ryujinx.Tests/Cpu/CpuTest32.cs
index 2c36396f..53fea943 100644
--- a/Ryujinx.Tests/Cpu/CpuTest32.cs
+++ b/Ryujinx.Tests/Cpu/CpuTest32.cs
@@ -33,14 +33,11 @@ namespace Ryujinx.Tests.Cpu
private bool _usingMemory;
- static CpuTest32()
+ [OneTimeSetUp]
+ public void OneTimeSetup()
{
_unicornAvailable = UnicornAArch32.IsAvailable();
-
- if (!_unicornAvailable)
- {
- Console.WriteLine("WARNING: Could not find Unicorn.");
- }
+ Assume.That(_unicornAvailable, "Unicorn is not available");
}
[SetUp]
diff --git a/Ryujinx.Tests/Ryujinx.Tests.csproj b/Ryujinx.Tests/Ryujinx.Tests.csproj
index 6ab2fa6b..b56929dc 100644
--- a/Ryujinx.Tests/Ryujinx.Tests.csproj
+++ b/Ryujinx.Tests/Ryujinx.Tests.csproj
@@ -34,7 +34,17 @@
</ItemGroup>
<Target Name="CopyUnicorn" AfterTargets="Build">
- <Copy SourceFiles="..\Ryujinx.Tests.Unicorn\libs\$(TargetOS)\unicorn.dll" DestinationFolder="$(OutputPath)" ContinueOnError="true" />
+ <ItemGroup>
+ <UnicornLib Include="..\Ryujinx.Tests.Unicorn\libs\$(TargetOS)\*unicorn.*"/>
+ </ItemGroup>
+ <Copy SourceFiles="@(UnicornLib)" DestinationFolder="$(OutputPath)" ContinueOnError="true" />
+ </Target>
+
+ <Target Name="CleanUnicorn" BeforeTargets="Clean">
+ <ItemGroup>
+ <UnicornLib Include="$(OutputPath)/unicorn.*"/>
+ </ItemGroup>
+ <Delete Files="@(UnicornLib)" />
</Target>
</Project>