forked from signalfx/signalfx-dotnet-tracing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
win-integration-tests.cmd
60 lines (43 loc) · 3.42 KB
/
win-integration-tests.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@rem Simple Windows cmd file to run equivalent of integration tests
setlocal enabledelayedexpansion
set buildConfiguration=Debug
set buildPlatform=x64
@rem publishOutput MUST be the an absolute path since projects in sub-directories will use it.
set publishOutput=%~dp0src\bin\managed-publish
nuget restore Datadog.Trace.sln
if %errorlevel% neq 0 exit /b %errorlevel%
for %%i in (net45 net461 netstandard2.0) do (
dotnet publish --configuration %buildConfiguration% --framework %%i --output %publishOutput%/%%i .\src\DataDog.Trace.ClrProfiler.Managed\DataDog.Trace.ClrProfiler.Managed.csproj
if !errorlevel! neq 0 exit /b !errorlevel!
)
dotnet build --configuration %buildConfiguration% .\src\Datadog.Trace.ClrProfiler.Managed.Loader\Datadog.Trace.ClrProfiler.Managed.Loader.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild Datadog.Trace.proj /t:BuildCpp /p:Configuration=%buildConfiguration%;Platform=%buildPlatform%
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild Datadog.Trace.proj /t:BuildFrameworkReproductions /p:Configuration=%buildConfiguration%;Platform=%buildPlatform%
if %errorlevel% neq 0 exit /b %errorlevel%
@REM for /f %%i in ('dir /s/b %publishOutput%\net45\*.dll') do (
@REM gacutil /i %%i /f
@REM if !errorlevel! neq 0 exit /b !errorlevel!
@REM )
for /f %%i in ('dir /s/b .\samples\*.csproj') do (
dotnet build --configuration %buildConfiguration% -p:Platform=%buildPlatform% -p:ManagedProfilerOutputDirectory=%publishOutput% %%i
if !errorlevel! neq 0 exit /b !errorlevel!
)
for /f %%i in ('dir /s/b .\reproductions\*.csproj') do (
dotnet build --configuration %buildConfiguration% -p:Platform=%buildPlatform% -p:ManagedProfilerOutputDirectory=%publishOutput% %%i
rem ignore some errors since some reproductions are broken
)
dotnet build --configuration %buildConfiguration% -p:Platform=%buildPlatform% -p:ManagedProfilerOutputDirectory=%publishOutput% ./test/Datadog.Trace.IntegrationTests/Datadog.Trace.IntegrationTests.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet build --configuration %buildConfiguration% -p:Platform=%buildPlatform% -p:ManagedProfilerOutputDirectory=%publishOutput% ./test/Datadog.Trace.ClrProfiler.IntegrationTests/Datadog.Trace.ClrProfiler.IntegrationTests.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet build --configuration %buildConfiguration% -p:Platform=%buildPlatform% -p:ManagedProfilerOutputDirectory=%publishOutput% ./test/Datadog.Trace.OpenTracing.IntegrationTests/Datadog.Trace.OpenTracing.IntegrationTests.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
@rem TESTS
dotnet test --configuration %buildConfiguration% -p:Platform=%buildPlatform% .\test\Datadog.Trace.IntegrationTests\Datadog.Trace.IntegrationTests.csproj --logger trx -r .\test\Datadog.Trace.IntegrationTests\results
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet test --configuration %buildConfiguration% -p:Platform=%buildPlatform% .\test\Datadog.Trace.OpenTracing.IntegrationTests\Datadog.Trace.OpenTracing.IntegrationTests.csproj --logger trx -r .\test\Datadog.Trace.OpenTracing.IntegrationTests\results
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet test --filter "RunOnWindows=True|Category=Smoke" --configuration %buildConfiguration% -p:Platform=%buildPlatform% .\test\Datadog.Trace.ClrProfiler.IntegrationTests\Datadog.Trace.ClrProfiler.IntegrationTests.csproj --logger trx -r .\test\Datadog.Trace.ClrProfiler.IntegrationTests\results
if %errorlevel% neq 0 exit /b %errorlevel%