Skip to content

Commit

Permalink
propagate build type through ctest and go back to stripping the strip…
Browse files Browse the repository at this point in the history
…_parameter_set_nalus test if shared, for now
  • Loading branch information
cosmin committed Apr 3, 2024
1 parent a9d3e75 commit 0e60e6f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 5 additions & 0 deletions packager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ if(NOT SKIP_INTEGRATION_TESTS)
set(test_environment_vars "PACKAGER_SRC_DIR=${CMAKE_SOURCE_DIR}")
list(APPEND test_environment_vars "PACKAGER_BIN=$<TARGET_FILE:packager>")
list(APPEND test_environment_vars "MPD_GENERATOR_BIN=$<TARGET_FILE:mpd_generator>")
if(BUILD_SHARED_LIBS)
list(APPEND test_environment_vars "BUILD_TYPE=shared")
else()
list(APPEND test_environment_vars "BUILD_TYPE=static")
endif()

set_tests_properties(packager_test_py PROPERTIES
ENVIRONMENT "${test_environment_vars}"
Expand Down
2 changes: 1 addition & 1 deletion packager/app/test/packager_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self):
def GetEnv(self):
env = os.environ.copy()
if (platform.system() == 'Darwin' and
test_env.options.libpackager_type == 'shared_library'):
test_env.BUILD_TYPE == 'shared'):
env['DYLD_FALLBACK_LIBRARY_PATH'] = test_env.SCRIPT_DIR
return env

Expand Down
4 changes: 2 additions & 2 deletions packager/app/test/packager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1514,8 +1514,8 @@ def testWvmInput(self):

# TODO(kqyang): Fix shared_library not supporting strip_parameter_set_nalus
# problem.
@unittest.skipUnless(
test_env.options.libpackager_type == 'static_library',
@unittest.skipIf(
test_env.BUILD_TYPE == 'shared',
'libpackager shared_library does not support '
'--strip_parameter_set_nalus flag.'
)
Expand Down
6 changes: 2 additions & 4 deletions packager/app/test/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ def GetBinaryName(name):
MPD_GENERATOR_BIN = os.path.join(SCRIPT_DIR,
GetBinaryName('mpd_generator'))

BUILD_TYPE = os.environ.get('BUILD_TYPE', 'static')

# Parse arguments and calculate dynamic global objects and attributes.
parser = argparse.ArgumentParser()

parser.add_argument('--test_update_golden_files', action='store_true')

parser.add_argument('--libpackager_type', default='static_library',
choices=['static_library', 'shared_library'])

parser.add_argument('--v')
parser.add_argument('--vmodule')
# Overwrite the test to encryption key/iv specified in the command line.
Expand Down

0 comments on commit 0e60e6f

Please sign in to comment.