diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 19:48:25 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 19:48:25 +0000 |
commit | 2516153bbd24a2d630fe04176c8d3190744e6246 (patch) | |
tree | ca3c928b9266d80a19aaab8c57cd5a5cc4c1b049 | |
parent | 89ac46c97e6a3b2f2726bd11d52824d27ee26a24 (diff) | |
download | chromium_src-2516153bbd24a2d630fe04176c8d3190744e6246.zip chromium_src-2516153bbd24a2d630fe04176c8d3190744e6246.tar.gz chromium_src-2516153bbd24a2d630fe04176c8d3190744e6246.tar.bz2 |
Make better (and more efficient) use of Hammer functionality
in base, net and sandbox:
* Remove by-hand Install() and Alias() calls.
* Set $COMPONENT_PROGRAM_GROUPS and $COMPONENT_TEST_PROGRAM_GROUPS
(with in each foo\foo.scons file) so executables get added
automatically to the appropriate Alias.
* Set $TESTS_DIR and $STAGING_DIR so executables get linked
directly in their final resting place ($TARGET_ROOT).
Review URL: http://codereview.chromium.org/9188
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4805 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.scons | 6 | ||||
-rw-r--r-- | base/base_lib.scons | 3 | ||||
-rw-r--r-- | base/base_unittests.scons | 7 | ||||
-rw-r--r-- | build/SConscript.main | 13 | ||||
-rw-r--r-- | build/googleurl.scons | 2 | ||||
-rw-r--r-- | net/crash_cache.scons | 6 | ||||
-rw-r--r-- | net/net.scons | 8 | ||||
-rw-r--r-- | net/net_perftests.scons | 6 | ||||
-rw-r--r-- | net/net_resources.scons | 4 | ||||
-rw-r--r-- | net/net_unittests.scons | 6 | ||||
-rw-r--r-- | net/stress_cache.scons | 6 | ||||
-rw-r--r-- | net/tools/tld_cleanup/tld_cleanup.scons | 4 | ||||
-rw-r--r-- | sandbox/sandbox.scons | 9 |
13 files changed, 37 insertions, 43 deletions
diff --git a/base/base.scons b/base/base.scons index 66bfc83..bd0d193 100644 --- a/base/base.scons +++ b/base/base.scons @@ -8,6 +8,12 @@ Master configuration for building base components (including base_gfx). Import('env') +# Arrange for Hammer to add all programs to the 'base' Alias. +env.Append( + COMPONENT_PROGRAM_GROUPS = ['base'], + COMPONENT_TEST_PROGRAM_GROUPS = ['base'], +) + sconscript_files = [ 'base_lib.scons', 'base_unittests.scons', diff --git a/base/base_lib.scons b/base/base_lib.scons index 70572c2..89d0d6e 100644 --- a/base/base_lib.scons +++ b/base/base_lib.scons @@ -192,5 +192,4 @@ if env['PLATFORM'] == 'posix': 'worker_pool.cc', ]) -base_lib = env.ChromeStaticLibrary('base', input_files) -env.Alias('base', base_lib) +env.ChromeStaticLibrary('base', input_files) diff --git a/base/base_unittests.scons b/base/base_unittests.scons index a57240e..aedad49 100644 --- a/base/base_unittests.scons +++ b/base/base_unittests.scons @@ -172,12 +172,7 @@ if env['PLATFORM'] == 'darwin': 'platform_test_mac.mm', ]) -base_unittests = env.ChromeTestProgram('base_unittests', input_files) - -# Install up a level to allow unit test path assumptions to be valid. -installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests) - -env.Alias('base', installed_base_unittests) +env.ChromeTestProgram('base_unittests', input_files) # TODO(sgk) should this be moved into base.lib like everything else? This will # require updating a bunch of other SConscripts which link directly against diff --git a/build/SConscript.main b/build/SConscript.main index 5618396..49cd36a 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -28,12 +28,25 @@ else: root_env = Environment( tools = ['component_setup'], + CHROME_SRC_DIR = '$MAIN_DIR/..', DESTINATION_ROOT = '$MAIN_DIR/Hammer', TARGET_ROOT = '$DESTINATION_ROOT', + # Where ComponentTestProgram() will build test executables. + TESTS_DIR = '$TARGET_ROOT', + + # Where ComponentProgram() will build program executables. + STAGING_DIR = '$TARGET_ROOT', + + # Where ComponentLibrary() will build libraries. LIBS_DIR = '$COMPONENT_LIBRARY_DIR', + # TODO(hammer): when Hammer supports this... + # Have Hammer prefix all Library aliases with lib_ (to avoid + # collisions with the component names themselves). + #COMPONENT_LIBRARY_ALIAS = 'lib_$LIBNAME', + # Disable running of tests thru scons for now. COMPONENT_TEST_CMDLINE = '', diff --git a/build/googleurl.scons b/build/googleurl.scons index fffb4fd..6151fde 100644 --- a/build/googleurl.scons +++ b/build/googleurl.scons @@ -14,5 +14,3 @@ sconscript_files = [ ] SConscript(sconscript_files, exports=['env']) - -env.Alias('base', '.') diff --git a/net/crash_cache.scons b/net/crash_cache.scons index 812f30c..4fc90ca 100644 --- a/net/crash_cache.scons +++ b/net/crash_cache.scons @@ -57,8 +57,4 @@ input_files = [ if env['PLATFORM'] in ('posix', 'win32'): - crash_cache = env.ChromeTestProgram('crash_cache', input_files) - - installed_test = env.Install('$TARGET_ROOT', crash_cache) - - env.Alias('net', installed_test) + env.ChromeTestProgram('crash_cache', input_files) diff --git a/net/net.scons b/net/net.scons index 04a23154..d70222fe 100644 --- a/net/net.scons +++ b/net/net.scons @@ -8,6 +8,12 @@ Master configuration for building net components. Import('env') +# Arrange for Hammer to add all programs to the 'net' Alias. +env.Append( + COMPONENT_PROGRAM_GROUPS = ['net'], + COMPONENT_TEST_PROGRAM_GROUPS = ['net'], +) + sconscript_files = [ 'crash_cache.scons', 'net_lib.scons', @@ -35,5 +41,3 @@ if env['PLATFORM'] == 'win32': ]) SConscript(sconscript_files, exports=['env']) - -env.Alias('net', '.') diff --git a/net/net_perftests.scons b/net/net_perftests.scons index 506d85e..4b19970 100644 --- a/net/net_perftests.scons +++ b/net/net_perftests.scons @@ -69,8 +69,4 @@ input_files = [ if env['PLATFORM'] in ('posix', 'win32'): - net_perftests = env.ChromeTestProgram('net_perftests', input_files) - - installed_test = env.Install('$TARGET_ROOT', net_perftests) - - env.Alias('net', installed_test) + env.ChromeTestProgram('net_perftests', input_files) diff --git a/net/net_resources.scons b/net/net_resources.scons index aebf0d2..3b25ce2 100644 --- a/net/net_resources.scons +++ b/net/net_resources.scons @@ -36,6 +36,4 @@ rc = env.Command('net_resources.rc', env.Depends(rc, tld_names_clean) -net_resources = env.RES(rc) - -env.Alias('net', net_resources) +env.RES(rc) diff --git a/net/net_unittests.scons b/net/net_unittests.scons index 4b845ca..3966f70 100644 --- a/net/net_unittests.scons +++ b/net/net_unittests.scons @@ -129,8 +129,4 @@ if env['PLATFORM'] in ('darwin', 'posix'): 'base/ssl_client_socket_unittest.cc', ]) -net_unittests = env.ChromeTestProgram('net_unittests', input_files) - -installed_test = env.Install('$TARGET_ROOT', net_unittests) - -env.Alias('net', installed_test) +env.ChromeTestProgram('net_unittests', input_files) diff --git a/net/stress_cache.scons b/net/stress_cache.scons index f0d706e..83d976b6 100644 --- a/net/stress_cache.scons +++ b/net/stress_cache.scons @@ -55,8 +55,4 @@ input_files = [ ] if env['PLATFORM'] == 'win32': - stress_cache = env.ChromeTestProgram('stress_cache', input_files) - - installed_test = env.Install('$TARGET_ROOT', stress_cache) - - env.Alias('net', installed_test) + env.ChromeTestProgram('stress_cache', input_files) diff --git a/net/tools/tld_cleanup/tld_cleanup.scons b/net/tools/tld_cleanup/tld_cleanup.scons index ad743c6..a8380c2 100644 --- a/net/tools/tld_cleanup/tld_cleanup.scons +++ b/net/tools/tld_cleanup/tld_cleanup.scons @@ -49,6 +49,4 @@ input_files = [ 'tld_cleanup.cc', ] -tld_cleanup = env.ChromeProgram('tld_cleanup', input_files) -i = env.Install('$TARGET_ROOT', tld_cleanup) -env.Alias('net', i) +env.ChromeProgram('tld_cleanup', input_files) diff --git a/sandbox/sandbox.scons b/sandbox/sandbox.scons index 566d7e5..039a883 100644 --- a/sandbox/sandbox.scons +++ b/sandbox/sandbox.scons @@ -8,11 +8,10 @@ Master configuration for building base components (including base_gfx). Import('env') -env = env.Clone( - #TESTS_DIR = '../tests', - #INTEGRATION_TESTS_DIR = '$TESTS_DIR/integration_tests', - #UNIT_TESTS_DIR = '$TESTS_DIR/unit_tests', - #VALIDATION_TESTS_DIR = '$TESTS_DIR/validation_tests', +# Arrange for Hammer to add all programs to the 'sandbox' Alias. +env.Append( + COMPONENT_PROGRAM_GROUPS = ['sandbox'], + COMPONENT_TEST_PROGRAM_GROUPS = ['sandbox'], ) sconscript_files = [ |