Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Add native tests #201

Merged
merged 25 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"definitions": {
"build": {
"type": "object",
"properties": {
"Artifacts": {
"type": "string",
"description": "The location to place NuGet packages and other packages. Default is ./bin/artifacts "
},
"BuildConfiguration": {
"type": "string",
"description": "Configuration to build - Default is 'Release'",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"DDTracerHome": {
"type": "string",
"description": "The location to create the dd-trace home directory. Default is ./bin/dd-tracer-home "
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NugetPackageDirectory": {
"type": "string",
"description": "The location to restore Nuget packages (optional) "
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Platform": {
"type": "string",
"description": "Platform to build - x86 or x64. Default is x64",
"enum": [
"arm",
"MSIL",
"Win32",
"x64",
"x86"
]
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"BuildAndRunNativeUnitTests",
"BuildTracerHome",
"Clean",
"CompileManagedSrc",
"CompileNativeSrc",
"CompileNativeSrcWindows",
"CompileNativeTests",
"CompileNativeTestsWindows",
"CopyIntegrationsJson",
"CreateDdTracerHome",
"CreateRequiredDirectories",
"PublishManagedProfiler",
"PublishNativeProfiler",
"PublishNativeProfilerWindows",
"Restore",
"RunNativeTests",
"RunNativeTestsWindows"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded. Default is Datadog.Trace.sln"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"BuildAndRunNativeUnitTests",
"BuildTracerHome",
"Clean",
"CompileManagedSrc",
"CompileNativeSrc",
"CompileNativeSrcWindows",
"CompileNativeTests",
"CompileNativeTestsWindows",
"CopyIntegrationsJson",
"CreateDdTracerHome",
"CreateRequiredDirectories",
"PublishManagedProfiler",
"PublishNativeProfiler",
"PublishNativeProfilerWindows",
"Restore",
"RunNativeTests",
"RunNativeTestsWindows"
]
}
},
"TracerHome": {
"type": "string",
"description": "The location to create the tracer home directory. Default is ./bin/tracer-home "
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
}
}
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
RassK marked this conversation as resolved.
Show resolved Hide resolved
"$schema": "./build.schema.json",
"Solution": "Datadog.Trace.sln"
}
120 changes: 120 additions & 0 deletions Datadog.Trace.Native.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Microsoft Visual Studio Solution File, Format Version 12.00
RassK marked this conversation as resolved.
Show resolved Hide resolved
# Visual Studio 15
VisualStudioVersion = 15.0.28307.329
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9E5F0022-0A50-40BF-AC6A-C3078585ECAB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8CEC2042-F11C-49F5-A674-2355793B600A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native.Tests", "test\Datadog.Trace.ClrProfiler.Native.Tests\Datadog.Trace.ClrProfiler.Native.Tests.vcxproj", "{5728056A-51AA-4FF5-AD0C-E86E44E36102}"
ProjectSection(ProjectDependencies) = postProject
{6CE95C50-9533-4650-8F11-BCE30908DCDF} = {6CE95C50-9533-4650-8F11-BCE30908DCDF}
{901F02A8-8776-4D18-80C9-05C58262C1C7} = {901F02A8-8776-4D18-80C9-05C58262C1C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native", "src\Datadog.Trace.ClrProfiler.Native\Datadog.Trace.ClrProfiler.Native.vcxproj", "{91B6272F-5780-4C94-8071-DBBA7B4F67F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Datadog.Trace.ClrProfiler.Native.DLL", "src\Datadog.Trace.ClrProfiler.Native\Datadog.Trace.ClrProfiler.Native.DLL.vcxproj", "{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}"
ProjectSection(ProjectDependencies) = postProject
{0686E907-996A-4D6D-A685-D9C0F932C405} = {0686E907-996A-4D6D-A685-D9C0F932C405}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample-libs", "sample-libs", "{B9AA20A4-0F9A-47FB-B3BE-A5BDEA42EFF0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ExampleLibrary", "test\test-applications\integrations\dependency-libs\Samples.ExampleLibrary\Samples.ExampleLibrary.csproj", "{901F02A8-8776-4D18-80C9-05C58262C1C7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ExampleLibraryTracer", "test\test-applications\integrations\dependency-libs\Samples.ExampleLibraryTracer\Samples.ExampleLibraryTracer.csproj", "{6CE95C50-9533-4650-8F11-BCE30908DCDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Datadog.Trace.ClrProfiler.Managed.Loader", "src\Datadog.Trace.ClrProfiler.Managed.Loader\Datadog.Trace.ClrProfiler.Managed.Loader.csproj", "{0686E907-996A-4D6D-A685-D9C0F932C405}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Debug|Any CPU.ActiveCfg = Debug|Win32
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Debug|x64.ActiveCfg = Debug|x64
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Debug|x64.Build.0 = Debug|x64
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Debug|x86.ActiveCfg = Debug|Win32
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Release|Any CPU.ActiveCfg = Release|Win32
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Release|x64.ActiveCfg = Release|x64
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Release|x64.Build.0 = Release|x64
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Release|x86.ActiveCfg = Release|Win32
{5728056A-51AA-4FF5-AD0C-E86E44E36102}.Release|x86.Build.0 = Release|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Debug|Any CPU.ActiveCfg = Debug|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Debug|x64.ActiveCfg = Debug|x64
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Debug|x64.Build.0 = Debug|x64
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Debug|x86.ActiveCfg = Debug|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Debug|x86.Build.0 = Debug|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Release|Any CPU.ActiveCfg = Release|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Release|x64.ActiveCfg = Release|x64
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Release|x64.Build.0 = Release|x64
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Release|x86.ActiveCfg = Release|Win32
{91B6272F-5780-4C94-8071-DBBA7B4F67F3}.Release|x86.Build.0 = Release|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Debug|Any CPU.ActiveCfg = Debug|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Debug|x64.ActiveCfg = Debug|x64
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Debug|x64.Build.0 = Debug|x64
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Debug|x86.ActiveCfg = Debug|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Debug|x86.Build.0 = Debug|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Release|Any CPU.ActiveCfg = Release|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Release|x64.ActiveCfg = Release|x64
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Release|x64.Build.0 = Release|x64
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Release|x86.ActiveCfg = Release|Win32
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A}.Release|x86.Build.0 = Release|Win32
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|x64.ActiveCfg = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|x64.Build.0 = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|x86.ActiveCfg = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Debug|x86.Build.0 = Debug|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|Any CPU.Build.0 = Release|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|x64.ActiveCfg = Release|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|x64.Build.0 = Release|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|x86.ActiveCfg = Release|Any CPU
{901F02A8-8776-4D18-80C9-05C58262C1C7}.Release|x86.Build.0 = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|x64.ActiveCfg = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|x64.Build.0 = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|x86.ActiveCfg = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Debug|x86.Build.0 = Debug|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|Any CPU.Build.0 = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|x64.ActiveCfg = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|x64.Build.0 = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|x86.ActiveCfg = Release|Any CPU
{6CE95C50-9533-4650-8F11-BCE30908DCDF}.Release|x86.Build.0 = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|x64.ActiveCfg = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|x64.Build.0 = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|x86.ActiveCfg = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Debug|x86.Build.0 = Debug|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|Any CPU.Build.0 = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|x64.ActiveCfg = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|x64.Build.0 = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|x86.ActiveCfg = Release|Any CPU
{0686E907-996A-4D6D-A685-D9C0F932C405}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5728056A-51AA-4FF5-AD0C-E86E44E36102} = {8CEC2042-F11C-49F5-A674-2355793B600A}
{91B6272F-5780-4C94-8071-DBBA7B4F67F3} = {9E5F0022-0A50-40BF-AC6A-C3078585ECAB}
{C0C8D381-D6B9-4C76-9428-F40F2FA93A9A} = {9E5F0022-0A50-40BF-AC6A-C3078585ECAB}
{901F02A8-8776-4D18-80C9-05C58262C1C7} = {B9AA20A4-0F9A-47FB-B3BE-A5BDEA42EFF0}
{6CE95C50-9533-4650-8F11-BCE30908DCDF} = {B9AA20A4-0F9A-47FB-B3BE-A5BDEA42EFF0}
{0686E907-996A-4D6D-A685-D9C0F932C405} = {9E5F0022-0A50-40BF-AC6A-C3078585ECAB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {160A1D00-1F5B-40F8-A155-621B4459D78F}
EndGlobalSection
EndGlobal
7 changes: 7 additions & 0 deletions Datadog.Trace.proj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ItemGroup>
<CsharpProject Include="src\**\*.csproj" />
<CppProject Include="src\**\*.vcxproj"/>
<CppTestProject Include="test\**\*.vcxproj"/>
<SampleProject Include="test\test-applications\**\*.csproj" />
</ItemGroup>

Expand Down Expand Up @@ -52,6 +53,12 @@
</MSBuild>
</Target>

<Target Name="BuildCppTests">
<MSBuild Targets="Build" Projects="@(CppTestProject)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="RestoreAndBuildSamplesForPackageVersions" Condition="'$(TestAllPackageVersions)'=='true'">

<!-- Build the core C# projects first, so that the sample project builds do not need to build them and can be run
Expand Down
Loading