summaryrefslogtreecommitdiffstats
path: root/build/SConscript.googleurl
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 23:07:01 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 23:07:01 +0000
commit93bfaa60ad72df01797729ecb8cfd4a35b9d401d (patch)
tree58829a42cd5899eebb40904b7255924f4e3ac356 /build/SConscript.googleurl
parent81569624c8daa060aaab5894df4f834e102c5c95 (diff)
downloadchromium_src-93bfaa60ad72df01797729ecb8cfd4a35b9d401d.zip
chromium_src-93bfaa60ad72df01797729ecb8cfd4a35b9d401d.tar.gz
chromium_src-93bfaa60ad72df01797729ecb8cfd4a35b9d401d.tar.bz2
Make google url build and get the unit tests to link.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/SConscript.googleurl')
-rw-r--r--build/SConscript.googleurl48
1 files changed, 29 insertions, 19 deletions
diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl
index 86b8bc3..4d5dd11 100644
--- a/build/SConscript.googleurl
+++ b/build/SConscript.googleurl
@@ -48,24 +48,34 @@ input_files = [
env.ChromeStaticLibrary('googleurl', input_files)
+env_tests = env.Clone()
-# Commented out for now because we can't build googleurl unit tests
-# with gtest. This will apparently be fixed some day...
-#
-#env_tests = env.Clone()
-#
-#env_tests.Append(
-# CPPPATH = [
-# '$GTEST_DIR/include',
-# ],
-#)
-#
-#test_files = [
-# 'src/gurl_unittest.cc',
-# 'src/url_canon_unittest.cc',
-# 'src/url_parse_unittest.cc',
-# 'src/url_util_unittest.cc',
-#]
-#
-#env_tests.ChromeStaticLibrary('googleurl_tests', test_files)
+env_tests.Append(
+ CPPPATH = [
+ '$GTEST_DIR/include',
+ ],
+ CPPDEFINES = [
+ 'UNIT_TEST',
+ ],
+ LIBS = [
+ 'googleurl',
+ 'base',
+ 'icuuc',
+ 'gtest',
+ ]
+)
+
+test_files = [
+ 'src/gurl_unittest.cc',
+ 'src/url_canon_unittest.cc',
+ 'src/url_parse_unittest.cc',
+ 'src/url_util_unittest.cc',
+
+ # The version of gtest that googleurl uses provides a main() function; ours
+ # doesn't so include our own main function.
+ '#/../base/run_all_unittests.cc'
+]
+
+gurl_unittests = env_tests.ChromeTestProgram('googleurl_tests', test_files)
+installed_gurl_unittests = env.Install('$TARGET_ROOT', gurl_unittests)