VStudio: Add tests for symbolspath

This commit is contained in:
Thomas Desveaux 2018-04-03 20:18:50 +02:00
parent 75692a7920
commit 2bb0800b04
2 changed files with 69 additions and 0 deletions

View File

@ -1199,3 +1199,42 @@
</ClCompile>
]]
end
--
-- Check StaticLib SymbolsPath
--
function suite.generateProgramDataBaseFileName_onStaticLib()
kind "StaticLib"
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
</ClCompile>
]]
end
function suite.generateNotProgramDataBaseFileName_onSharedLib()
kind "SharedLib"
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
</ClCompile>
]]
end

View File

@ -226,6 +226,36 @@
-- Test the handling of the SymbolsPath flag.
--
function suite.generateProgramDataBaseFileName_onStaticLib()
kind "StaticLib"
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
]]
end
function suite.generateProgramDataBaseFileName_onSharedLib()
kind "SharedLib"
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsOn_on2010()
p.action.set("vs2010")
symbols "On"