Sha256: ca4dd6b63280a4c676543e3ea25541c38c19bb8284bc41c53c76d79c358b7ec0

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Verifies simple actions when using an explicit build target of 'all'.
"""

import TestGyp

test = TestGyp.TestGyp()

test.run_gyp('all.gyp', chdir='src')
test.relocate('src', 'relocate/src')

# Build all.
test.build('all.gyp', chdir='relocate/src')

if test.format=='xcode':
  chdir = 'relocate/src/dir1'
else:
  chdir = 'relocate/src'

# Output is as expected.
file_content = 'Hello from emit.py\n'
test.built_file_must_match('out2.txt', file_content, chdir=chdir)

test.built_file_must_not_exist('out.txt', chdir='relocate/src')
test.built_file_must_not_exist('foolib1',
                               type=test.SHARED_LIB,
                               chdir=chdir)

# TODO(mmoss) Make consistent with msvs, with 'dir1' before 'out/Default'?
if test.format in ('make', 'ninja', 'android', 'cmake'):
  chdir='relocate/src'
else:
  chdir='relocate/src/dir1'

# Build the action explicitly.
test.build('actions.gyp', 'action1_target', chdir=chdir)

# Check that things got run.
file_content = 'Hello from emit.py\n'
test.built_file_must_exist('out.txt', chdir=chdir)

# Build the shared library explicitly.
test.build('actions.gyp', 'foolib1', chdir=chdir)

test.built_file_must_exist('foolib1',
                           type=test.SHARED_LIB,
                           chdir=chdir,
                           subdir='dir1')

test.pass_test()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/gyptest-additional.py