Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: test/actions-args-change/gyptest-all.py

Issue 10375015: MSVS 2008: Fix to ensure that actions are re-run when the command changes (v2) (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Style Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/actions-args-change/src/arg-action.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """
8 Verifies that actions get re-run when their arguments change.
9
10 This is a regression test for http://code.google.com/p/gyp/issues/detail?id=262
11 """
12
13 import os
14
15 import TestGyp
16
17
18 def ReadFile(filename):
19 fh = open(filename, "r")
20 try:
21 return fh.read()
22 finally:
23 fh.close()
24
25
26 def WriteFile(filename, data):
27 fh = open(filename, "w")
28 try:
29 fh.write(data)
30 finally:
31 fh.close()
32
33
34 test = TestGyp.TestGyp()
35
36 test.run_gyp('arg-action.gyp', chdir='src')
37 test.build('arg-action.gyp', chdir='src')
38 test.built_file_must_match('dest-file.txt', 'ARG_VALUE_1', chdir='src')
39
40 gypi_file = os.path.join(test.workdir, 'src', 'arg-action.gypi')
41 data = ReadFile(gypi_file)
42 WriteFile(gypi_file, data.replace('ARG_VALUE_1', 'ARG_VALUE_2'))
43
44 test.run_gyp('arg-action.gyp', chdir='src')
45 test.build('arg-action.gyp', chdir='src')
46 test.built_file_must_match('dest-file.txt', 'ARG_VALUE_2', chdir='src')
47
48 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/actions-args-change/src/arg-action.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698