![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/local/lib/node_modules/mediasoup/worker/deps/gyp/test/library/ |
Upload File : |
#!/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. """ Verifies simple build of a "Hello, world!" program with shared libraries, including verifying that libraries are rebuilt correctly when functions move between libraries. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('library.gyp', '-Dlibrary=shared_library', '-Dmoveable_function=lib1', chdir='src') test.relocate('src', 'relocate/src') test.build('library.gyp', test.ALL, chdir='relocate/src') expect = """\ Hello from program.c Hello from lib1.c Hello from lib2.c Hello from lib1_moveable.c """ test.run_built_executable('program', chdir='relocate/src', stdout=expect) test.run_gyp('library.gyp', '-Dlibrary=shared_library', '-Dmoveable_function=lib2', chdir='relocate/src') # Update program.c to force a rebuild. test.sleep() contents = test.read('relocate/src/program.c') contents = contents.replace('Hello', 'Hello again') test.write('relocate/src/program.c', contents) test.build('library.gyp', test.ALL, chdir='relocate/src') expect = """\ Hello again from program.c Hello from lib1.c Hello from lib2.c Hello from lib2_moveable.c """ test.run_built_executable('program', chdir='relocate/src', stdout=expect) test.run_gyp('library.gyp', '-Dlibrary=shared_library', '-Dmoveable_function=lib1', chdir='relocate/src') # Update program.c to force a rebuild. test.sleep() contents = test.read('relocate/src/program.c') contents = contents.replace('again', 'again again') test.write('relocate/src/program.c', contents) # TODO(sgk): we have to force a rebuild of lib2 so that it weeds out # the "moved" module. This should be done in gyp by adding a dependency # on the generated .vcproj file itself. test.touch('relocate/src/lib2.c') test.build('library.gyp', test.ALL, chdir='relocate/src') expect = """\ Hello again again from program.c Hello from lib1.c Hello from lib2.c Hello from lib1_moveable.c """ test.run_built_executable('program', chdir='relocate/src', stdout=expect) test.pass_test()