base: Add unit test for debug.hh
[gem5.git] / src / base / SConscript
1 # -*- mode:python -*-
2
3 # Copyright (c) 2006 The Regents of The University of Michigan
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met: redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer;
10 # redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution;
13 # neither the name of the copyright holders nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 Import('*')
30
31 SimObject('Graphics.py')
32 GTest('amo.test', 'amo.test.cc')
33 Source('atomicio.cc')
34 GTest('atomicio.test', 'atomicio.test.cc', 'atomicio.cc')
35 Source('bitfield.cc')
36 GTest('bitfield.test', 'bitfield.test.cc', 'bitfield.cc')
37 Source('imgwriter.cc')
38 Source('bmpwriter.cc')
39 Source('channel_addr.cc')
40 Source('cprintf.cc', add_tags='gtest lib')
41 GTest('cprintf.test', 'cprintf.test.cc')
42 Source('debug.cc')
43 GTest('debug.test', 'debug.test.cc', 'debug.cc')
44 if env['USE_FENV']:
45 Source('fenv.c')
46 if env['USE_PNG']:
47 Source('pngwriter.cc')
48 Source('fiber.cc')
49 GTest('fiber.test', 'fiber.test.cc', 'fiber.cc')
50 GTest('coroutine.test', 'coroutine.test.cc', 'fiber.cc')
51 Source('framebuffer.cc')
52 Source('hostinfo.cc')
53 Source('inet.cc')
54 Source('inifile.cc')
55 GTest('inifile.test', 'inifile.test.cc', 'inifile.cc', 'str.cc')
56 GTest('intmath.test', 'intmath.test.cc')
57 Source('logging.cc')
58 Source('match.cc')
59 GTest('match.test', 'match.test.cc', 'match.cc', 'str.cc')
60 Source('output.cc')
61 Source('pixel.cc')
62 GTest('pixel.test', 'pixel.test.cc', 'pixel.cc')
63 Source('pollevent.cc')
64 Source('random.cc')
65 if env['TARGET_ISA'] != 'null':
66 Source('remote_gdb.cc')
67 Source('socket.cc')
68 GTest('socket.test', 'socket.test.cc', 'socket.cc')
69 Source('statistics.cc')
70 Source('str.cc')
71 GTest('str.test', 'str.test.cc', 'str.cc')
72 Source('time.cc')
73 Source('version.cc')
74 Source('trace.cc')
75 GTest('trie.test', 'trie.test.cc')
76 Source('types.cc')
77 GTest('types.test', 'types.test.cc', 'types.cc')
78 GTest('uncontended_mutex.test', 'uncontended_mutex.test.cc')
79
80 Source('stats/group.cc')
81 Source('stats/text.cc')
82 if env['USE_HDF5']:
83 if main['GCC']:
84 Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated-copy'})
85 else:
86 Source('stats/hdf5.cc')
87
88 GTest('addr_range.test', 'addr_range.test.cc')
89 GTest('addr_range_map.test', 'addr_range_map.test.cc')
90 GTest('bitunion.test', 'bitunion.test.cc')
91 GTest('channel_addr.test', 'channel_addr.test.cc', 'channel_addr.cc')
92 GTest('circlebuf.test', 'circlebuf.test.cc')
93 GTest('circular_queue.test', 'circular_queue.test.cc')
94 GTest('sat_counter.test', 'sat_counter.test.cc')
95 GTest('refcnt.test','refcnt.test.cc')
96 GTest('condcodes.test', 'condcodes.test.cc')
97 GTest('chunk_generator.test', 'chunk_generator.test.cc')
98
99 DebugFlag('Annotate', "State machine annotation debugging")
100 DebugFlag('AnnotateQ', "State machine annotation queue debugging")
101 DebugFlag('AnnotateVerbose', "Dump all state machine annotation details")
102 DebugFlag('FmtFlag', "Show the --debug-flag that enabled each debug message")
103 DebugFlag('FmtStackTrace',
104 "Print a stack trace after every debug message")
105 DebugFlag('FmtTicksOff', "Don't show tick count on debug messages")
106 DebugFlag('GDBAcc', "Remote debugger accesses")
107 DebugFlag('GDBExtra', "Dump extra information on reads and writes")
108 DebugFlag('GDBMisc', "Breakpoints, traps, watchpoints, etc.")
109 DebugFlag('GDBRead', "Reads to the remote address space")
110 DebugFlag('GDBRecv', "Messages received from the remote application")
111 DebugFlag('GDBSend', "Messages sent to the remote application")
112 DebugFlag('GDBWrite', "Writes to the remote address space")
113 DebugFlag('SQL', "SQL queries sent to the server")
114 DebugFlag('Stats', "Statistics management")
115 DebugFlag('StatEvents', "Statistics event tracking")
116
117 CompoundFlag('GDBAll',
118 [ 'GDBMisc', 'GDBAcc', 'GDBRead', 'GDBWrite', 'GDBSend', 'GDBRecv',
119 'GDBExtra' ],
120 desc="All Remote debugging flags")
121 CompoundFlag('AnnotateAll', ['Annotate', 'AnnotateQ', 'AnnotateVerbose'],
122 desc="All Annotation flags")
123