Commit eeac3d5a authored by SND\kernelnet_cp's avatar SND\kernelnet_cp
Browse files

[test] updated: refactored test runner

git-svn-id: https://pykd.svn.codeplex.com/svn@69298 9b283d60-5439-405e-af05-b73fd8c4d996
parent 4497613f
......@@ -5,6 +5,7 @@
import sys
import os
import unittest
import fnmatch
# Dynamically append current pykd.pyd path to PYTHONPATH
sys.path.append(os.path.dirname(sys.argv[1]))
......@@ -13,13 +14,23 @@ import pykd
import target
import basetest
import typeinfo
import regtest
import regtest
def getTestSuite( singleName = "" ):
if singleName == "":
return unittest.TestSuite(
[ unittest.TestLoader().loadTestsFromTestCase( basetest.BaseTest ),
unittest.TestLoader().loadTestsFromTestCase( typeinfo.TypeInfoTest ),
unittest.TestLoader().loadTestsFromTestCase( regtest.CpuRegTest )
] )
else:
return unittest.TestSuite( unittest.TestLoader().loadTestsFromName( singleName ) )
if __name__ == "__main__":
targetAppPath = sys.argv[1]
target.moduleName = os.path.splitext(os.path.basename(targetAppPath))[0]
print "\nTest module: %s" % targetAppPath
......@@ -27,11 +38,7 @@ if __name__ == "__main__":
pykd.go()
target.module = pykd.loadModule( target.moduleName )
suite = getTestSuite()
suite = unittest.TestSuite( [
unittest.TestLoader().loadTestsFromTestCase( basetest.BaseTest ),
unittest.TestLoader().loadTestsFromTestCase( typeinfo.TypeInfoTest ),
unittest.TestLoader().loadTestsFromTestCase( regtest.CpuRegTest )
] )
unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( suite )
......@@ -150,6 +150,7 @@ private:
int field1;
Type5 *field2;
Type5 *field3[2];
Type5 **field4;
public:
......@@ -158,6 +159,8 @@ public:
field2 = new Type5;
field3[0] = new Type5;
field3[1] = new Type5;
field4 = &field2;
}
~Type6() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment