| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python2.4 | |
| 2 # | |
| 3 # Copyright 2009-2010 Google Inc. | |
| 4 # | |
| 5 # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 # you may not use this file except in compliance with the License. | |
| 7 # You may obtain a copy of the License at | |
| 8 # | |
| 9 # http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 # | |
| 11 # Unless required by applicable law or agreed to in writing, software | |
| 12 # distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 # See the License for the specific language governing permissions and | |
| 15 # limitations under the License. | |
| 16 # ======================================================================== | |
| 17 | |
| 18 | |
| 19 Import('env') | |
| 20 | |
| 21 | |
| 22 local_env = env.Clone() | |
| 23 | |
| 24 omaha_version_info = local_env['omaha_versions_info'][0] | |
| 25 | |
| 26 local_env.FilterOut(LINKFLAGS = ['/NODEFAULTLIB']) | |
| 27 | |
| 28 local_env.Append( | |
| 29 CPPPATH = [ | |
| 30 '$OBJ_ROOT', # Needed for the generated files | |
| 31 '$MAIN_DIR/goopdate/resources', | |
| 32 '$MAIN_DIR/third_party/gtest/include', | |
| 33 ], | |
| 34 CPPDEFINES = [ | |
| 35 'UNITTEST', | |
| 36 '_ATL_APARTMENT_THREADED', | |
| 37 ], | |
| 38 LIBS = [ | |
| 39 '$LIB_DIR/breakpad.lib', | |
| 40 '$LIB_DIR/core.lib', | |
| 41 '$LIB_DIR/goopdate_dll.lib', | |
| 42 '$LIB_DIR/google_update_ps.lib', | |
| 43 '$LIB_DIR/google_update_recovery.lib', | |
| 44 '$LIB_DIR/logging.lib', | |
| 45 '$LIB_DIR/net.lib', | |
| 46 '$LIB_DIR/repair_goopdate.lib', | |
| 47 '$LIB_DIR/security.lib', | |
| 48 '$LIB_DIR/service.lib', | |
| 49 '$LIB_DIR/statsreport.lib', | |
| 50 '$LIB_DIR/setup.lib', | |
| 51 '$LIB_DIR/worker.lib', | |
| 52 '$LIB_DIR/gtest.lib', | |
| 53 '$LIB_DIR/common.lib', | |
| 54 ('atls.lib', 'atlsd.lib')[local_env.Bit('debug')], | |
| 55 'comctl32.lib', | |
| 56 'crypt32.lib', | |
| 57 'iphlpapi.lib', | |
| 58 'msi.lib', | |
| 59 'mstask.lib', | |
| 60 'netapi32.lib', | |
| 61 'psapi.lib', | |
| 62 'rasapi32.lib', | |
| 63 'rpcns4.lib', | |
| 64 'rpcrt4.lib', | |
| 65 'shlwapi.lib', | |
| 66 'urlmon.lib', | |
| 67 'userenv.lib', | |
| 68 'version.lib', | |
| 69 'wininet.lib', | |
| 70 'wintrust.lib', | |
| 71 'wtsapi32.lib', | |
| 72 ], | |
| 73 RCFLAGS = [ | |
| 74 '/DVERSION_MAJOR=%d' % omaha_version_info.version_major, | |
| 75 '/DVERSION_MINOR=%d' % omaha_version_info.version_minor, | |
| 76 '/DVERSION_BUILD=%d' % omaha_version_info.version_build, | |
| 77 '/DVERSION_PATCH=%d' % omaha_version_info.version_patch, | |
| 78 '/DVERSION_NUMBER_STRING=\\"%s\\"' % ( | |
| 79 omaha_version_info.GetVersionString()), | |
| 80 '/DLANGUAGE_STRING=\\"en\\"' | |
| 81 ], | |
| 82 ) | |
| 83 | |
| 84 unittest_res = local_env.RES('ui_unittest.rc'), | |
| 85 | |
| 86 local_env.Depends(unittest_res, '$MAIN_DIR/VERSION') | |
| 87 | |
| 88 # A test is a console application, so we tell mk to link to | |
| 89 # main() as opposed to WinMain(). | |
| 90 local_env.FilterOut(LINKFLAGS = ['/SUBSYSTEM:WINDOWS']) | |
| 91 local_env['LINKFLAGS'] += ['/SUBSYSTEM:CONSOLE'] | |
| 92 | |
| 93 # Do not name the output _unittest.exe or _test.exe to avoid the build machine | |
| 94 # automatically running it after the build. See rut.py for details. | |
| 95 target_name = 'ui_systemtest' | |
| 96 | |
| 97 inputs = [ | |
| 98 'ui_unittest.cc', | |
| 99 '../../worker/progresswnd_unittest.cc', | |
| 100 unittest_res, | |
| 101 ] | |
| 102 if env.Bit('use_precompiled_headers'): | |
| 103 inputs += local_env.EnablePrecompile(target_name) | |
| 104 | |
| 105 local_env.ComponentTestProgram( | |
| 106 prog_name=target_name, | |
| 107 source=inputs, | |
| 108 COMPONENT_TEST_RUNNABLE=False | |
| 109 ) | |
| 110 | |
| OLD | NEW |