Skip to content

Commit

Permalink
Test Engine Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cschuchardt88 committed Jun 28, 2024
1 parent ff3bf4f commit 17db1fb
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 57 deletions.
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" PrivateAssets="all" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.404",
"version": "8.0.0",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Authors>The Neo Project</Authors>
<Company>The Neo Project</Company>
<Copyright>2015-2023 The Neo Project</Copyright>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -19,7 +19,7 @@
<ApplicationIcon>../neo-cli.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<NeoVersion>3.6.2</NeoVersion>
<NeoVersion>3.7.5</NeoVersion>
</PropertyGroup>
<ItemGroup>
<None Include="../neo-logo-72.png" Pack="true" Visible="false" PackagePath=""/>
Expand Down
9 changes: 7 additions & 2 deletions src/assertions/assertions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -23,4 +23,9 @@
<PackageReference Include="Neo" Version="$(NeoVersion)" />
</ItemGroup>


<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
17 changes: 10 additions & 7 deletions src/bctklib/bctklib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
<InternalsVisibleTo Include="test.bctklib" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MessagePack" Version="2.5.129" />
<PackageReference Include="MessagePack" Version="2.5.168" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.Streams" Version="2.10.72" />
<PackageReference Include="OneOf" Version="3.0.263" />
<PackageReference Include="rocksdb" Version="8.6.7.43630" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.87" />
<PackageReference Include="Neo.Cryptography.MPT" Version="$(NeoVersion)" />
<PackageReference Include="Neo.Network.RPC.RpcClient" Version="$(NeoVersion)" />
<PackageReference Include="Nerdbank.Streams" Version="2.11.74" />
<PackageReference Include="OneOf" Version="3.0.271" />
<PackageReference Include="rocksdb" Version="8.11.3.46984" />
<PackageReference Include="System.IO.Abstractions" Version="21.0.22" />
<PackageReference Include="Neo.Cryptography.MPT" Version="3.7.5" />
<PackageReference Include="Neo.Network.RPC.RpcClient" Version="3.7.5" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>
</Project>
12 changes: 6 additions & 6 deletions src/bctklib/smart-contract/TestApplicationEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial class TestApplicationEngine : ApplicationEngine
static TestApplicationEngine()
{
var builder = ImmutableDictionary.CreateBuilder<uint, InteropDescriptor>();
builder.Add(OverrideDescriptor(ApplicationEngine.System_Runtime_CheckWitness, nameof(CheckWitnessOverride)));
builder.Add(OverrideDescriptor(System_Runtime_CheckWitness, nameof(CheckWitnessOverride)));
overriddenServices = builder.ToImmutable();

static KeyValuePair<uint, InteropDescriptor> OverrideDescriptor(InteropDescriptor descriptor, string overrideMethodName)
Expand Down Expand Up @@ -200,7 +200,7 @@ public override VMState Execute()
return base.Execute();
}

protected override void LoadContext(ExecutionContext context)
public override void LoadContext(ExecutionContext context)
{
base.LoadContext(context);
coverageWriter?.WriteContext(context);
Expand Down Expand Up @@ -310,15 +310,15 @@ private void OnNotify(object? sender, NotifyEventArgs args)

bool CheckWitnessOverride(byte[] hashOrPubkey) => witnessChecker(hashOrPubkey);

protected override void OnSysCall(uint methodHash)
protected override void OnSysCall(InteropDescriptor descriptor)
{
if (overriddenServices.TryGetValue(methodHash, out var descriptor))
if (overriddenServices.TryGetValue(descriptor, out var overrideDescriptor))
{
base.OnSysCall(descriptor);
base.OnSysCall(overrideDescriptor);
}
else
{
base.OnSysCall(methodHash);
base.OnSysCall(descriptor);
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/build-tasks/build-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.4.0" PrivateAssets="All" />
<PackageReference Include="PolySharp" Version="1.12.1">
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.10.4" PrivateAssets="All" />
<PackageReference Include="PolySharp" Version="1.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
10 changes: 7 additions & 3 deletions src/collector/collector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.4.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" />
<PackageReference Remove="Microsoft.SourceLink.GitHub" />
<PackageReference Include="PolySharp" Version="1.12.1">
<PackageReference Include="PolySharp" Version="1.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
9 changes: 7 additions & 2 deletions src/neoxp/neoxp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nito.Disposables" Version="2.4.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="Nito.Disposables" Version="2.5.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Neo" Version="$(NeoVersion)" />
<PackageReference Include="Neo.Consensus.DBFT" Version="$(NeoVersion)" />
<PackageReference Include="Neo.Plugins.RpcServer" Version="$(NeoVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\bctklib\bctklib.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>
</Project>
10 changes: 7 additions & 3 deletions src/runner/runner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Nito.Disposables" Version="2.3.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Nito.Disposables" Version="2.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\bctklib\bctklib.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion src/test-harness/test-harness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\bctklib\bctklib.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
5 changes: 4 additions & 1 deletion src/trace/neotrace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\bctklib\bctklib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion src/worknet/neoworknet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@

<ItemGroup>
<PackageReference Include="Crayon" Version="2.0.69" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Neo.Consensus.DBFT" Version="$(NeoVersion)" />
<PackageReference Include="Neo.Plugins.RpcServer" Version="$(NeoVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\bctklib\bctklib.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>
</Project>
22 changes: 13 additions & 9 deletions test/test-build-tasks/test-build-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<IsPackable>false</IsPackable>
<NoWarn>IDE1006;NU1701</NoWarn>
<RootNamespace>build_tasks</RootNamespace>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,28 +22,32 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.8" />
<!--
neo-build-tasks depends on Microsoft.Build.Utilities.Core, but has PrivateAssets = All. The test project must explicitly
declare this dependency. However, for reasons I don't know, Microsoft.Build.Utilities.Core package v17.4.0 contains
a copy of Microsoft.Build.Utilities.Core.dll v15.1.0.0. Tests that depend on types in that package fail unless the
test project takes a dependency on Microsoft.Build.Utilities.Core package, v15.1.548.
-->
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.548" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.10.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel" Version="14.0.0" />
<PackageReference Include="Moq" Version="4.18.3" />
<PackageReference Include="Moq" Version="4.20.70" />
<!-- <PackageReference Include="MSBuild.ProjectCreation" Version="2.0.1" /> -->
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Xunit.Combinatorial" Version="1.5.25" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
16 changes: 10 additions & 6 deletions test/test-collector/test-collector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>test_collector</RootNamespace>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,17 +16,21 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Moq" Version="4.18.3" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions test/test.bctklib/test.bctklib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="_testFiles/*" />
Expand All @@ -11,24 +11,24 @@
<ProjectReference Include="..\..\src\bctklib\bctklib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Neo.Plugins.Storage.RocksDBStore" Version="3.6.2" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="19.2.87" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Neo.Plugins.Storage.RocksDBStore" Version="3.7.5" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.0.22" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
</ItemGroup>
</Project>

0 comments on commit 17db1fb

Please sign in to comment.