From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- third_party/python/gyp/test/link-objects/base.c | 6 +++++ third_party/python/gyp/test/link-objects/extra.c | 5 ++++ .../python/gyp/test/link-objects/gyptest-all.py | 28 ++++++++++++++++++++++ .../python/gyp/test/link-objects/link-objects.gyp | 24 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 third_party/python/gyp/test/link-objects/base.c create mode 100644 third_party/python/gyp/test/link-objects/extra.c create mode 100755 third_party/python/gyp/test/link-objects/gyptest-all.py create mode 100644 third_party/python/gyp/test/link-objects/link-objects.gyp (limited to 'third_party/python/gyp/test/link-objects') diff --git a/third_party/python/gyp/test/link-objects/base.c b/third_party/python/gyp/test/link-objects/base.c new file mode 100644 index 0000000000..3327459205 --- /dev/null +++ b/third_party/python/gyp/test/link-objects/base.c @@ -0,0 +1,6 @@ +void extra(); + +int main(void) { + extra(); + return 0; +} diff --git a/third_party/python/gyp/test/link-objects/extra.c b/third_party/python/gyp/test/link-objects/extra.c new file mode 100644 index 0000000000..1d7ee09b10 --- /dev/null +++ b/third_party/python/gyp/test/link-objects/extra.c @@ -0,0 +1,5 @@ +#include + +void extra() { + printf("PASS\n"); +} diff --git a/third_party/python/gyp/test/link-objects/gyptest-all.py b/third_party/python/gyp/test/link-objects/gyptest-all.py new file mode 100755 index 0000000000..45bd6e1891 --- /dev/null +++ b/third_party/python/gyp/test/link-objects/gyptest-all.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# Copyright (c) 2011 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. + +""" +Put an object file on the sources list. +Expect the result to link ok. +""" + +import TestGyp + +import sys + +if sys.platform != 'darwin': + # Currently only works under the linux make build. + test = TestGyp.TestGyp(formats=['make']) + + test.run_gyp('link-objects.gyp') + + test.build('link-objects.gyp', test.ALL) + + test.run_built_executable('link-objects', stdout="PASS\n") + + test.up_to_date('link-objects.gyp', test.ALL) + + test.pass_test() diff --git a/third_party/python/gyp/test/link-objects/link-objects.gyp b/third_party/python/gyp/test/link-objects/link-objects.gyp new file mode 100644 index 0000000000..ab72855531 --- /dev/null +++ b/third_party/python/gyp/test/link-objects/link-objects.gyp @@ -0,0 +1,24 @@ +# 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': 'link-objects', + 'type': 'executable', + 'actions': [ + { + 'action_name': 'build extra object', + 'inputs': ['extra.c'], + 'outputs': ['extra.o'], + 'action': ['gcc', '-o', 'extra.o', '-c', 'extra.c'], + 'process_outputs_as_sources': 1, + }, + ], + 'sources': [ + 'base.c', + ], + }, + ], +} -- cgit v1.2.3