Skip to content

Commit

Permalink
neon extension: new content snap
Browse files Browse the repository at this point in the history
Co-authored-by: Sergio Schvezov <[email protected]>
Co-authored-by: Alex Lowe <[email protected]>
  • Loading branch information
3 people authored Aug 23, 2023
1 parent da90067 commit 20696c8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion snapcraft/extensions/kde_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from .extension import Extension, get_extensions_data_dir, prepend_to_env

_SDK_SNAP = {"core22": "kf5-5-105-qt-5-15-9-core22-sdk"}
_SDK_SNAP = {"core22": "kf5-5-108-qt-5-15-10-core22-sdk"}


@dataclasses.dataclass
Expand Down
2 changes: 1 addition & 1 deletion tests/spread/extensions/kde-neon/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ execute: |
if [[ "$SPREAD_SYSTEM" =~ ubuntu-20.04 ]]; then
snap list kde-frameworks-5-99-qt-5-15-7-core20
elif [[ "$SPREAD_SYSTEM" =~ ubuntu-22.04 ]]; then
snap list kf5-5-105-qt-5-15-9-core22
snap list kf5-5-108-qt-5-15-10-core22
fi
Expand Down
38 changes: 20 additions & 18 deletions tests/unit/extensions/test_kde_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def kde_neon_extension_with_build_snap():
"base": "core22",
"parts": {
"part1": {
"build-snaps": ["kf5-5-105-qt-5-15-9-core22-sdk/latest/stable"]
"build-snaps": ["kf5-5-108-qt-5-15-10-core22-sdk/latest/stable"]
}
},
},
Expand All @@ -53,7 +53,9 @@ def kde_neon_extension_with_default_build_snap_from_latest_edge():
yaml_data={
"base": "core22",
"parts": {
"part1": {"build-snaps": ["kf5-5-105-qt-5-15-9-core22-sdk/latest/edge"]}
"part1": {
"build-snaps": ["kf5-5-108-qt-5-15-10-core22-sdk/latest/edge"]
}
},
},
arch="amd64",
Expand Down Expand Up @@ -109,10 +111,10 @@ def test_get_root_snippet(kde_neon_extension):
"target": "$SNAP/data-dir/sounds",
"default-provider": "gtk-common-themes",
},
"kf5-5-105-qt-5-15-9-core22": {
"content": "kf5-5-105-qt-5-15-9-core22-all",
"kf5-5-108-qt-5-15-10-core22": {
"content": "kf5-5-108-qt-5-15-10-core22-all",
"interface": "content",
"default-provider": "kf5-5-105-qt-5-15-9-core22",
"default-provider": "kf5-5-108-qt-5-15-10-core22",
"target": "$SNAP/kf5",
},
},
Expand Down Expand Up @@ -143,10 +145,10 @@ def test_get_root_snippet_with_external_sdk(kde_neon_extension_with_build_snap):
"target": "$SNAP/data-dir/sounds",
"default-provider": "gtk-common-themes",
},
"kf5-5-105-qt-5-15-9-core22": {
"content": "kf5-5-105-qt-5-15-9-core22-all",
"kf5-5-108-qt-5-15-10-core22": {
"content": "kf5-5-108-qt-5-15-10-core22-all",
"interface": "content",
"default-provider": "kf5-5-105-qt-5-15-9-core22",
"default-provider": "kf5-5-108-qt-5-15-10-core22",
"target": "$SNAP/kf5",
},
},
Expand All @@ -172,19 +174,19 @@ def assert_get_part_snippet(kde_neon_instance):
"build-environment": [
{
"PATH": (
"/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/bin${PATH:+:$PATH}"
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current/usr/bin${PATH:+:$PATH}"
)
},
{
"XDG_DATA_DIRS": (
"$CRAFT_STAGE/usr/share:/snap/kf5-5-105-qt-5-15-9-core22-sdk"
"$CRAFT_STAGE/usr/share:/snap/kf5-5-108-qt-5-15-10-core22-sdk"
"/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
)
},
{
"SNAPCRAFT_CMAKE_ARGS": (
"-DCMAKE_FIND_ROOT_PATH="
"/snap/kf5-5-105-qt-5-15-9-core22-sdk/current"
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current"
"${SNAPCRAFT_CMAKE_ARGS:+:$SNAPCRAFT_CMAKE_ARGS}"
)
},
Expand All @@ -197,20 +199,20 @@ def test_get_part_snippet_with_external_sdk(kde_neon_extension_with_build_snap):
"build-environment": [
{
"PATH": (
"/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/"
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current/"
"usr/bin${PATH:+:$PATH}"
)
},
{
"XDG_DATA_DIRS": (
"$CRAFT_STAGE/usr/share:/snap/kf5-5-105-qt-5-15-9-core22-sdk"
"$CRAFT_STAGE/usr/share:/snap/kf5-5-108-qt-5-15-10-core22-sdk"
"/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
)
},
{
"SNAPCRAFT_CMAKE_ARGS": (
"-DCMAKE_FIND_ROOT_PATH="
"/snap/kf5-5-105-qt-5-15-9-core22-sdk/current"
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current"
"${SNAPCRAFT_CMAKE_ARGS:+:$SNAPCRAFT_CMAKE_ARGS}"
)
},
Expand All @@ -225,8 +227,8 @@ def test_get_parts_snippet(kde_neon_extension):
"kde-neon/sdk": {
"source": str(source),
"plugin": "make",
"make-parameters": ["PLATFORM_PLUG=kf5-5-105-qt-5-15-9-core22"],
"build-snaps": ["kf5-5-105-qt-5-15-9-core22-sdk"],
"make-parameters": ["PLATFORM_PLUG=kf5-5-108-qt-5-15-10-core22"],
"build-snaps": ["kf5-5-108-qt-5-15-10-core22-sdk"],
}
}

Expand All @@ -238,7 +240,7 @@ def test_get_parts_snippet_with_external_sdk(kde_neon_extension_with_build_snap)
"kde-neon/sdk": {
"source": str(source),
"plugin": "make",
"make-parameters": ["PLATFORM_PLUG=kf5-5-105-qt-5-15-9-core22"],
"make-parameters": ["PLATFORM_PLUG=kf5-5-108-qt-5-15-10-core22"],
}
}

Expand All @@ -253,7 +255,7 @@ def test_get_parts_snippet_with_external_sdk_different_channel(
"kde-neon/sdk": {
"source": str(source),
"plugin": "make",
"make-parameters": ["PLATFORM_PLUG=kf5-5-105-qt-5-15-9-core22"],
"make-parameters": ["PLATFORM_PLUG=kf5-5-108-qt-5-15-10-core22"],
}
}
)

0 comments on commit 20696c8

Please sign in to comment.