summaryrefslogtreecommitdiff
path: root/suite/generator.py
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-09-28 14:19:23 +0800
committerXusheng <xusheng@vector35.com>2022-04-29 11:21:47 +0800
commit87a8a04db5c0a80c06819ec6caf1568b7202cf51 (patch)
tree8850056e2ade5dd60262b20a76e035658136b965 /suite/generator.py
parentdbb5c9d47b3db0a478aab57b9ef43d0dd3f6d4b5 (diff)
Check in the debugger
Diffstat (limited to 'suite/generator.py')
-rwxr-xr-xsuite/generator.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/suite/generator.py b/suite/generator.py
index ca7b362f..0fbc6346 100755
--- a/suite/generator.py
+++ b/suite/generator.py
@@ -11,6 +11,7 @@ import time
os.environ["BN_DISABLE_USER_PLUGINS"] = "True"
os.environ["BN_DISABLE_USER_SETTINGS"] = "True"
os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True"
+os.environ["BN_EXPERIMENTAL_DEBUGGER"] = "True"
if sys.version_info.major == 2:
print("Generate unit tests on Python 3. Python 2 is not compatible.")
@@ -30,15 +31,22 @@ from collections import Counter
os.environ["BN_DISABLE_USER_PLUGINS"] = "True"
os.environ["BN_DISABLE_USER_SETTINGS"] = "True"
os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True"
+os.environ["BN_EXPERIMENTAL_DEBUGGER"] = "True"
api_suite_path = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), {4}))
sys.path.append(api_suite_path)
# support direct invocation of configuration unit.py
commondir = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", ".."))
sys.path.append(commondir)
+
+debugger_suite_path = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..",
+ "public", "debugger", "test"))
+sys.path.append(debugger_suite_path)
+
import config
import testcommon
import api_test
+import debugger_test
class TestBinaryNinja(unittest.TestCase):
@@ -148,6 +156,8 @@ def main():
config.verbose = True
elif sys.argv[i] == '--api-only':
config.api_only = True
+ elif sys.argv[i] == '--debugger-only':
+ config.debugger_only = True
else:
# otherwise the argument is taken as a test case search keyword
test_keyword = sys.argv[i]
@@ -155,6 +165,9 @@ def main():
if config.api_only:
runner = unittest.TextTestRunner(verbosity=2)
test_suite = unittest.defaultTestLoader.loadTestsFromModule(api_test)
+ elif config.debugger_only:
+ runner = unittest.TextTestRunner(verbosity=2)
+ test_suite = unittest.defaultTestLoader.loadTestsFromModule(debugger_test)
else:
runner = unittest.TextTestRunner(verbosity=2)
test_suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestBinaryNinja)