|
37 | 37 | <WarningLevel>4</WarningLevel>
|
38 | 38 | </PropertyGroup>
|
39 | 39 |
|
| 40 | + <!-- SSL test support --> |
| 41 | + |
| 42 | + <!-- I'd use the Choose construct for this, but it seems broken on Mono --> |
| 43 | + <PropertyGroup Condition="'$(SSL_CERTS_DIR)' == ''"> |
| 44 | + <SSLAvail>false</SSLAvail> |
| 45 | + </PropertyGroup> |
| 46 | + <PropertyGroup Condition="'$(SSL_CERTS_DIR)' != ''"> |
| 47 | + <SSLAvail>true</SSLAvail> |
| 48 | + <SSLCertsDir>$(SSL_CERTS_DIR)</SSLCertsDir> |
| 49 | + </PropertyGroup> |
| 50 | + |
| 51 | + <Target Name="ImportSSL" Condition="$(SSLAvail)"> |
| 52 | + <!-- import cacert into certmgr --> |
| 53 | + <Exec Command="certmgr -add -c Trust $(SSLCertsDir)/testca/cacert.cer"/> |
| 54 | + </Target> |
| 55 | + |
40 | 56 | <!-- Running the tests -->
|
41 |
| - <Target Name="RunUnitTests"> |
| 57 | + <Target Name="RunUnitTests" DependsOnTargets="ImportSSL"> |
42 | 58 | <Exec Command='$(PropLaunchExe)..\..\..\lib\nunit\nunit-console.exe "build\bin\$(AssemblyName).dll"' WorkingDirectory="$(MSBuildProjectDirectory)" ContinueOnError="true" />
|
43 |
| - </Target> |
44 |
| - |
45 |
| - <!-- Clean test result file --> |
46 |
| - <Target Name="CleanTestResults"> |
47 |
| - <Delete Files="TestResult.xml" /> |
| 59 | + </Target> |
| 60 | + |
| 61 | + <!-- Clean test result file --> |
| 62 | + <Target Name="CleanTestResults"> |
| 63 | + <Delete Files="TestResult.xml" /> |
48 | 64 | </Target>
|
49 | 65 |
|
50 | 66 | <!-- Visual Studio generated reference and file list -->
|
|
75 | 91 |
|
76 | 92 | <!-- Microsoft CSharp targets -->
|
77 | 93 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
78 |
| - |
| 94 | + |
79 | 95 | <!-- Custom AfterBuild -->
|
80 |
| - <Target Name="AfterBuild" DependsOnTargets="RunUnitTests" /> |
81 |
| - |
82 |
| - <!-- Custom BeforeClean --> |
| 96 | + <Target Name="AfterBuild" DependsOnTargets="RunUnitTests" /> |
| 97 | + |
| 98 | + <!-- Custom BeforeClean --> |
83 | 99 | <Target Name="BeforeClean" DependsOnTargets="CleanTestResults" />
|
84 | 100 |
|
85 | 101 | </Project>
|
86 |
| - |
| 102 | + |
0 commit comments