blob: 684e7b8426d1de9ed87e1e9fecf4db50c78f61b9 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2
3# Copyright (c) 2011 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"""
8Verifies that postbuild steps work.
9"""
10
11import TestGyp
12
13import sys
14
15if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
17
18 test.run_gyp('test.gyp', chdir='postbuilds')
19
20 test.build('test.gyp', test.ALL, chdir='postbuilds')
21
22 # See comment in test/subdirectory/gyptest-subdir-default.py
23 if test.format == 'xcode':
24 chdir = 'postbuilds/subdirectory'
25 else:
26 chdir = 'postbuilds'
27
28 # Created by the postbuild scripts
29 test.built_file_must_exist('el.a_touch',
30 type=test.STATIC_LIB,
31 chdir='postbuilds')
32 test.built_file_must_exist('el.a_gyp_touch',
33 type=test.STATIC_LIB,
34 chdir='postbuilds')
35 test.built_file_must_exist('nest_el.a_touch',
36 type=test.STATIC_LIB,
37 chdir=chdir)
38 test.built_file_must_exist(
39 'dyna.framework/Versions/A/dyna_touch',
40 chdir='postbuilds')
41 test.built_file_must_exist(
42 'dyna.framework/Versions/A/dyna_gyp_touch',
43 chdir='postbuilds')
44 test.built_file_must_exist(
45 'nest_dyna.framework/Versions/A/nest_dyna_touch',
46 chdir=chdir)
47 test.built_file_must_exist('dyna_standalone.dylib_gyp_touch',
48 type=test.SHARED_LIB,
49 chdir='postbuilds')
50 test.built_file_must_exist('copied_file.txt', chdir='postbuilds')
51 test.built_file_must_exist('copied_file_2.txt', chdir=chdir)
52
53 test.pass_test()