diff options
-rw-r--r-- | base/SConscript | 15 | ||||
-rw-r--r-- | build/SConscript.main | 23 | ||||
-rw-r--r-- | chrome/test/memory_test/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/plugin/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/reliability/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/selenium/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/startup/SConscript | 4 | ||||
-rw-r--r-- | chrome/test/tab_switching/SConscript | 4 | ||||
-rw-r--r-- | net/SConscript | 33 | ||||
-rw-r--r-- | net/tools/tld_cleanup/SConscript | 5 | ||||
-rw-r--r-- | sandbox/src/SConscript | 19 | ||||
-rw-r--r-- | webkit/SConscript.port | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 11 |
14 files changed, 51 insertions, 85 deletions
diff --git a/base/SConscript b/base/SConscript index 4b787631..f654d1f 100644 --- a/base/SConscript +++ b/base/SConscript @@ -256,10 +256,7 @@ test_files = [ if env['PLATFORM'] == 'win32': # These tests aren't really Windows-specific, they're just here until # we have the port versions working. - env_tests.ChromeTestProgram(['debug_message.exe', - 'debug_message.ilk', - 'debug_message.pdb'], - ['debug_message.cc']) + env_tests.ChromeTestProgram('debug_message', ['debug_message.cc']) test_files.extend([ 'clipboard_unittest.cc', @@ -295,8 +292,6 @@ if env['PLATFORM'] == 'win32': 'gfx/vector_canvas_unittest.cc', ]) -test_targets = [ 'base_unittests' ] - if env['PLATFORM'] == 'win32': # Windows-specific tests. test_files.extend([ @@ -306,14 +301,8 @@ if env['PLATFORM'] == 'win32': 'win_util_unittest.cc', 'wmi_util_unittest.cc', ]) - test_targets.extend([ - 'base_unittests.exp', - 'base_unittests.ilk', - 'base_unittests.lib', - 'base_unittests.pdb', - ]) -base_unittests = env_tests.ChromeTestProgram(test_targets, test_files) +base_unittests = env_tests.ChromeTestProgram('base_unittests', test_files) # Install up a level to allow unit test path assumptions to be valid. installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests) diff --git a/build/SConscript.main b/build/SConscript.main index a13762e..ac22314 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -103,11 +103,34 @@ env = Environment( LIBPATH = ['$LIBS_DIR'], ) +def AddPdbToTarget(args): + """Add the windows pdb file to the build target. + + Arguments: + args is a tuple passed to ChromeProgram or ChromeTestProgram + Returns: + A tuple to pass on to Environment.Program.""" + # Only add .pdb to the target if the target was only a string. We can't + # blindly add foo.pdb because chrome.exe and chrome.dll use chrome_exe.pdb + # and chrome_dll.pdb. + if not isinstance(args[0], str): + return args + + mutable_args = list(args) + mutable_args[0] = [args[0], args[0] + '.pdb'] + return tuple(mutable_args) + def ChromeProgram(env, *args, **kw): + if env['PLATFORM'] == 'win32': + # TODO(tc): We should handle kw['target'] too. + args = AddPdbToTarget(args) return env.Program(*args, **kw) env.AddMethod(ChromeProgram, "ChromeProgram") def ChromeTestProgram(env, *args, **kw): + if env['PLATFORM'] == 'win32': + # TODO(tc): We should handle kw['target'] too. + args = AddPdbToTarget(args) return env.Program(*args, **kw) env.AddMethod(ChromeTestProgram, "ChromeTestProgram") diff --git a/chrome/test/memory_test/SConscript b/chrome/test/memory_test/SConscript index f3cf77c..9600fed 100644 --- a/chrome/test/memory_test/SConscript +++ b/chrome/test/memory_test/SConscript @@ -90,9 +90,7 @@ input_files = [ 'memory_test.cc', ] -exe = env_test.ChromeTestProgram(['memory_test', - 'memory_test.pdb'], - input_files) +exe = env_test.ChromeTestProgram('memory_test', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/mini_installer_test/SConscript b/chrome/test/mini_installer_test/SConscript index 40f1032..6678a4f 100644 --- a/chrome/test/mini_installer_test/SConscript +++ b/chrome/test/mini_installer_test/SConscript @@ -82,9 +82,7 @@ input_files = [ 'test.cc', ] -exe = env_test.ChromeTestProgram(['mini_installer_test', - 'mini_installer_test.pdb'], - input_files) +exe = env_test.ChromeTestProgram('mini_installer_test', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/plugin/SConscript b/chrome/test/plugin/SConscript index 74973b0..d66450e 100644 --- a/chrome/test/plugin/SConscript +++ b/chrome/test/plugin/SConscript @@ -102,9 +102,7 @@ input_files = [ ] -exe = env_test.ChromeTestProgram(['plugin_tests', - 'plugin_tests.pdb'], - input_files) +exe = env_test.ChromeTestProgram('plugin_tests', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/reliability/SConscript b/chrome/test/reliability/SConscript index 7ad6b99..a7bf920 100644 --- a/chrome/test/reliability/SConscript +++ b/chrome/test/reliability/SConscript @@ -96,9 +96,7 @@ input_files = [ 'run_all_unittests.cc', ] -exe = env_test.ChromeTestProgram(['reliability_tests', - 'reliability_tests.pdb'], - input_files) +exe = env_test.ChromeTestProgram('reliability_tests', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/selenium/SConscript b/chrome/test/selenium/SConscript index 92100a7..9e3912f 100644 --- a/chrome/test/selenium/SConscript +++ b/chrome/test/selenium/SConscript @@ -94,9 +94,7 @@ input_files = [ 'selenium_test.cc', ] -exe = env_test.ChromeTestProgram(['selenium_tests', - 'selenium_tests.pdb'], - input_files) +exe = env_test.ChromeTestProgram('selenium_tests', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/startup/SConscript b/chrome/test/startup/SConscript index b0cc678..36b4465 100644 --- a/chrome/test/startup/SConscript +++ b/chrome/test/startup/SConscript @@ -93,9 +93,7 @@ input_files = [ 'startup_test.cc', ] -exe = env_test.ChromeTestProgram(['startup_tests', - 'startup_tests.pdb'], - input_files) +exe = env_test.ChromeTestProgram('startup_tests', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/chrome/test/tab_switching/SConscript b/chrome/test/tab_switching/SConscript index 4f82fa0..d659171 100644 --- a/chrome/test/tab_switching/SConscript +++ b/chrome/test/tab_switching/SConscript @@ -97,9 +97,7 @@ input_files = [ #"..\..\Debug\obj\tab_switching_test\precompiled_wtl.obj" -exe = env_test.ChromeTestProgram(['tab_switching_test', - 'tab_switching_test.pdb'], - input_files) +exe = env_test.ChromeTestProgram('tab_switching_test', input_files) i = env_test.Install('$TARGET_ROOT', exe) env_test.Alias('chrome', i) diff --git a/net/SConscript b/net/SConscript index c8410d4..a66dbb59 100644 --- a/net/SConscript +++ b/net/SConscript @@ -255,43 +255,32 @@ unittest_files = [ '$BASE_DIR/run_all_unittests.obj', ] -net_unittests = env_tests.ChromeTestProgram( - ['net_unittests.exe', - 'net_unittests.ilk', - 'net_unittests.pdb'], - unittest_files -) +net_unittests = env_tests.ChromeTestProgram('net_unittests', unittest_files) stress_cache = env_tests.ChromeTestProgram( - ['stress_cache.exe', - 'stress_cache.ilk', - 'stress_cache.pdb'], + 'stress_cache', ['disk_cache/stress_cache.cc', - 'disk_cache/disk_cache_test_util.cc'] + 'disk_cache/disk_cache_test_util.cc'] ) crash_cache = env_tests.ChromeTestProgram( - ['crash_cache.exe', - 'crash_cache.ilk', - 'crash_cache.pdb'], + 'crash_cache', ['tools/crash_cache/crash_cache.cc', - 'disk_cache/disk_cache_test_util.cc'] + 'disk_cache/disk_cache_test_util.cc'] ) net_perftests = env_tests.ChromeTestProgram( - ['net_perftests.exe', - 'net_perftests.ilk', - 'net_perftests.pdb'], + 'net_perftests', ['disk_cache/disk_cache_test_util.cc', - 'disk_cache/disk_cache_perftest.cc', - 'base/cookie_monster_perftest.cc', - # TODO(sgk): avoid using .cc from base directly - '$BASE_DIR/run_all_perftests$OBJSUFFIX', - '$BASE_DIR/perftimer$OBJSUFFIX'] + 'disk_cache/disk_cache_perftest.cc', + 'base/cookie_monster_perftest.cc', + # TODO(sgk): avoid using .cc from base directly + '$BASE_DIR/run_all_perftests$OBJSUFFIX', + '$BASE_DIR/perftimer$OBJSUFFIX'] ) diff --git a/net/tools/tld_cleanup/SConscript b/net/tools/tld_cleanup/SConscript index 9ea10462..597d752 100644 --- a/net/tools/tld_cleanup/SConscript +++ b/net/tools/tld_cleanup/SConscript @@ -69,10 +69,7 @@ input_files = [ 'tld_cleanup.cc', ] -exe_targets = env.ChromeProgram(['tld_cleanup', - 'tld_cleanup.ilk', - 'tld_cleanup.pdb'], - input_files) +exe_targets = env.ChromeProgram('tld_cleanup', input_files) i = env.Install('$TARGET_ROOT', exe_targets) env.Alias('net', i) diff --git a/sandbox/src/SConscript b/sandbox/src/SConscript index e327c2d..fe625a2 100644 --- a/sandbox/src/SConscript +++ b/sandbox/src/SConscript @@ -194,13 +194,10 @@ env_unit_tests.Append(CCPCHFLAGS = ['/FIstdafx.h']) unit_tests = env_unit_tests.ChromeTestProgram( - ['../sbox_unittests.exe', - '../sbox_unittests.ilk', - '../sbox_unittests.pdb'], + 'sbox_unittests', unit_test_files, ) - # Integration Tests env_integration_tests = env_tests.Clone() @@ -238,11 +235,7 @@ env_integration_tests['PCHSTOP'] = 'stdafx.h' env_integration_tests.Append(CCPCHFLAGS = ['/FIstdafx.h']) integration_tests = env_integration_tests.ChromeTestProgram( - ['../sbox_integration_tests.exe', - '../sbox_integration_tests.ilk', - '../sbox_integration_tests.lib', - '../sbox_integration_tests.exp', - '../sbox_integration_tests.pdb'], + 'sbox_integration_tests', integration_test_files, ) @@ -277,11 +270,7 @@ env_validation_tests['PCHSTOP'] = 'stdafx.h' env_validation_tests.Append(CCPCHFLAGS = ['/FIstdafx.h']) validation_tests = env_validation_tests.ChromeTestProgram( - ['../sbox_validation_tests.exe', - '../sbox_validation_tests.ilk', - '../sbox_validation_tests.lib', - '../sbox_validation_tests.exp', - '../sbox_validation_tests.pdb'], + 'sbox_validation_tests', validation_test_files, ) @@ -293,5 +282,3 @@ installed_tests = env.Install('$OBJ_ROOT', # Setup alias for sandbox related targets. env.Alias('sandbox', ['.', installed_tests]) - - diff --git a/webkit/SConscript.port b/webkit/SConscript.port index 204587e2..afe37a9 100644 --- a/webkit/SConscript.port +++ b/webkit/SConscript.port @@ -133,4 +133,4 @@ input_files = [ '$PORT_DIR/page/DragControllerWin.cpp', ] -env.ChromeStaticLibrary("Port.lib", input_files) +env.ChromeStaticLibrary("port", input_files) diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index fcb8528..874f38c 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -140,10 +140,7 @@ exe_input_files = [ '$V8_DIR/snapshot-empty$OBJSUFFIX' ] -test_shell = env.ChromeProgram(['test_shell.exe', - 'test_shell.ilk', - 'test_shell.pdb'], - resources + exe_input_files) +test_shell = env.ChromeProgram('test_shell', resources + exe_input_files) i = env.Install('$TARGET_ROOT', test_shell) env.Alias('webkit', i) @@ -203,9 +200,7 @@ test_files = [ '$V8_DIR/snapshot-empty$OBJSUFFIX', ] -test_shell_tests = env.ChromeTestProgram(['test_shell_tests', - 'test_shell_tests.ilk', - 'test_shell_tests.pdb'], - resources + test_files) +test_shell_tests = env.ChromeTestProgram('test_shell_tests', + resources + test_files) i = env.Install('$TARGET_ROOT', test_shell_tests) env.Alias('webkit', i) |