mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 11:27:32 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'pull_in_all_actions',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'subdir1/executable.gyp:*',
|
||||
'subdir2/none.gyp:*',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'program',
|
||||
'type': 'executable',
|
||||
'msvs_cygwin_shell': 0,
|
||||
'sources': [
|
||||
'program.c',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'make-prog1',
|
||||
'inputs': [
|
||||
'make-prog1.py',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/prog1.c',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
},
|
||||
{
|
||||
'action_name': 'make-prog2',
|
||||
'inputs': [
|
||||
'make-prog2.py',
|
||||
],
|
||||
'outputs': [
|
||||
'actions-out/prog2.c',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2009 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.
|
||||
|
||||
import sys
|
||||
|
||||
contents = r"""
|
||||
#include <stdio.h>
|
||||
|
||||
void prog1(void)
|
||||
{
|
||||
printf("Hello from make-prog1.py\n");
|
||||
}
|
||||
"""
|
||||
|
||||
open(sys.argv[1], 'w').write(contents)
|
||||
|
||||
sys.exit(0)
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2009 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.
|
||||
|
||||
import sys
|
||||
|
||||
contents = r"""
|
||||
#include <stdio.h>
|
||||
|
||||
void prog2(void)
|
||||
{
|
||||
printf("Hello from make-prog2.py\n");
|
||||
}
|
||||
"""
|
||||
|
||||
open(sys.argv[1], 'w').write(contents)
|
||||
|
||||
sys.exit(0)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
extern void prog1(void);
|
||||
extern void prog2(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from program.c\n");
|
||||
prog1();
|
||||
prog2();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2009 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.
|
||||
|
||||
import sys
|
||||
|
||||
contents = "Hello from make-file.py\n"
|
||||
|
||||
open(sys.argv[1], 'wb').write(contents)
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'file',
|
||||
'type': 'none',
|
||||
'msvs_cygwin_shell': 0,
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'make-file',
|
||||
'inputs': [
|
||||
'make-file.py',
|
||||
],
|
||||
'outputs': [
|
||||
'actions-out/file.out',
|
||||
# TODO: enhance testing infrastructure to test this
|
||||
# without having to hard-code the intermediate dir paths.
|
||||
#'<(INTERMEDIATE_DIR)/file.out',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'pull_in_subdir',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'subdir/subdir.gyp:*',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'copies1',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': 'copies-out',
|
||||
'files': [
|
||||
'file1',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'copies2',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/copies-out',
|
||||
'files': [
|
||||
'file2',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
# Verify that a null 'files' list doesn't gag the generators.
|
||||
{
|
||||
'target_name': 'copies_null',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/copies-null',
|
||||
'files': [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
file1 contents
|
||||
|
|
@ -0,0 +1 @@
|
|||
file2 contents
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1 @@
|
|||
file3 contents
|
||||
|
|
@ -0,0 +1 @@
|
|||
file4 contents
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'copies3',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': 'copies-out',
|
||||
'files': [
|
||||
'file3',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'copies4',
|
||||
'type': 'none',
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/copies-out',
|
||||
'files': [
|
||||
'file4',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
#!/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 --generator-output= behavior when using actions.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
# All the generated files should go under 'gypfiles'. The source directory
|
||||
# ('actions') should be untouched.
|
||||
test.writable(test.workpath('actions'), False)
|
||||
test.run_gyp('actions.gyp',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
chdir='actions')
|
||||
|
||||
test.writable(test.workpath('actions'), True)
|
||||
|
||||
test.relocate('actions', 'relocate/actions')
|
||||
test.relocate('gypfiles', 'relocate/gypfiles')
|
||||
|
||||
test.writable(test.workpath('relocate/actions'), False)
|
||||
|
||||
# Some of the action outputs use "pure" relative paths (i.e. without prefixes
|
||||
# like <(INTERMEDIATE_DIR) or <(PROGRAM_DIR)). Even though we are building under
|
||||
# 'gypfiles', such outputs will still be created relative to the original .gyp
|
||||
# sources. Projects probably wouldn't normally do this, since it kind of defeats
|
||||
# the purpose of '--generator-output', but it is supported behaviour.
|
||||
test.writable(test.workpath('relocate/actions/build'), True)
|
||||
test.writable(test.workpath('relocate/actions/subdir1/build'), True)
|
||||
test.writable(test.workpath('relocate/actions/subdir1/actions-out'), True)
|
||||
test.writable(test.workpath('relocate/actions/subdir2/build'), True)
|
||||
test.writable(test.workpath('relocate/actions/subdir2/actions-out'), True)
|
||||
|
||||
test.build('actions.gyp', test.ALL, chdir='relocate/gypfiles')
|
||||
|
||||
expect = """\
|
||||
Hello from program.c
|
||||
Hello from make-prog1.py
|
||||
Hello from make-prog2.py
|
||||
"""
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/actions/subdir1'
|
||||
else:
|
||||
chdir = 'relocate/gypfiles'
|
||||
test.run_built_executable('program', chdir=chdir, stdout=expect)
|
||||
|
||||
test.must_match('relocate/actions/subdir2/actions-out/file.out',
|
||||
"Hello from make-file.py\n")
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#!/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 file copies with --generator-output using an explicit build
|
||||
target of 'all'.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
test.writable(test.workpath('copies'), False)
|
||||
|
||||
test.run_gyp('copies.gyp',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
'-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
|
||||
chdir='copies')
|
||||
|
||||
test.writable(test.workpath('copies'), True)
|
||||
|
||||
test.relocate('copies', 'relocate/copies')
|
||||
test.relocate('gypfiles', 'relocate/gypfiles')
|
||||
|
||||
test.writable(test.workpath('relocate/copies'), False)
|
||||
|
||||
test.writable(test.workpath('relocate/copies/build'), True)
|
||||
test.writable(test.workpath('relocate/copies/copies-out'), True)
|
||||
test.writable(test.workpath('relocate/copies/subdir/build'), True)
|
||||
test.writable(test.workpath('relocate/copies/subdir/copies-out'), True)
|
||||
|
||||
test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles')
|
||||
|
||||
test.must_match(['relocate', 'copies', 'copies-out', 'file1'],
|
||||
"file1 contents\n")
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/copies/build'
|
||||
elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
|
||||
chdir = 'relocate/gypfiles/out'
|
||||
else:
|
||||
chdir = 'relocate/gypfiles'
|
||||
test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n")
|
||||
|
||||
test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'],
|
||||
"file3 contents\n")
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/copies/subdir/build'
|
||||
elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
|
||||
chdir = 'relocate/gypfiles/out'
|
||||
else:
|
||||
chdir = 'relocate/gypfiles'
|
||||
test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n")
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2014 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 building a project hierarchy created when the --generator-output=
|
||||
and --depth= options is used to put the build configuration files in a separate
|
||||
directory tree.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
import os
|
||||
|
||||
# This is a regression test for the make generator only.
|
||||
test = TestGyp.TestGyp(formats=['make'])
|
||||
|
||||
test.writable(test.workpath('src'), False)
|
||||
|
||||
toplevel_dir = os.path.basename(test.workpath())
|
||||
|
||||
test.run_gyp(os.path.join(toplevel_dir, 'src', 'prog1.gyp'),
|
||||
'-Dset_symroot=1',
|
||||
'--generator-output=gypfiles',
|
||||
depth=toplevel_dir,
|
||||
chdir='..')
|
||||
|
||||
test.writable(test.workpath('src/build'), True)
|
||||
test.writable(test.workpath('src/subdir2/build'), True)
|
||||
test.writable(test.workpath('src/subdir3/build'), True)
|
||||
|
||||
test.build('prog1.gyp', test.ALL, chdir='gypfiles')
|
||||
|
||||
chdir = 'gypfiles'
|
||||
|
||||
expect = """\
|
||||
Hello from %s
|
||||
Hello from inc.h
|
||||
Hello from inc1/include1.h
|
||||
Hello from inc2/include2.h
|
||||
Hello from inc3/include3.h
|
||||
Hello from subdir2/deeper/deeper.h
|
||||
"""
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src'
|
||||
test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir2'
|
||||
test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir3'
|
||||
test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#!/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 mac bundles work with --generator-output.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
import sys
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
print "This test is currently disabled: https://crbug.com/483696."
|
||||
sys.exit(0)
|
||||
|
||||
test = TestGyp.TestGyp(formats=[])
|
||||
|
||||
MAC_BUNDLE_DIR = 'mac-bundle'
|
||||
GYPFILES_DIR = 'gypfiles'
|
||||
test.writable(test.workpath(MAC_BUNDLE_DIR), False)
|
||||
test.run_gyp('test.gyp',
|
||||
'--generator-output=' + test.workpath(GYPFILES_DIR),
|
||||
chdir=MAC_BUNDLE_DIR)
|
||||
test.writable(test.workpath(MAC_BUNDLE_DIR), True)
|
||||
|
||||
test.build('test.gyp', test.ALL, chdir=GYPFILES_DIR)
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#!/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 that a project hierarchy created with the --generator-output=
|
||||
option can be built even when it's relocated to a different path.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
test.writable(test.workpath('src'), False)
|
||||
|
||||
test.run_gyp('prog1.gyp',
|
||||
'-Dset_symroot=1',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
chdir='src')
|
||||
|
||||
test.writable(test.workpath('src'), True)
|
||||
|
||||
test.relocate('src', 'relocate/src')
|
||||
test.relocate('gypfiles', 'relocate/gypfiles')
|
||||
|
||||
test.writable(test.workpath('relocate/src'), False)
|
||||
|
||||
test.writable(test.workpath('relocate/src/build'), True)
|
||||
test.writable(test.workpath('relocate/src/subdir2/build'), True)
|
||||
test.writable(test.workpath('relocate/src/subdir3/build'), True)
|
||||
|
||||
test.build('prog1.gyp', test.ALL, chdir='relocate/gypfiles')
|
||||
|
||||
chdir = 'relocate/gypfiles'
|
||||
|
||||
expect = """\
|
||||
Hello from %s
|
||||
Hello from inc.h
|
||||
Hello from inc1/include1.h
|
||||
Hello from inc2/include2.h
|
||||
Hello from inc3/include3.h
|
||||
Hello from subdir2/deeper/deeper.h
|
||||
"""
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/src'
|
||||
test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/src/subdir2'
|
||||
test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/src/subdir3'
|
||||
test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#!/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 --generator-output= behavior when using rules.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
test.writable(test.workpath('rules'), False)
|
||||
|
||||
test.run_gyp('rules.gyp',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
chdir='rules')
|
||||
|
||||
test.writable(test.workpath('rules'), True)
|
||||
|
||||
test.relocate('rules', 'relocate/rules')
|
||||
test.relocate('gypfiles', 'relocate/gypfiles')
|
||||
|
||||
test.writable(test.workpath('relocate/rules'), False)
|
||||
|
||||
test.writable(test.workpath('relocate/rules/build'), True)
|
||||
test.writable(test.workpath('relocate/rules/subdir1/build'), True)
|
||||
test.writable(test.workpath('relocate/rules/subdir2/build'), True)
|
||||
test.writable(test.workpath('relocate/rules/subdir2/rules-out'), True)
|
||||
|
||||
test.build('rules.gyp', test.ALL, chdir='relocate/gypfiles')
|
||||
|
||||
expect = """\
|
||||
Hello from program.c
|
||||
Hello from function1.in1
|
||||
Hello from function2.in1
|
||||
Hello from define3.in0
|
||||
Hello from define4.in0
|
||||
"""
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'relocate/rules/subdir1'
|
||||
else:
|
||||
chdir = 'relocate/gypfiles'
|
||||
test.run_built_executable('program', chdir=chdir, stdout=expect)
|
||||
|
||||
test.must_match('relocate/rules/subdir2/rules-out/file1.out',
|
||||
"Hello from file1.in0\n")
|
||||
test.must_match('relocate/rules/subdir2/rules-out/file2.out',
|
||||
"Hello from file2.in0\n")
|
||||
test.must_match('relocate/rules/subdir2/rules-out/file3.out',
|
||||
"Hello from file3.in1\n")
|
||||
test.must_match('relocate/rules/subdir2/rules-out/file4.out',
|
||||
"Hello from file4.in1\n")
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
#!/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 building a target from a .gyp file a few subdirectories
|
||||
deep when the --generator-output= option is used to put the build
|
||||
configuration files in a separate directory tree.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
test.writable(test.workpath('src'), False)
|
||||
|
||||
test.writable(test.workpath('src/subdir2/deeper/build'), True)
|
||||
|
||||
test.run_gyp('deeper.gyp',
|
||||
'-Dset_symroot=1',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
chdir='src/subdir2/deeper')
|
||||
|
||||
test.build('deeper.gyp', test.ALL, chdir='gypfiles')
|
||||
|
||||
chdir = 'gypfiles'
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir2/deeper'
|
||||
test.run_built_executable('deeper',
|
||||
chdir=chdir,
|
||||
stdout="Hello from deeper.c\n")
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/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 building a target when the --generator-output= option is used to put
|
||||
the build configuration files in a separate directory tree referenced by a
|
||||
symlink.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
import os
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
if not hasattr(os, 'symlink'):
|
||||
test.skip_test('Missing os.symlink -- skipping test.\n')
|
||||
|
||||
test.writable(test.workpath('src'), False)
|
||||
|
||||
test.writable(test.workpath('src/subdir2/deeper/build'), True)
|
||||
|
||||
test.subdir(test.workpath('build'))
|
||||
test.subdir(test.workpath('build/deeper'))
|
||||
test.symlink('build/deeper', test.workpath('symlink'))
|
||||
|
||||
test.writable(test.workpath('build/deeper'), True)
|
||||
test.run_gyp('deeper.gyp',
|
||||
'-Dset_symroot=2',
|
||||
'--generator-output=' + test.workpath('symlink'),
|
||||
chdir='src/subdir2/deeper')
|
||||
|
||||
chdir = 'symlink'
|
||||
test.build('deeper.gyp', test.ALL, chdir=chdir)
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir2/deeper'
|
||||
test.run_built_executable('deeper',
|
||||
chdir=chdir,
|
||||
stdout="Hello from deeper.c\n")
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/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 building a project hierarchy created when the --generator-output=
|
||||
option is used to put the build configuration files in a separate
|
||||
directory tree.
|
||||
"""
|
||||
|
||||
import TestGyp
|
||||
|
||||
test = TestGyp.TestGyp()
|
||||
|
||||
test.writable(test.workpath('src'), False)
|
||||
|
||||
test.run_gyp('prog1.gyp',
|
||||
'-Dset_symroot=1',
|
||||
'--generator-output=' + test.workpath('gypfiles'),
|
||||
chdir='src')
|
||||
|
||||
test.writable(test.workpath('src/build'), True)
|
||||
test.writable(test.workpath('src/subdir2/build'), True)
|
||||
test.writable(test.workpath('src/subdir3/build'), True)
|
||||
|
||||
test.build('prog1.gyp', test.ALL, chdir='gypfiles')
|
||||
|
||||
chdir = 'gypfiles'
|
||||
|
||||
expect = """\
|
||||
Hello from %s
|
||||
Hello from inc.h
|
||||
Hello from inc1/include1.h
|
||||
Hello from inc2/include2.h
|
||||
Hello from inc3/include3.h
|
||||
Hello from subdir2/deeper/deeper.h
|
||||
"""
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src'
|
||||
test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir2'
|
||||
test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
|
||||
|
||||
if test.format == 'xcode':
|
||||
chdir = 'src/subdir3'
|
||||
test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
|
||||
|
||||
test.pass_test()
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.google.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>ause</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1 @@
|
|||
_main
|
||||
|
|
@ -0,0 +1 @@
|
|||
int f();
|
||||
|
|
@ -0,0 +1 @@
|
|||
int main() {}
|
||||
|
|
@ -0,0 +1 @@
|
|||
A text file.
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# 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.
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'test_app',
|
||||
'product_name': 'Test App Gyp',
|
||||
'type': 'executable',
|
||||
'mac_bundle': 1,
|
||||
'sources': [
|
||||
'main.c',
|
||||
],
|
||||
'mac_bundle_resources': [
|
||||
'resource.sb',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'Info.plist',
|
||||
'ORDER_FILE': 'app.order',
|
||||
'GCC_PREFIX_HEADER': 'header.h',
|
||||
'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2009 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.
|
||||
|
||||
import sys
|
||||
|
||||
contents = open(sys.argv[1], 'r').read()
|
||||
open(sys.argv[2], 'wb').write(contents)
|
||||
|
||||
sys.exit(0)
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'pull_in_all_actions',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'subdir1/executable.gyp:*',
|
||||
'subdir2/none.gyp:*',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define STRING3 "Hello from define3.in0\n"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define STRING4 "Hello from define4.in0\n"
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'program',
|
||||
'type': 'executable',
|
||||
'msvs_cygwin_shell': 0,
|
||||
'sources': [
|
||||
'program.c',
|
||||
'function1.in1',
|
||||
'function2.in1',
|
||||
'define3.in0',
|
||||
'define4.in0',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(INTERMEDIATE_DIR)',
|
||||
],
|
||||
'rules': [
|
||||
{
|
||||
'rule_name': 'copy_file_0',
|
||||
'extension': 'in0',
|
||||
'inputs': [
|
||||
'../copy-file.py',
|
||||
],
|
||||
'outputs': [
|
||||
# TODO: fix Make to support generated files not
|
||||
# in a variable-named path like <(INTERMEDIATE_DIR)
|
||||
#'<(RULE_INPUT_ROOT).c',
|
||||
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 0,
|
||||
},
|
||||
{
|
||||
'rule_name': 'copy_file_1',
|
||||
'extension': 'in1',
|
||||
'inputs': [
|
||||
'../copy-file.py',
|
||||
],
|
||||
'outputs': [
|
||||
# TODO: fix Make to support generated files not
|
||||
# in a variable-named path like <(INTERMEDIATE_DIR)
|
||||
#'<(RULE_INPUT_ROOT).c',
|
||||
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void function1(void)
|
||||
{
|
||||
printf("Hello from function1.in1\n");
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void function2(void)
|
||||
{
|
||||
printf("Hello from function2.in1\n");
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#include <stdio.h>
|
||||
#include "define3.h"
|
||||
#include "define4.h"
|
||||
|
||||
extern void function1(void);
|
||||
extern void function2(void);
|
||||
extern void function3(void);
|
||||
extern void function4(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from program.c\n");
|
||||
function1();
|
||||
function2();
|
||||
printf("%s", STRING3);
|
||||
printf("%s", STRING4);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello from file1.in0
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello from file2.in0
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello from file3.in1
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello from file4.in1
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'files',
|
||||
'type': 'none',
|
||||
'msvs_cygwin_shell': 0,
|
||||
'sources': [
|
||||
'file1.in0',
|
||||
'file2.in0',
|
||||
'file3.in1',
|
||||
'file4.in1',
|
||||
],
|
||||
'rules': [
|
||||
{
|
||||
'rule_name': 'copy_file_0',
|
||||
'extension': 'in0',
|
||||
'inputs': [
|
||||
'../copy-file.py',
|
||||
],
|
||||
'outputs': [
|
||||
'rules-out/<(RULE_INPUT_ROOT).out',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 0,
|
||||
},
|
||||
{
|
||||
'rule_name': 'copy_file_1',
|
||||
'extension': 'in1',
|
||||
'inputs': [
|
||||
'../copy-file.py',
|
||||
],
|
||||
'outputs': [
|
||||
'rules-out/<(RULE_INPUT_ROOT).out',
|
||||
],
|
||||
'action': [
|
||||
'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define INC_STRING "inc.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define INCLUDE1_STRING "inc1/include1.h"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "inc.h"
|
||||
#include "include1.h"
|
||||
#include "include2.h"
|
||||
#include "include3.h"
|
||||
#include "deeper.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from prog1.c\n");
|
||||
printf("Hello from %s\n", INC_STRING);
|
||||
printf("Hello from %s\n", INCLUDE1_STRING);
|
||||
printf("Hello from %s\n", INCLUDE2_STRING);
|
||||
printf("Hello from %s\n", INCLUDE3_STRING);
|
||||
printf("Hello from %s\n", DEEPER_STRING);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'symroot.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'prog1',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'subdir2/prog2.gyp:prog2',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'inc1',
|
||||
'subdir2/inc2',
|
||||
'subdir3/inc3',
|
||||
'subdir2/deeper',
|
||||
],
|
||||
'sources': [
|
||||
'prog1.c',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from deeper.c\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../symroot.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'deeper',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'deeper.c',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define DEEPER_STRING "subdir2/deeper/deeper.h"
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define INCLUDE2_STRING "inc2/include2.h"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "inc.h"
|
||||
#include "include1.h"
|
||||
#include "include2.h"
|
||||
#include "include3.h"
|
||||
#include "deeper.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from prog2.c\n");
|
||||
printf("Hello from %s\n", INC_STRING);
|
||||
printf("Hello from %s\n", INCLUDE1_STRING);
|
||||
printf("Hello from %s\n", INCLUDE2_STRING);
|
||||
printf("Hello from %s\n", INCLUDE3_STRING);
|
||||
printf("Hello from %s\n", DEEPER_STRING);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../symroot.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'prog2',
|
||||
'type': 'executable',
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../inc1',
|
||||
'inc2',
|
||||
'../subdir3/inc3',
|
||||
'deeper',
|
||||
],
|
||||
'dependencies': [
|
||||
'../subdir3/prog3.gyp:prog3',
|
||||
],
|
||||
'sources': [
|
||||
'prog2.c',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
A place-holder for this Xcode build output directory, so that the
|
||||
test script can verify that .xcodeproj files are not created in
|
||||
their normal location by making the src/ read-only, and then
|
||||
selectively making this build directory writable.
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define INCLUDE3_STRING "inc3/include3.h"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "inc.h"
|
||||
#include "include1.h"
|
||||
#include "include2.h"
|
||||
#include "include3.h"
|
||||
#include "deeper.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello from prog3.c\n");
|
||||
printf("Hello from %s\n", INC_STRING);
|
||||
printf("Hello from %s\n", INCLUDE1_STRING);
|
||||
printf("Hello from %s\n", INCLUDE2_STRING);
|
||||
printf("Hello from %s\n", INCLUDE3_STRING);
|
||||
printf("Hello from %s\n", DEEPER_STRING);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../symroot.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'prog3',
|
||||
'type': 'executable',
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../inc1',
|
||||
'../subdir2/inc2',
|
||||
'inc3',
|
||||
'../subdir2/deeper',
|
||||
],
|
||||
'sources': [
|
||||
'prog3.c',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2009 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.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'set_symroot%': 0,
|
||||
},
|
||||
'conditions': [
|
||||
['set_symroot == 1', {
|
||||
'xcode_settings': {
|
||||
'SYMROOT': '<(DEPTH)/build',
|
||||
},
|
||||
}],
|
||||
],
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue