5
Last change
on this file since 98c6d50 was
98c6d50,
checked in by Chris Johns <chrisj@…>, on 10/19/17 at 05:39:16
|
testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured
with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
call to printk.
- Control the test's single init for functions and global data with
TEST_INIT and not CONFIGURE_INIT. They are now separate.
Updates #3170.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * Debugger test. |
---|
3 | * |
---|
4 | * Copyright (c) 2016 Chris Johns (chrisj@rtems.org) |
---|
5 | * |
---|
6 | * The license and distribution terms for this file may be |
---|
7 | * found in the file LICENSE in this distribution or at |
---|
8 | * http://www.rtems.org/license/LICENSE. |
---|
9 | */ |
---|
10 | |
---|
11 | #ifdef HAVE_CONFIG_H |
---|
12 | #include "config.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #define TEST_INIT |
---|
16 | |
---|
17 | #define CONFIGURE_INIT |
---|
18 | #include "system.h" |
---|
19 | |
---|
20 | #include "tmacros.h" |
---|
21 | |
---|
22 | #include <rtems/rtems-debugger.h> |
---|
23 | |
---|
24 | #include "system.h" |
---|
25 | |
---|
26 | static void test(void) |
---|
27 | { |
---|
28 | rtems_printer printer; |
---|
29 | |
---|
30 | rtems_print_printer_fprintf(&printer, stdout); |
---|
31 | rtems_test_assert(rtems_debugger_start("test", "something", |
---|
32 | 3, 10, &printer) < 0); |
---|
33 | rtems_test_assert(rtems_debugger_register_test_remote() == 0); |
---|
34 | rtems_test_assert(rtems_debugger_start("test", "something", |
---|
35 | 3, 10, &printer) == 0); |
---|
36 | rtems_debugger_set_verbose(true); |
---|
37 | rtems_test_assert(rtems_debugger_remote_debug(true) == 0); |
---|
38 | |
---|
39 | /* |
---|
40 | * This thread is suspended when the debugger is active until the debugger |
---|
41 | * disconnects. |
---|
42 | */ |
---|
43 | sleep(1); |
---|
44 | } |
---|
45 | |
---|
46 | const char rtems_test_name[] = "DEBUGGER01"; |
---|
47 | |
---|
48 | rtems_task Init(rtems_task_argument argument) |
---|
49 | { |
---|
50 | TEST_BEGIN(); |
---|
51 | |
---|
52 | test(); |
---|
53 | |
---|
54 | TEST_END(); |
---|
55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.