From 938a049dbe59534ed66f881c48f684b20e888747 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Mon, 12 Sep 2011 22:06:38 +0000 Subject: [PATCH] Clean up vie_auto_test.gypi. The most significant change is to use gyp's "copies" feature for copying the media files. This will now only trigger when needed, rather than with every build as before. Review URL: http://webrtc-codereview.appspot.com/133020 git-svn-id: http://webrtc.googlecode.com/svn/trunk@585 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../AutoTest/source/vie_autotest_network.cc | 2 +- .../main/test/AutoTest/vie_auto_test.gypi | 92 +++++-------------- 2 files changed, 26 insertions(+), 68 deletions(-) diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc index 6dae45f90..ec4266519 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_network.cc @@ -231,7 +231,7 @@ int ViEAutoTest::ViENetworkExtendedTest() // Create a video channel tbVideoChannel tbChannel(ViE, numberOfErrors, webrtc::kVideoCodecVP8); tbCapture.ConnectTo(tbChannel.videoChannel); - char* remoteIp = "192.168.200.1"; + const char* remoteIp = "192.168.200.1"; int DSCP = 0; bool useSetSockOpt = false; diff --git a/src/video_engine/main/test/AutoTest/vie_auto_test.gypi b/src/video_engine/main/test/AutoTest/vie_auto_test.gypi index cf5522520..8fef32640 100644 --- a/src/video_engine/main/test/AutoTest/vie_auto_test.gypi +++ b/src/video_engine/main/test/AutoTest/vie_auto_test.gypi @@ -41,7 +41,7 @@ '<(webrtc_root)/modules/modules.gyp:video_render_module', '<(webrtc_root)/modules/modules.gyp:video_capture_module', '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine_core', - 'video_engine_core', + 'video_engine_core', ], 'include_dirs': [ 'interface/', @@ -52,7 +52,6 @@ '../../../../common_video/interface/', ], 'sources': [ - # interfaces 'interface/tb_capture_device.h', 'interface/tb_external_transport.h', 'interface/tb_I420_codec.h', @@ -67,7 +66,7 @@ 'interface/vie_autotest_window_manager_interface.h', 'interface/vie_autotest_windows.h', - # PLATFORM INDEPENDENT SOURCE FILES + # Platform independent 'source/tb_capture_device.cc', 'source/tb_external_transport.cc', 'source/tb_I420_codec.cc', @@ -86,7 +85,8 @@ 'source/vie_autotest_render.cc', 'source/vie_autotest_rtp_rtcp.cc', 'source/vie_autotest_custom_call.cc', - # PLATFORM SPECIFIC SOURCE FILES - Will be filtered below + + # Platform dependent # Linux 'source/vie_autotest_linux.cc', # Mac @@ -94,14 +94,21 @@ 'source/vie_autotest_mac_carbon.cc', # Windows 'source/vie_autotest_windows.cc', - ], # sources + ], + 'copies': [{ + 'destination': '/tmp', + 'files': [ + 'media/captureDeviceImage.bmp', + 'media/captureDeviceImage.jpg', + 'media/renderStartImage.bmp', + 'media/renderStartImage.jpg', + 'media/renderTimeoutImage.bmp', + 'media/renderTimeoutImage.jpg', + ], + }], 'conditions': [ - # DEFINE PLATFORM SPECIFIC SOURCE FILES - ['OS!="linux"', { - 'sources!': [ - 'source/vie_autotest_linux.cc', - ], - }], + # TODO(andrew): rename these to be suffixed with _mac and _win. They + # will then be automatically excluded. ['OS!="mac"', { 'sources!': [ 'source/vie_autotest_mac_cocoa.cc', @@ -113,33 +120,20 @@ 'source/vie_autotest_windows.cc', ], }], + + # TODO(andrew): this likely isn't an actual dependency. It should be + # included in webrtc.gyp or video_engine.gyp instead. ['OS=="win"', { - 'dependencies': [ + 'dependencies': [ 'vie_win_test', ], }], - - # DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS - ['OS=="mac" or OS=="linux"', { - 'cflags': [ - '-Wno-write-strings', - ], - 'ldflags': [ - '-lpthread -lm', - ], - }], ['OS=="linux"', { - 'ldflags': [ - # '-L<(libvpx_hack_dir)/<(OS)/<(target_arch)', - ], + # TODO(andrew): these should be provided directly by the projects + # which require them instead. 'libraries': [ - '-lrt', '-lXext', '-lX11', - '-lasound', - '-lpulse', - - ], }], ['OS=="mac"', { @@ -150,43 +144,7 @@ ], }, }], - #Copy media files - ['OS=="linux" or OS=="mac"', { - 'actions': [ - { - 'action_name': 'copy media files', - 'inputs': [ - 'media', - ], - 'outputs': [ - 'captureDeviceImage.bmp', - ], - 'action': [ - '/bin/sh', '-c', - 'cp -f main/test/AutoTest/media/* /tmp/', - ], - }, - ], - }], - ['OS=="win"', { - 'actions': [ - { - 'action_name': 'copy media files', - 'inputs': [ - 'media', - ], - 'outputs': [ - '\\tmp\\*.jpg', - '\\tmp\\*.bmp', - ], - 'action': [ - 'cmd', '/c', - 'xcopy /Y /R main\\test\\AutoTest\\media\\* \\tmp', - ], - }, - ], - }], - ], #conditions + ], # conditions }, ], }