forked from angr/angr-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_workflow.py
31 lines (23 loc) · 885 Bytes
/
test_workflow.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# pylint:disable=missing-class-docstring,wrong-import-order,no-self-use
from __future__ import annotations
import os
import sys
import threading
import unittest
import angr
from common import start_main_window_and_event_loop, test_location
class TestWorkflow(unittest.TestCase):
def setUp(self):
self.event = threading.Event()
_, self.main = start_main_window_and_event_loop(self.event)
def tearDown(self) -> None:
self.event.set()
del self.main
def test_workflow(self):
main = self.main
proj = angr.Project(os.path.join(test_location, "x86_64", "true"), auto_load_libs=False)
main.workspace.main_instance.project.am_obj = proj
main.workspace.main_instance.project.am_event()
main.workspace.main_instance.job_manager.join_all_jobs()
if __name__ == "__main__":
unittest.main(argv=sys.argv)