mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 20:03:33 +08:00
[0.3.x] added : python unit tests
git-svn-id: https://pykd.svn.codeplex.com/svn@83678 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
e3b0919882
commit
54b6e5f15f
@ -2,9 +2,47 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\source\kdlib.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\source\kdlib.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FE246107-1CB8-404F-97BD-E901E4B5E972}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
test\scripts\_run_pykdtest.cmd = test\scripts\_run_pykdtest.cmd
|
||||||
|
test\scripts\basetest.py = test\scripts\basetest.py
|
||||||
|
test\scripts\clienttest.py = test\scripts\clienttest.py
|
||||||
|
test\scripts\customtypestest.py = test\scripts\customtypestest.py
|
||||||
|
test\scripts\dbgcmd.py = test\scripts\dbgcmd.py
|
||||||
|
test\scripts\diatest.py = test\scripts\diatest.py
|
||||||
|
test\scripts\ehexcepttest.py = test\scripts\ehexcepttest.py
|
||||||
|
test\scripts\ehloadtest.py = test\scripts\ehloadtest.py
|
||||||
|
test\scripts\ehstatustest.py = test\scripts\ehstatustest.py
|
||||||
|
test\scripts\ehsymbolstest.py = test\scripts\ehsymbolstest.py
|
||||||
|
test\scripts\eventtest.py = test\scripts\eventtest.py
|
||||||
|
test\scripts\intbase.py = test\scripts\intbase.py
|
||||||
|
test\scripts\localstest.py = test\scripts\localstest.py
|
||||||
|
test\scripts\memtest.py = test\scripts\memtest.py
|
||||||
|
test\scripts\moduletest.py = test\scripts\moduletest.py
|
||||||
|
test\scripts\mspdbtest.py = test\scripts\mspdbtest.py
|
||||||
|
test\scripts\pykdtest.py = test\scripts\pykdtest.py
|
||||||
|
test\scripts\regtest.py = test\scripts\regtest.py
|
||||||
|
test\scripts\synsymtest.py = test\scripts\synsymtest.py
|
||||||
|
test\scripts\target.py = test\scripts\target.py
|
||||||
|
test\scripts\testutils.py = test\scripts\testutils.py
|
||||||
|
test\scripts\thrdctxtest.py = test\scripts\thrdctxtest.py
|
||||||
|
test\scripts\typedvar.py = test\scripts\typedvar.py
|
||||||
|
test\scripts\typeinfo.py = test\scripts\typeinfo.py
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "targetapp", "kdlibcpp\tests\targetapp\targetapp.vcxproj", "{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{3E9C538F-F060-4E86-AB7D-D44439615B63} = {3E9C538F-F060-4E86-AB7D-D44439615B63}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug_2.7|Win32 = Debug_2.7|Win32
|
Debug_2.7|Win32 = Debug_2.7|Win32
|
||||||
@ -24,8 +62,18 @@ Global
|
|||||||
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Win32.Build.0 = Debug|Win32
|
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.ActiveCfg = Release|Win32
|
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.Build.0 = Release|Win32
|
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{FE246107-1CB8-404F-97BD-E901E4B5E972} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
|
||||||
|
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<TargetExt>.pyd</TargetExt>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
@ -86,6 +87,9 @@
|
|||||||
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
|
||||||
<AdditionalLibraryDirectories>$(PYTHON_27_X86_ROOT)\libs;$(BOOST_ROOT)\stage_2.7\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(PYTHON_27_X86_ROOT)\libs;$(BOOST_ROOT)\stage_2.7\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>"$(ProjectDir)..\test\scripts\_run_pykdtest.cmd" "$(TargetDir)targetapp.exe" $(PlatformName)</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
@ -34,11 +34,11 @@ using namespace kdlib;
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
|
static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
|
||||||
//#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
// " <DBG>"
|
" <DBG>"
|
||||||
//#endif // _DEBUG
|
#endif // _DEBUG
|
||||||
//;
|
;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -82,7 +82,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, dprintln, 1, 2 );
|
|||||||
|
|
||||||
BOOST_PYTHON_MODULE( pykd )
|
BOOST_PYTHON_MODULE( pykd )
|
||||||
{
|
{
|
||||||
// python::scope().attr("version") = pykdVersion;
|
python::scope().attr("version") = pykdVersion;
|
||||||
|
|
||||||
// // DbgEng services
|
// // DbgEng services
|
||||||
// python::def( "setSymSrvDir", &setSymSrvDir,
|
// python::def( "setSymSrvDir", &setSymSrvDir,
|
||||||
|
@ -6,3 +6,17 @@
|
|||||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||||
|
|
||||||
#include <SDKDDKVer.h>
|
#include <SDKDDKVer.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define PYKD_VERSION_MAJOR 0
|
||||||
|
#define PYKD_VERSION_MINOR 3
|
||||||
|
#define PYKD_VERSION_SUBVERSION 0
|
||||||
|
#define PYKD_VERSION_BUILDNO 0
|
||||||
|
|
||||||
|
#define __VER_STR2__(x) #x
|
||||||
|
#define __VER_STR1__(x) __VER_STR2__(x)
|
||||||
|
|
||||||
|
#define PYKD_VERSION_BUILD PYKD_VERSION_MAJOR, PYKD_VERSION_MINOR, PYKD_VERSION_SUBVERSION, PYKD_VERSION_BUILDNO
|
||||||
|
|
||||||
|
#define PYKD_VERSION_BUILD_STR __VER_STR1__(PYKD_VERSION_BUILD)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ if "%PROCESSOR_ARCHITECTURE%" == "x86" (
|
|||||||
if not defined PROCESSOR_ARCHITEW6432 set Arch=x86
|
if not defined PROCESSOR_ARCHITEW6432 set Arch=x86
|
||||||
)
|
)
|
||||||
|
|
||||||
set PythonRegKey=HKLM\Software\Python\PythonCore\2.6\InstallPath
|
set PythonRegKey=HKLM\Software\Python\PythonCore\2.7\InstallPath
|
||||||
|
|
||||||
set RegSwitch=64
|
set RegSwitch=64
|
||||||
if "%TestAppPlatform%"=="Win32" set RegSwitch=32
|
if "%TestAppPlatform%"=="Win32" set RegSwitch=32
|
||||||
|
@ -13,18 +13,18 @@ import pykd
|
|||||||
|
|
||||||
import target
|
import target
|
||||||
|
|
||||||
import intbase
|
#import intbase
|
||||||
import memtest
|
#import memtest
|
||||||
import moduletest
|
#import moduletest
|
||||||
import typeinfo
|
#import typeinfo
|
||||||
import typedvar
|
#import typedvar
|
||||||
import regtest
|
#import regtest
|
||||||
import mspdbtest
|
#import mspdbtest
|
||||||
import localstest
|
#import localstest
|
||||||
import customtypestest
|
#import customtypestest
|
||||||
import ehexcepttest
|
#import ehexcepttest
|
||||||
import ehstatustest
|
#import ehstatustest
|
||||||
import ehsymbolstest
|
#import ehsymbolstest
|
||||||
|
|
||||||
class StartProcessWithoutParamsTest(unittest.TestCase):
|
class StartProcessWithoutParamsTest(unittest.TestCase):
|
||||||
def testStart(self):
|
def testStart(self):
|
||||||
@ -45,21 +45,21 @@ def getTestSuite( singleName = "" ):
|
|||||||
[
|
[
|
||||||
unittest.TestLoader().loadTestsFromTestCase( StartProcessWithoutParamsTest ),
|
unittest.TestLoader().loadTestsFromTestCase( StartProcessWithoutParamsTest ),
|
||||||
# *** Test without start/kill new processes
|
# *** Test without start/kill new processes
|
||||||
unittest.TestLoader().loadTestsFromTestCase( intbase.IntBaseTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( intbase.IntBaseTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( moduletest.ModuleTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( moduletest.ModuleTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( memtest.MemoryTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( memtest.MemoryTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( typeinfo.TypeInfoTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( typeinfo.TypeInfoTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( typedvar.TypedVarTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( typedvar.TypedVarTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( regtest.CpuRegTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( regtest.CpuRegTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( customtypestest.CustomTypesTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( customtypestest.CustomTypesTest ),
|
||||||
# ^^^
|
# ^^^
|
||||||
unittest.TestLoader().loadTestsFromTestCase( TerminateProcessTest ),
|
unittest.TestLoader().loadTestsFromTestCase( TerminateProcessTest ),
|
||||||
|
|
||||||
unittest.TestLoader().loadTestsFromTestCase( mspdbtest.MsPdbTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( mspdbtest.MsPdbTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( localstest.LocalVarsTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( localstest.LocalVarsTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( ehexcepttest.EhExceptionTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( ehexcepttest.EhExceptionTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( ehstatustest.EhStatusTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( ehstatustest.EhStatusTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( ehsymbolstest.EhSymbolsTest ),
|
#unittest.TestLoader().loadTestsFromTestCase( ehsymbolstest.EhSymbolsTest ),
|
||||||
] )
|
] )
|
||||||
else:
|
else:
|
||||||
return unittest.TestSuite(
|
return unittest.TestSuite(
|
||||||
|
Loading…
Reference in New Issue
Block a user