| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 import re | 6 import re |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 def GlibMarshalEmitter(target, source, env): | 9 def GlibMarshalEmitter(target, source, env): |
| 10 """ Inputs: | 10 """ Inputs: |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 base_env.Append(CPPPATH=Split('. ..')) | 71 base_env.Append(CPPPATH=Split('. ..')) |
| 72 base_env.Append(CCFLAGS=Split('-ggdb -fPIC -fno-exceptions -Wall -Werror')) | 72 base_env.Append(CCFLAGS=Split('-ggdb -fPIC -fno-exceptions -Wall -Werror')) |
| 73 base_env.Append(LINKFLAGS=Split('-fPIC')) | 73 base_env.Append(LINKFLAGS=Split('-fPIC')) |
| 74 | 74 |
| 75 SOURCES=['chromeos_cryptohome.cc', | 75 SOURCES=['chromeos_cryptohome.cc', |
| 76 'chromeos_imageburn.cc', | 76 'chromeos_imageburn.cc', |
| 77 'chromeos_input_method.cc', | 77 'chromeos_input_method.cc', |
| 78 'chromeos_input_method_ui.cc', | 78 'chromeos_input_method_ui.cc', |
| 79 'chromeos_keyboard.cc', | 79 'chromeos_keyboard.cc', |
| 80 'chromeos_login.cc', | 80 'chromeos_login.cc', |
| 81 'chromeos_login_helpers.cc', |
| 81 'chromeos_mount.cc', | 82 'chromeos_mount.cc', |
| 82 'chromeos_network.cc', | 83 'chromeos_network.cc', |
| 83 'chromeos_power.cc', | 84 'chromeos_power.cc', |
| 84 'chromeos_screen_lock.cc', | 85 'chromeos_screen_lock.cc', |
| 85 'chromeos_speech_synthesis.cc', | 86 'chromeos_speech_synthesis.cc', |
| 86 'chromeos_synaptics.cc', | 87 'chromeos_synaptics.cc', |
| 87 'chromeos_syslogs.cc', | 88 'chromeos_syslogs.cc', |
| 88 'chromeos_system.cc', | 89 'chromeos_system.cc', |
| 89 'chromeos_touchpad.cc', | 90 'chromeos_touchpad.cc', |
| 90 'chromeos_update.cc', | 91 'chromeos_update.cc', |
| (...skipping 27 matching lines...) Expand all Loading... |
| 118 ime_whitelist_file) | 119 ime_whitelist_file) |
| 119 | 120 |
| 120 # test_libbase_ndebug is built to catch NDEBUG mismatches between this | 121 # test_libbase_ndebug is built to catch NDEBUG mismatches between this |
| 121 # library and libbase. It is not installed. | 122 # library and libbase. It is not installed. |
| 122 Default(env.SharedLibrary('cros', SOURCES), | 123 Default(env.SharedLibrary('cros', SOURCES), |
| 123 env.Program('test_libbase_ndebug', 'test_libbase_ndebug.cc')) | 124 env.Program('test_libbase_ndebug', 'test_libbase_ndebug.cc')) |
| 124 | 125 |
| 125 env_test = base_env.Clone() | 126 env_test = base_env.Clone() |
| 126 env_test.Append(LIBS=['base', 'dl', 'rt', 'nss3']) | 127 env_test.Append(LIBS=['base', 'dl', 'rt', 'nss3']) |
| 127 | 128 |
| 128 env_test.ParseConfig('%s --cflags --libs gobject-2.0 dbus-1 nss' % ( | 129 env_test.ParseConfig('%s --cflags --libs gobject-2.0 dbus-glib-1 dbus-1 nss' % ( |
| 129 env_test['ENV']['PKG_CONFIG'])) | 130 env_test['ENV']['PKG_CONFIG'])) |
| 130 env_test.Append(CCFLAGS=['-DOS_CHROMEOS']) | 131 env_test.Append(CCFLAGS=['-DOS_CHROMEOS']) |
| 131 | 132 |
| 132 env_gtest = env_test.Clone() | 133 env_gtest = env_test.Clone() |
| 133 env_gtest.Append(LIBS=['gtest']) | 134 env_gtest.Append(LIBS=['gtest']) |
| 134 | 135 |
| 135 env_gtest_main = env_test.Clone() | 136 env_gtest_main = env_test.Clone() |
| 136 env_gtest_main.Append(LIBS=['gtest', 'gtest_main', 'chromeos']) | 137 env_gtest_main.Append(LIBS=['gtest', 'gtest_main', 'chromeos']) |
| 137 env_gtest_main.ParseConfig('%s --cflags --libs libpcrecpp libxklavier' % ( | 138 env_gtest_main.ParseConfig('%s --cflags --libs libpcrecpp libxklavier' % ( |
| 138 env_test['ENV']['PKG_CONFIG'])) | 139 env_test['ENV']['PKG_CONFIG'])) |
| 139 | 140 |
| 140 env_network_monitor = env_test.Clone() | 141 env_network_monitor = env_test.Clone() |
| 141 env_network_monitor.Append(LIBS=['dbus-glib-1']) | 142 env_network_monitor.Append(LIBS=['dbus-glib-1']) |
| 142 | 143 |
| 143 Load = base_env.Object('load.cc') | 144 Load = base_env.Object('load.cc') |
| 144 | 145 |
| 145 # Tests that do not require libcros.so. The ebuild script for libcros | 146 # Tests that do not require libcros.so. The ebuild script for libcros |
| 146 # automatically builds and runs the tests (libcros_unittests) if FEATURES="test" | 147 # automatically builds and runs the tests (libcros_unittests) if FEATURES="test" |
| 147 # is set. | 148 # is set. |
| 148 unittests = [ | 149 unittests = [ |
| 149 env_gtest_main.Program('libcros_unittests', | 150 env_gtest_main.Program('libcros_unittests', |
| 150 ['chromeos_keyboard.cc', | 151 ['chromeos_keyboard.cc', |
| 151 'chromeos_keyboard_unittest.cc', | 152 'chromeos_keyboard_unittest.cc', |
| 153 'chromeos_login.cc', |
| 154 'chromeos_login_helpers.cc', |
| 155 'chromeos_login_unittest.cc', |
| 152 'chromeos_system.cc', | 156 'chromeos_system.cc', |
| 153 'chromeos_system_unittest.cc']), | 157 'chromeos_system_unittest.cc']), |
| 154 ] | 158 ] |
| 155 unittest_alias = Alias('unittest', unittests) | 159 unittest_alias = Alias('unittest', unittests) |
| 156 AlwaysBuild(unittest_alias) | 160 AlwaysBuild(unittest_alias) |
| 157 | 161 |
| 158 # Tests that do require libcros.so. | 162 # Tests that do require libcros.so. |
| 159 tests = [ | 163 tests = [ |
| 160 env_test.Program('monitor_power', ['monitor_power.cc', Load]), | 164 env_test.Program('monitor_power', ['monitor_power.cc', Load]), |
| 161 # This doesn't compile: | 165 # This doesn't compile: |
| 162 # env_gtest.Program('monitor_input_method', | 166 # env_gtest.Program('monitor_input_method', |
| 163 # ['monitor_input_method.cc', Load]), | 167 # ['monitor_input_method.cc', Load]), |
| 164 env_gtest.Program('monitor_keyboard', ['monitor_keyboard.cc', Load]), | 168 env_gtest.Program('monitor_keyboard', ['monitor_keyboard.cc', Load]), |
| 165 env_network_monitor.Program('monitor_network', ['monitor_network.cc', Load]), | 169 env_network_monitor.Program('monitor_network', ['monitor_network.cc', Load]), |
| 166 env_test.Program('monitor_mount', ['monitor_mount.cc', Load]), | 170 env_test.Program('monitor_mount', ['monitor_mount.cc', Load]), |
| 167 env_test.Program('monitor_input_method_ui', | 171 env_test.Program('monitor_input_method_ui', |
| 168 ['monitor_input_method_ui.cc', Load]), | 172 ['monitor_input_method_ui.cc', Load]), |
| 169 env_test.Program('login_drive', ['drive_login.cc', Load]), | 173 env_test.Program('login_drive', ['drive_login.cc', Load]), |
| 170 env_test.Program('monitor_update_engine', ['monitor_update_engine.cc', Load]), | 174 env_test.Program('monitor_update_engine', ['monitor_update_engine.cc', Load]), |
| 171 env_test.Program('cryptohome_drive', ['drive_cryptohome.cc', Load]) | 175 env_test.Program('cryptohome_drive', ['drive_cryptohome.cc', Load]) |
| 172 ] | 176 ] |
| 173 test_alias = Alias('test', tests) | 177 test_alias = Alias('test', tests) |
| 174 AlwaysBuild(test_alias) | 178 AlwaysBuild(test_alias) |
| 175 | 179 |
| 176 Alias('crosapi', base_env.StaticLibrary('crosapi', Load), CCFLAGS='-ggdb') | 180 Alias('crosapi', base_env.StaticLibrary('crosapi', Load), CCFLAGS='-ggdb') |
| OLD | NEW |