Skip to content

Commit

Permalink
update with 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Nov 20, 2024
1 parent 86e3c92 commit 115f452
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 276 deletions.
3 changes: 1 addition & 2 deletions schema/snapcraft.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,7 @@
"gnome-3-34",
"gnome-3-38",
"kde-neon",
"qt5-15",
"qt6-5",
"qt6-8",
"ros1-noetic",
"ros1-noetic-desktop",
"ros1-noetic-perception",
Expand Down
10 changes: 3 additions & 7 deletions snapcraft/extensions/qt_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@

from .extension import Extension, prepend_to_env

_SDK_SNAP = {"core22": "qt-framework-sdk"}

_CONTENT_SNAP = {
"qt6-6": {"core22": "qt-framework-6-6-core22"},
"qt6-5": {"core22": "qt-framework-6-5-core22"},
"qt5-15": {"core22": "qt-framework-5-15-core22"},
"qt6-8": "qt-framework-6-8",
}


Expand Down Expand Up @@ -100,7 +96,7 @@ def get_app_snippet(self) -> Dict[str, Any]:
def qt_snaps(self) -> QTSnaps:
"""Return the QT related snaps to use to construct the environment."""
base = self.yaml_data["base"]
sdk_snap = _SDK_SNAP[base]
sdk_snap = "qt-framework-sdk"
sdk_channel = f"{self.name[2:].replace('-','.')}/stable"

build_snaps: List[str] = []
Expand All @@ -121,7 +117,7 @@ def qt_snaps(self) -> QTSnaps:
sdk = {"snap": sdk_snap, "channel": sdk_channel}

# The same except the trailing -sd
content = _CONTENT_SNAP[self.name][base]
content = _CONTENT_SNAP[self.name]

return QTSnaps(sdk=sdk, content=content, builtin=builtin)

Expand Down
7 changes: 1 addition & 6 deletions snapcraft/extensions/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@

from .gnome import GNOME
from .kde_neon import KDENeon
<<<<<<< HEAD
from .kde_neon_6 import KDENeon6
=======
from .qt_framework import QTFramework
>>>>>>> 36e75bee (Add QT extension)
from .ros2_humble import ROS2HumbleExtension
from .ros2_humble_desktop import ROS2HumbleDesktopExtension
from .ros2_humble_ros_base import ROS2HumbleRosBaseExtension
Expand All @@ -53,9 +50,7 @@
"ros2-jazzy-desktop": ROS2JazzyDesktopExtension,
"kde-neon": KDENeon,
"kde-neon-6": KDENeon6,
"qt6-6": QTFramework,
"qt6-5": QTFramework,
"qt5-15": QTFramework,
"qt6-8": QTFramework,
}


Expand Down
51 changes: 0 additions & 51 deletions tests/spread/extensions/qt5-15/task.yaml

This file was deleted.

51 changes: 0 additions & 51 deletions tests/spread/extensions/qt6-6/task.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ systems:
- ubuntu-22.04-amd64

environment:
SNAP_DIR: ../snaps/qt6-5-hello
SNAP_DIR: ../snaps/qt6-8-hello

prepare: |
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh
Expand All @@ -25,12 +25,12 @@ restore: |
execute: |
cd "$SNAP_DIR"
output="$(snapcraft)"
snap install qt6-5-hello_*.snap --dangerous
snap install qt6-8-hello_*.snap --dangerous
[ "$(qt6-5-hello)" = "hello world" ]
[ "$(qt6-8-hello)" = "hello world" ]
# Verify that the extension command chain went through the proper setup procedure
snap_user_data="$HOME/snap/qt6-5-hello/current"
snap_user_data="$HOME/snap/qt6-8-hello/current"
[ -d "$snap_user_data/.config" ]
[ -d "$snap_user_data/.local" ]
[ -f "$snap_user_data/.last_revision" ]
Expand All @@ -40,7 +40,7 @@ execute: |
# Verify content snap was installed for dependency checks.
snap list gtk-common-themes
if [[ "$SPREAD_SYSTEM" =~ ubuntu-22.04 ]]; then
snap list qt-framework-6-5-core22
snap list qt-framework-6-8-core22
fi
Expand Down
13 changes: 0 additions & 13 deletions tests/spread/extensions/snaps/qt5-15-hello/CMakeLists.txt

This file was deleted.

23 changes: 0 additions & 23 deletions tests/spread/extensions/snaps/qt5-15-hello/snap/snapcraft.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions tests/spread/extensions/snaps/qt6-5-hello/CMakeLists.txt

This file was deleted.

8 changes: 0 additions & 8 deletions tests/spread/extensions/snaps/qt6-5-hello/hello.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions tests/spread/extensions/snaps/qt6-5-hello/snap/snapcraft.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions tests/spread/extensions/snaps/qt6-6-hello/hello.cpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(hello)

set (QT_MIN_VERSION "6.5.0")
set (QT_MIN_VERSION "6.8.0")
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: qt6-6-hello
name: qt6-8-hello
version: "1.0"
summary: Test the qt6-6 extension
summary: Test the qt6-8 extension
description: It simply prints a hello world

base: core22
Expand All @@ -10,7 +10,7 @@ confinement: strict
apps:
qt6-6-hello:
command: usr/local/bin/hello
extensions: [qt6-6]
extensions: [qt6-8]

parts:
hello:
Expand Down
8 changes: 2 additions & 6 deletions tests/unit/commands/test_list_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ def test_command(emitter, command):
gnome-3-38 core20
kde-neon core18, core20, core22
kde-neon-6 core22
qt5-15 core22
qt6-5 core22
qt6-6 core22
qt6-8 core22, core24
ros1-noetic core20
ros1-noetic-desktop core20
ros1-noetic-perception core20
Expand Down Expand Up @@ -100,9 +98,7 @@ def test_command_extension_dups(emitter, command):
gnome-3-38 core20
kde-neon core18, core20, core22
kde-neon-6 core22
qt5-15 core22
qt6-5 core22
qt6-6 core22
qt6-8 core22, core24
ros1-noetic core20
ros1-noetic-desktop core20
ros1-noetic-perception core20
Expand Down
Loading

0 comments on commit 115f452

Please sign in to comment.