mirror of https://gitlab.com/cppit/jucipp
6 changed files with 60 additions and 3 deletions
@ -0,0 +1,27 @@ |
|||||||
|
#include "test_suite.h" |
||||||
|
#include <iostream> |
||||||
|
|
||||||
|
int main() { |
||||||
|
auto &config = Config::get(); |
||||||
|
config.project.ctags_command = "ctags"; |
||||||
|
auto suite_name = "Debug_lldb_tests"; |
||||||
|
{ |
||||||
|
auto doTest = [&](auto test) { |
||||||
|
auto test_suite = suite(suite_name); |
||||||
|
auto build_path = test_suite.build_file_path / "tests" / "lldb_test_files" / "lldb_test_executable"; |
||||||
|
{ |
||||||
|
auto module = py::module::import("debug_lldb_test"); |
||||||
|
test_suite.has_assertion = false; |
||||||
|
try { |
||||||
|
module.attr(test)(build_path.c_str()); |
||||||
|
test_suite.has_assertion = true; |
||||||
|
} |
||||||
|
catch(const std::exception &error) { |
||||||
|
std::cout << error.what(); |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
doTest("start_on_exit"); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
from Jucipp import LLDB |
||||||
|
from time import sleep |
||||||
|
from jucipp_test import assert_equal |
||||||
|
|
||||||
|
|
||||||
|
exited = False |
||||||
|
|
||||||
|
def on_exit(exit_code): |
||||||
|
assert_equal(0, exit_code) |
||||||
|
global exited |
||||||
|
exited = True |
||||||
|
|
||||||
|
def start_on_exit(exec_path): |
||||||
|
print(exec_path) |
||||||
|
l = LLDB() |
||||||
|
l.on_exit = [on_exit] |
||||||
|
l.start(exec_path, "", []) |
||||||
|
|
||||||
|
while not exited: |
||||||
|
sleep(0.1) |
||||||
|
l.cancel() |
||||||
Loading…
Reference in new issue