Skip to content

Commit ecb3a32

Browse files
committed
Changes to testing programs to provide better test cases
1 parent 7ca1a61 commit ecb3a32

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

programs/zmq/dbg_stepper.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ def update_debug_state(msg):
2525
data = json.loads(msg[0].decode('utf-8'))
2626
print(json.dumps(data, indent=4))
2727
print(data['dbg_state'])
28-
#if data['dbg_state'] == 'stopped':
29-
#s.send_string('{"command":"next"}')
28+
if data['dbg_state'] == 'stopped':
29+
s.send_string('{"command":"run","ms":4000}')
30+
# s.send_string('{"command":"next"}')
3031

3132
stream.on_recv(update_debug_state)
3233

programs/zmq/dbg_target.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ int sigint_handler(int signum, void *arg)
4444

4545
int poke_cb(void *arg)
4646
{
47+
printf("Poke\n");
4748
return EVENT_KEEP;
4849
}
4950

@@ -52,9 +53,10 @@ int main(int argc, char *argv[])
5253
gProc = PROC_init("test1", WD_DISABLED);
5354

5455
// Add a signal handler call back for SIGINT signal
56+
DBG_setLevel(DBG_LEVEL_ALL);
5557
PROC_signal(gProc, SIGINT, &sigint_handler, gProc);
5658
EVT_sched_add(PROC_evt(gProc), EVT_ms2tv(2000), poke_cb, NULL);
57-
EVT_set_initial_debugger_state(PROC_evt(gProc), EDBG_STOPPED);
59+
// EVT_set_initial_debugger_state(PROC_evt(gProc), EDBG_STOPPED);
5860

5961
EVT_start_loop(PROC_evt(gProc));
6062

0 commit comments

Comments
 (0)