Skip to content

Commit 86267ec

Browse files
committed
Run C++ unit tests on AppVeyor
Previously, these only ran on Travis.
1 parent bfa4472 commit 86267ec

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

appveyor.yml

+8
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ test_script:
6969
git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
7070
}
7171
}
72+
if ($env:Compiler -eq "mingw") {
73+
Write-Host "Running libsass unit tests via mingw32-make..."
74+
mingw32-make -C test test
75+
} else {
76+
Write-Host "Running libsass unit tests via msbuild..."
77+
msbuild /m:4 /p:"Configuration=$env:Config;Platform=$env:Platform" test\test_shared_ptr.vcxproj
78+
msbuild /m:4 /p:"Configuration=$env:Config;Platform=$env:Platform" test\test_util_string.vcxproj
79+
}
7280
$env:TargetPath = Join-Path $pwd.Path $env:TargetPath
7381
If (Test-Path "$env:TargetPath") {
7482
ruby sass-spec/sass-spec.rb --probe-todo --impl libsass -c $env:TargetPath -s sass-spec/spec

test/test.props

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<ItemGroup Label="ProjectConfigurations">
3+
<ProjectConfiguration Include="Debug|Win32">
4+
<Configuration>Debug</Configuration>
5+
<Platform>Win32</Platform>
6+
</ProjectConfiguration>
7+
<ProjectConfiguration Include="Debug|x64">
8+
<Configuration>Debug</Configuration>
9+
<Platform>x64</Platform>
10+
</ProjectConfiguration>
11+
<ProjectConfiguration Include="Release|Win32">
12+
<Configuration>Release</Configuration>
13+
<Platform>Win32</Platform>
14+
</ProjectConfiguration>
15+
<ProjectConfiguration Include="Release|x64">
16+
<Configuration>Release</Configuration>
17+
<Platform>x64</Platform>
18+
</ProjectConfiguration>
19+
</ItemGroup>
20+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
21+
<PropertyGroup>
22+
<ConfigurationType>Application</ConfigurationType>
23+
<PlatformToolset>v120</PlatformToolset>
24+
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
25+
<OutputPath>$(SolutionDir)\build\</OutputPath>
26+
<IntermediateOutputPath>$(SolutionDir)\build\obj\$(Configuration)\$(MSBuildProjectName)\</IntermediateOutputPath>
27+
<OutDir>$(OutputPath)</OutDir>
28+
<UseCommonOutputDirectory>True</UseCommonOutputDirectory>
29+
</PropertyGroup>
30+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31+
<PropertyGroup>
32+
<IncludePath>../include;$(IncludePath)</IncludePath>
33+
</PropertyGroup>
34+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Targets" />
35+
</Project>

test/test_shared_ptr.vcxproj

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="test.props" />
3+
<ItemGroup>
4+
<ClInclude Include="../src/memory/SharedPtr.h" />
5+
<ClCompile Include="../src/memory/SharedPtr.cpp" />
6+
<ClCompile Include="test_shared_ptr.cpp" />
7+
</ItemGroup>
8+
<Target Name="AfterBuild">
9+
<Exec Command="$(OutDir)\test_shared_ptr.exe"/>
10+
</Target>
11+
</Project>

test/test_util_string.vcxproj

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="test.props" />
3+
<ItemGroup>
4+
<ClInclude Include="../src/util_string.h" />
5+
<ClCompile Include="../src/util_string.cpp" />
6+
<ClCompile Include="test_util_string.cpp" />
7+
</ItemGroup>
8+
<Target Name="AfterBuild">
9+
<Exec Command="$(OutDir)\test_util_string.exe"/>
10+
</Target>
11+
</Project>

0 commit comments

Comments
 (0)