14fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org#!/usr/bin/env python 24fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 34fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org# Copyright (c) 2011 Google Inc. All rights reserved. 44fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org# Use of this source code is governed by a BSD-style license that can be 54fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org# found in the LICENSE file. 64fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 74fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org""" 84fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgVerifies that msvs_prebuild and msvs_postbuild can be specified in both 94fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgVS 2008 and 2010. 104fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org""" 114fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 124fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgimport TestGyp 134fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 144fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all') 154fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 164fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.run_gyp('buildevents.gyp', '-G', 'msvs_version=2008') 174fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.must_contain('main.vcproj', 'Name="VCPreBuildEventTool"') 184fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.must_contain('main.vcproj', 'Name="VCPostBuildEventTool"') 194fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 204fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.run_gyp('buildevents.gyp', '-G', 'msvs_version=2010') 214fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.must_contain('main.vcxproj', '<PreBuildEvent>') 224fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.must_contain('main.vcxproj', '<PostBuildEvent>') 234fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.org 244fd9364155f32bc5161b88429458c6d3a7f8430fscottmg@chromium.orgtest.pass_test() 25