Bug 797671: Import Webrtc.org code from stable branch 3.12 (rev 2820) rs=jesup
[gecko.git] / media / webrtc / trunk / tools / gyp / test / win / gyptest-link-library-directories.py
blob8308e14fcb5683ad3b5b71c038089f2b2134c856
1 #!/usr/bin/env python
3 # Copyright (c) 2012 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.
7 """
8 Make sure libpath is extracted properly.
9 """
11 import TestGyp
13 import sys
15 if sys.platform == 'win32':
16 test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
18 CHDIR = 'linker-flags'
20 # Build subdirectory library.
21 test.run_gyp('subdir/library.gyp', chdir=CHDIR)
22 test.build('subdir/library.gyp', test.ALL, chdir=CHDIR)
24 # And then try to link the main project against the library using only
25 # LIBPATH to find it.
26 test.run_gyp('library-directories.gyp', chdir=CHDIR)
28 # Without additional paths specified, should fail.
29 test.build('library-directories.gyp', 'test_libdirs_none', chdir=CHDIR,
30 status=1)
32 # With the additional library directory, should pass.
33 test.build('library-directories.gyp', 'test_libdirs_with', chdir=CHDIR)
35 test.pass_test()