diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-24 03:20:00 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-24 03:20:00 +0000 |
commit | 08856366bb615a28da956cd02d8ad749090916ab (patch) | |
tree | a98b73e2e8c7e2088ca5d1798ac823bf8fbbaca0 /base/base_unittests.scons | |
parent | 6160649ec727ba64ff2e959b3a9f054f67b834d0 (diff) | |
download | chromium_src-08856366bb615a28da956cd02d8ad749090916ab.zip chromium_src-08856366bb615a28da956cd02d8ad749090916ab.tar.gz chromium_src-08856366bb615a28da956cd02d8ad749090916ab.tar.bz2 |
Initial subset of .vcproj file generation, covering generation of:
base\build\base.vcproj
base\build\base_gfx.vcproj
base\build\base_unittests.vcproj
base\build\debug_message.vcproj
skia\skia.vcproj
testing\gtest.vcproj
third_party\icu38\icu.vcproj
third_party\icu38\icudt.vcproj
third_party\libpng\libpng.vcproj
third_party\zlib\zlib.vcproj
Supporting work in *.scons files:
* Adds .h files to the input_files lists in the various *.scons files.
* Add arguments to ChromeMSVSProject() to actually generate the
.vcproj files.
* Add MSVS.AddConfig() calls to the *.scons files to preserve the
.vsprops inclusion in the generated .vcproj files.
(These will go away eventually as we migrate away from .vsprops
in favor of using the settings from the SCons configuration.)
* Add MSVS.AddConfig() calls to preserve the .vsprops inclusion.
* Move the special generation of dmg_fp/*.cc files ahead of the
input file list so we can list the generated object files.
* Change the 'solutions' Alias to 'msvs' so we don't mislead about
what will actually be generated.
Updates to the new _Node_MSVS.py module with latest from upstream
prototype development:
* Support configurability of:
* buildtarget (used to generat project name)
* RootNamespace
* relative_path_prefix (to prepend './')
* tools (to avoid repetition in the project configs)
* Track the Visual Studio hierarchy in SCons Nodes, not DOM,
so we can delay evaluation until after the complete
configuration has been specified.
* Add a FileList base class for the things that need, with a
subclass hierarchy for the different concrete things in our tree,
and a FileListWalk() function for traversing hierarchies.
* Centralize turning strings into Nodes in the args2nodes() method
and have AddFiles() just use it.
Updates to chromium_builders.py to support all this
* Add knowledge about stripping out noncompilable files
(.h files) from input_files lists.
* Return a Null() class if we're not generating MSVS files
so we don't have to hide the other calls in if:-blocks.
* Add custom ChromeFileList subclass of MSVS.FileList as a
container for the file list manipulation we need to do.
* Move the Chrome*() function definitions out to global space,
and just use the generate() function for adding them to
the passed-in environment as class methods.
* Make a change to SCons (in Node/FS.py) to handle polymorphism in
the new MSVS Node hierarchy.
Review URL: http://codereview.chromium.org/16447
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_unittests.scons')
-rw-r--r-- | base/base_unittests.scons | 128 |
1 files changed, 95 insertions, 33 deletions
diff --git a/base/base_unittests.scons b/base/base_unittests.scons index b14291c..66be1f3 100644 --- a/base/base_unittests.scons +++ b/base/base_unittests.scons @@ -41,17 +41,30 @@ if env.Bit('linux'): ], ) -# These test files work on *all* platforms; tests that don't work -# cross-platform live below. -input_files = [ +input_files = ChromeFileList([ + # TODO(sgk): + # We're deliberately mis-indenting the MSVSFilter() calls here + # so we don't have to re-indent the file name entries when the + # MSVSFilter() calls go away in (favor of automated generation + # of the heirarchy). + MSVSFilter('support', [ + 'multiprocess_test.h', + 'no_windows2000_unittest.h', + 'run_all_unittests.cc', + 'test_suite.h', + ]), + + MSVSFilter('base_tests', [ 'at_exit_unittest.cc', 'atomicops_unittest.cc', 'clipboard_unittest.cc', 'command_line_unittest.cc', 'condition_variable_unittest.cc', + 'directory_watcher_unittest.cc', 'field_trial_unittest.cc', 'file_path_unittest.cc', 'file_util_unittest.cc', + 'file_version_info_unittest.cc', 'histogram_unittest.cc', 'hmac_unittest.cc', 'idletimer_unittest.cc', @@ -60,14 +73,17 @@ input_files = [ 'lazy_instance_unittest.cc', 'linked_ptr_unittest.cc', 'message_loop_unittest.cc', + 'gfx/native_theme_unittest.cc', + 'object_watcher_unittest.cc', 'observer_list_unittest.cc', 'path_service_unittest.cc', + 'pe_image_unittest.cc', 'pickle_unittest.cc', 'pr_time_unittest.cc', 'process_util_unittest.cc', 'rand_util_unittest.cc', + 'gfx/rect_unittest.cc', 'ref_counted_unittest.cc', - 'run_all_unittests.cc', 'scoped_ptr_unittest.cc', 'sha2_unittest.cc', 'shared_memory_unittest.cc', @@ -80,81 +96,127 @@ input_files = [ 'string_tokenizer_unittest.cc', 'string_util_unittest.cc', 'sys_info_unittest.cc', + 'sys_string_conversions_unittest.cc', + 'system_monitor_unittest.cc', 'thread_collision_warner_unittest.cc', 'thread_local_storage_unittest.cc', 'thread_local_unittest.cc', 'thread_unittest.cc', 'time_unittest.cc', + 'time_unittest_win.cc', 'timer_unittest.cc', 'tracked_objects_unittest.cc', 'tuple_unittest.cc', 'values_unittest.cc', 'waitable_event_unittest.cc', 'watchdog_unittest.cc', + 'win_util_unittest.cc', + 'wmi_util_unittest.cc', 'word_iterator_unittest.cc', - 'worker_pool_unittest.cc', - - 'gfx/native_theme_unittest.cc', + ]), + + MSVSFilter('gfx_tests', [ 'gfx/png_codec_unittest.cc', - 'gfx/rect_unittest.cc', -] + ]), +]) if env.Bit('posix'): # Remove files that still need to be ported from the input_files list. # TODO(port): delete files from this list as they get ported. - to_be_ported_files = [ + input_files.Remove( # We have an implementation of idle_timer, but it's unclear if we want it # yet, so it's commented out for now. Leave this 'unported'. 'idletimer_unittest.cc', 'gfx/native_theme_unittest.cc', - ] - for remove in to_be_ported_files: - input_files.remove(remove) + ) if env.Bit('mac'): # Remove files that still need to be ported from the input_files list. # TODO(port): delete files from this list as they get ported. - to_be_ported_files = [ + input_files.Remove( 'process_util_unittest.cc', 'stats_table_unittest.cc', - ] - for remove in to_be_ported_files: - input_files.remove(remove) + ) -if env.Bit('windows'): - # Windows-specific tests. - input_files.extend([ +if not env.Bit('windows'): + # Remove Windows-specific tests. + input_files.Remove( 'directory_watcher_unittest.cc', 'file_version_info_unittest.cc', 'object_watcher_unittest.cc', 'pe_image_unittest.cc', + 'system_monitor_unittest.cc', 'sys_string_conversions_unittest.cc', 'time_unittest_win.cc', 'win_util_unittest.cc', 'wmi_util_unittest.cc', - ]) + ) if env.Bit('mac'): # Mac-specific tests. - input_files.extend([ + input_files.Extend([ 'mac_util_unittest.cc', ]) env.ChromeTestProgram('base_unittests', input_files) -env.ChromeMSVSProject('$BASE_DIR/build/base_unittests.vcproj', - dependencies = [ - '$BASE_DIR/build/base.vcproj', - '$ZLIB_DIR/zlib.vcproj', - '$ICU38_DIR/build/icu.vcproj', - '$BASE_DIR/build/base_gfx.vcproj', - '$TESTING_DIR/gtest.vcproj', - '$LIBPNG_DIR/libpng.vcproj', - '$SKIA_DIR/skia.vcproj', - ], - guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}') +p = env.ChromeMSVSProject('build/base_unittests.vcproj', + guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}', + dependencies=[ + '$BASE_DIR/build/base.vcproj', + '$ZLIB_DIR/zlib.vcproj', + '$ICU38_DIR/build/icu.vcproj', + '$BASE_DIR/build/base_gfx.vcproj', + '$TESTING_DIR/gtest.vcproj', + '$LIBPNG_DIR/libpng.vcproj', + '$SKIA_DIR/skia.vcproj', + ], + files=input_files, + tools = [ + 'VCPreBuildEventTool', + 'VCCustomBuildTool', + 'VCXMLDataGeneratorTool', + 'VCWebServiceProxyGeneratorTool', + 'VCMIDLTool', + MSVSTool('VCCLCompilerTool', + PreprocessorDefinitions='UNIT_TEST'), + 'VCManagedResourceCompilerTool', + 'VCResourceCompilerTool', + 'VCPreLinkEventTool', + 'VCLinkerTool', + 'VCALinkTool', + 'VCManifestTool', + 'VCXDCMakeTool', + 'VCBscMakeTool', + 'VCFxCopTool', + 'VCAppVerifierTool', + 'VCWebDeploymentTool', + 'VCPostBuildEventTool', + ]) + +p.AddConfig('Debug|Win32', + ConfigurationType = '1', + InheritedPropertySheets = [ + '$(SolutionDir)../build/debug.vsprops', + './base_unittests.vsprops', + '$(SolutionDir)../testing/using_gtest.vsprops', + ]) + +p.AddConfig('Release|Win32', + ConfigurationType = '1', + InheritedPropertySheets = [ + '$(SolutionDir)../build/release.vsprops', + './base_unittests.vsprops', + '$(SolutionDir)../testing/using_gtest.vsprops', + ]) + +env.AlwaysBuild(p) + +i = env.Command('$CHROME_SRC_DIR/base/build/base_unittests.vcproj', p, + Copy('$TARGET', '$SOURCE')) +Alias('msvs', i) # 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 |