diff options
Diffstat (limited to 'test/mac')
-rw-r--r-- | test/mac/gyptest-libtool-zero.py | 26 | ||||
-rw-r--r-- | test/mac/libtool-zero/mylib.c | 7 | ||||
-rw-r--r-- | test/mac/libtool-zero/test.gyp | 15 |
3 files changed, 48 insertions, 0 deletions
diff --git a/test/mac/gyptest-libtool-zero.py b/test/mac/gyptest-libtool-zero.py new file mode 100644 index 00000000..ae5b7e63 --- /dev/null +++ b/test/mac/gyptest-libtool-zero.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +# Copyright (c) 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 libraries have proper mtime. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) + + CHDIR = 'libtool-zero' + + test.run_gyp('test.gyp', chdir=CHDIR) + + test.build('test.gyp', 'mylib', chdir=CHDIR) + + test.up_to_date('test.gyp', 'mylib', chdir=CHDIR) + + test.pass_test() diff --git a/test/mac/libtool-zero/mylib.c b/test/mac/libtool-zero/mylib.c new file mode 100644 index 00000000..b26d61bd --- /dev/null +++ b/test/mac/libtool-zero/mylib.c @@ -0,0 +1,7 @@ +// Copyright (c) 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. + +int my_foo(int x) { + return x + 1; +} diff --git a/test/mac/libtool-zero/test.gyp b/test/mac/libtool-zero/test.gyp new file mode 100644 index 00000000..2f2c3f1c --- /dev/null +++ b/test/mac/libtool-zero/test.gyp @@ -0,0 +1,15 @@ +# Copyright (c) 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. + +{ + 'targets': [ + { + 'target_name': 'mylib', + 'type': 'static_library', + 'sources': [ + 'mylib.c', + ], + }, + ], +} |