5
Last change
on this file since 6fe01e4b was
6fe01e4b,
checked in by Sebastian Huber <sebastian.huber@…>, on 01/14/19 at 08:08:18
|
build: Move test support to librtemstest.a
One reason to move the test support into a dedicated library are the
standard output wrap_*() functions. They may conflict with
application level wrappers.
Update #3199.
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/test.h> |
---|
20 | #include <rtems/profiling.h> |
---|
21 | #include <rtems/bspIo.h> |
---|
22 | |
---|
23 | #if defined(RTEMS_PROFILING) |
---|
24 | static bool report_done; |
---|
25 | |
---|
26 | RTEMS_INTERRUPT_LOCK_DEFINE( static, report_lock, "test report" ) |
---|
27 | #endif |
---|
28 | |
---|
29 | void rtems_test_fatal_extension( |
---|
30 | rtems_fatal_source source, |
---|
31 | bool always_set_to_false, |
---|
32 | rtems_fatal_code code |
---|
33 | ) |
---|
34 | { |
---|
35 | #if defined(RTEMS_PROFILING) |
---|
36 | rtems_interrupt_lock_context lock_context; |
---|
37 | rtems_printer printer; |
---|
38 | |
---|
39 | rtems_print_printer_printk( &printer ); |
---|
40 | |
---|
41 | /* |
---|
42 | * Ensures to report only once on SMP machines and ensures that the report is |
---|
43 | * output completely. |
---|
44 | */ |
---|
45 | rtems_interrupt_lock_acquire( &report_lock, &lock_context ); |
---|
46 | |
---|
47 | if ( !report_done ) { |
---|
48 | report_done = true; |
---|
49 | |
---|
50 | printk( |
---|
51 | "\n*** PROFILING REPORT BEGIN %s ***\n", |
---|
52 | rtems_test_name |
---|
53 | ); |
---|
54 | |
---|
55 | rtems_profiling_report_xml( |
---|
56 | rtems_test_name, |
---|
57 | &printer, |
---|
58 | 1, |
---|
59 | " " |
---|
60 | ); |
---|
61 | |
---|
62 | printk( |
---|
63 | "*** PROFILING REPORT END %s ***\n", |
---|
64 | rtems_test_name |
---|
65 | ); |
---|
66 | } |
---|
67 | |
---|
68 | rtems_interrupt_lock_release( &report_lock, &lock_context ); |
---|
69 | #endif |
---|
70 | |
---|
71 | (void) source; |
---|
72 | (void) always_set_to_false; |
---|
73 | (void) code; |
---|
74 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.