Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial version of regression test framework #1115

Draft
wants to merge 1 commit into
base: develop-v1.18.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# see here: https://stackoverflow.com/questions/7335420/global-git-ignore

build
regression/*/__pycache__/
third-party/SVT-AV1/
third-party/dav1d/
third-party/libwebp/
third-party/rav1e/

4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ endif()

add_subdirectory (gnome)

option(ENABLE_REGRESSION "Enable regression test framework (requires downloads)" OFF)
if (ENABLE_REGRESSION)
add_subdirectory(regression)
endif()

# --- packaging (source code)

Expand Down
24 changes: 24 additions & 0 deletions regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
set(pytest_url https://github.com/buddly27/pytest-cmake/archive/main.zip)

# Fetch CMake files from the main branch of the Github repository
file(DOWNLOAD ${pytest_url} ${CMAKE_BINARY_DIR}/regression/pytest.zip)
file(
ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/regression/pytest.zip
DESTINATION ${CMAKE_BINARY_DIR}/regression
PATTERNS "*.cmake"
)

# Expand the module path variable to discover the `FindPytest.cmake` module.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR}/regression/pytest-cmake-main/cmake)

find_package(Pytest REQUIRED)

set(TESTING_DATA_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data")
configure_file(test_data.json.in ${CMAKE_BINARY_DIR}/regression/test_data.json)
configure_file(version.json.in ${CMAKE_BINARY_DIR}/regression/version.json)

add_test(
NAME Regression
COMMAND Pytest::Pytest ${CMAKE_CURRENT_SOURCE_DIR}
)

94 changes: 94 additions & 0 deletions regression/data/conformance_files_expected_dump/C001.heic.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Box: ftyp -----
size: 36 (header size: 8)
major brand: msf1
minor version: 0
compatible brands: msf1,hevc,heic,mif1,iso8

Box: meta -----
size: 303 (header size: 12)
| Box: hdlr -----
| size: 33 (header size: 12)
| pre_defined: 0
| handler_type: pict
| name:
|
| Box: pitm -----
| size: 14 (header size: 12)
| item_ID: 1018
|
| Box: iloc -----
| size: 34 (header size: 12)
| item ID: 1018
| construction method: 0
| data_reference_index: 0
| base_offset: 1083
| extents: 16,111554
|
| Box: iinf -----
| size: 45 (header size: 12)
| | Box: infe -----
| | size: 31 (header size: 12)
| | item_ID: 1018
| | item_protection_index: 0
| | item_type: hvc1
| | item_name: HEVC Image
| | content_type:
| | content_encoding:
| | item uri type:
| | hidden item: false
|
| Box: iprp -----
| size: 165 (header size: 8)
| | Box: ipco -----
| | size: 136 (header size: 8)
| | | Box: hvcC -----
| | | size: 108 (header size: 8)
| | | configuration_version: 1
| | | general_profile_space: 0
| | | general_tier_flag: 0
| | | general_profile_idc: 1
| | | general_profile_compatibility_flags: 0110.0000 0000.0000 0000.0000 0000.0000
| | | general_constraint_indicator_flags: 00000000 00000000 00000000 00000000 00000000 00000000
| | | general_level_idc: 120
| | | min_spatial_segmentation_idc: 0
| | | parallelism_type: 0
| | | chroma_format: 4:2:0
| | | bit_depth_luma: 8
| | | bit_depth_chroma: 8
| | | avg_frame_rate: 0
| | | constant_frame_rate: 0
| | | num_temporal_layers: 1
| | | temporal_id_nested: 1
| | | length_size: 4
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 32
| | | | 40 01 0c 01 ff ff 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 f0 24
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 33
| | | | 42 01 01 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 a0 02 80 80 2d 1f e5 f9 24 6d 9e d9
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 34
| | | | 44 01 c1 90 95 81 12
| | |
| | | Box: ispe -----
| | | size: 20 (header size: 12)
| | | image width: 1280
| | | image height: 720
| |
| | Box: ipma -----
| | size: 21 (header size: 12)
| | associations for item ID: 1018
| | | property index: 1 (essential: true)
| | | property index: 2 (essential: false)

Box: moov -----
size: 744 (header size: 8)

Box: mdat -----
size: 892646 (header size: 16)
MIME type: image/heif-sequence
main brand: msf1
compatible brands: msf1, hevc, heic, mif1, iso8
91 changes: 91 additions & 0 deletions regression/data/conformance_files_expected_dump/C002.heic.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Box: ftyp -----
size: 24 (header size: 8)
major brand: mif1
minor version: 0
compatible brands: heic,mif1

Box: meta -----
size: 303 (header size: 12)
| Box: hdlr -----
| size: 33 (header size: 12)
| pre_defined: 0
| handler_type: pict
| name:
|
| Box: pitm -----
| size: 14 (header size: 12)
| item_ID: 1002
|
| Box: iloc -----
| size: 34 (header size: 12)
| item ID: 1002
| construction method: 0
| data_reference_index: 0
| base_offset: 327
| extents: 16,111554
|
| Box: iinf -----
| size: 45 (header size: 12)
| | Box: infe -----
| | size: 31 (header size: 12)
| | item_ID: 1002
| | item_protection_index: 0
| | item_type: hvc1
| | item_name: HEVC Image
| | content_type:
| | content_encoding:
| | item uri type:
| | hidden item: false
|
| Box: iprp -----
| size: 165 (header size: 8)
| | Box: ipco -----
| | size: 136 (header size: 8)
| | | Box: hvcC -----
| | | size: 108 (header size: 8)
| | | configuration_version: 1
| | | general_profile_space: 0
| | | general_tier_flag: 0
| | | general_profile_idc: 1
| | | general_profile_compatibility_flags: 0110.0000 0000.0000 0000.0000 0000.0000
| | | general_constraint_indicator_flags: 00000000 00000000 00000000 00000000 00000000 00000000
| | | general_level_idc: 120
| | | min_spatial_segmentation_idc: 0
| | | parallelism_type: 0
| | | chroma_format: 4:2:0
| | | bit_depth_luma: 8
| | | bit_depth_chroma: 8
| | | avg_frame_rate: 0
| | | constant_frame_rate: 0
| | | num_temporal_layers: 1
| | | temporal_id_nested: 1
| | | length_size: 4
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 32
| | | | 40 01 0c 01 ff ff 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 f0 24
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 33
| | | | 42 01 01 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 a0 02 80 80 2d 1f e5 f9 24 6d 9e d9
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 34
| | | | 44 01 c1 90 95 81 12
| | |
| | | Box: ispe -----
| | | size: 20 (header size: 12)
| | | image width: 1280
| | | image height: 720
| |
| | Box: ipma -----
| | size: 21 (header size: 12)
| | associations for item ID: 1002
| | | property index: 1 (essential: true)
| | | property index: 2 (essential: false)

Box: mdat -----
size: 111570 (header size: 16)
MIME type: image/heif
main brand: mif1
compatible brands: heic, mif1
142 changes: 142 additions & 0 deletions regression/data/conformance_files_expected_dump/C003.heic.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
Box: ftyp -----
size: 24 (header size: 8)
major brand: mif1
minor version: 0
compatible brands: heic,mif1

Box: meta -----
size: 465 (header size: 12)
| Box: hdlr -----
| size: 33 (header size: 12)
| pre_defined: 0
| handler_type: pict
| name:
|
| Box: pitm -----
| size: 14 (header size: 12)
| item_ID: 1002
|
| Box: iloc -----
| size: 52 (header size: 12)
| item ID: 1002
| construction method: 0
| data_reference_index: 0
| base_offset: 489
| extents: 16,111554
| item ID: 1005
| construction method: 0
| data_reference_index: 0
| base_offset: 489
| extents: 111570,112393
|
| Box: iinf -----
| size: 76 (header size: 12)
| | Box: infe -----
| | size: 31 (header size: 12)
| | item_ID: 1002
| | item_protection_index: 0
| | item_type: hvc1
| | item_name: HEVC Image
| | content_type:
| | content_encoding:
| | item uri type:
| | hidden item: false
| |
| | Box: infe -----
| | size: 31 (header size: 12)
| | item_ID: 1005
| | item_protection_index: 0
| | item_type: hvc1
| | item_name: HEVC Image
| | content_type:
| | content_encoding:
| | item uri type:
| | hidden item: false
|
| Box: iprp -----
| size: 278 (header size: 8)
| | Box: ipco -----
| | size: 244 (header size: 8)
| | | Box: hvcC -----
| | | size: 108 (header size: 8)
| | | configuration_version: 1
| | | general_profile_space: 0
| | | general_tier_flag: 0
| | | general_profile_idc: 1
| | | general_profile_compatibility_flags: 0110.0000 0000.0000 0000.0000 0000.0000
| | | general_constraint_indicator_flags: 00000000 00000000 00000000 00000000 00000000 00000000
| | | general_level_idc: 120
| | | min_spatial_segmentation_idc: 0
| | | parallelism_type: 0
| | | chroma_format: 4:2:0
| | | bit_depth_luma: 8
| | | bit_depth_chroma: 8
| | | avg_frame_rate: 0
| | | constant_frame_rate: 0
| | | num_temporal_layers: 1
| | | temporal_id_nested: 1
| | | length_size: 4
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 32
| | | | 40 01 0c 01 ff ff 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 f0 24
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 33
| | | | 42 01 01 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 a0 02 80 80 2d 1f e5 f9 24 6d 9e d9
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 34
| | | | 44 01 c1 90 95 81 12
| | |
| | | Box: ispe -----
| | | size: 20 (header size: 12)
| | | image width: 1280
| | | image height: 720
| | |
| | | Box: hvcC -----
| | | size: 108 (header size: 8)
| | | configuration_version: 1
| | | general_profile_space: 0
| | | general_tier_flag: 0
| | | general_profile_idc: 1
| | | general_profile_compatibility_flags: 0110.0000 0000.0000 0000.0000 0000.0000
| | | general_constraint_indicator_flags: 00000000 00000000 00000000 00000000 00000000 00000000
| | | general_level_idc: 120
| | | min_spatial_segmentation_idc: 0
| | | parallelism_type: 0
| | | chroma_format: 4:2:0
| | | bit_depth_luma: 8
| | | bit_depth_chroma: 8
| | | avg_frame_rate: 0
| | | constant_frame_rate: 0
| | | num_temporal_layers: 1
| | | temporal_id_nested: 1
| | | length_size: 4
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 32
| | | | 40 01 0c 01 ff ff 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 f0 24
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 33
| | | | 42 01 01 01 60 00 00 03 00 00 03 00 00 03 00 00 03 00 78 a0 02 80 80 2d 1f e5 f9 24 6d 9e d9
| | | <array>
| | | | array_completeness: 0
| | | | NAL_unit_type: 34
| | | | 44 01 c1 90 95 81 12
| |
| | Box: ipma -----
| | size: 26 (header size: 12)
| | associations for item ID: 1002
| | | property index: 1 (essential: true)
| | | property index: 2 (essential: false)
| | associations for item ID: 1005
| | | property index: 3 (essential: true)
| | | property index: 2 (essential: false)

Box: mdat -----
size: 223963 (header size: 16)
MIME type: image/heif
main brand: mif1
compatible brands: heic, mif1
Loading