-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
summary: Build and run a basic qt 6.5 snap using extensions | ||
|
||
systems: | ||
- ubuntu-22.04 | ||
- ubuntu-22.04-64 | ||
- ubuntu-22.04-amd64 | ||
|
||
environment: | ||
SNAP_DIR: ../snaps/qt6-6-hello | ||
|
||
prepare: | | ||
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh | ||
. "$TOOLS_DIR/snapcraft-yaml.sh" | ||
set_base "$SNAP_DIR/snap/snapcraft.yaml" | ||
restore: | | ||
cd "$SNAP_DIR" | ||
snapcraft clean | ||
rm -f ./*.snap | ||
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh | ||
. "$TOOLS_DIR/snapcraft-yaml.sh" | ||
restore_yaml "snap/snapcraft.yaml" | ||
execute: | | ||
cd "$SNAP_DIR" | ||
output="$(snapcraft)" | ||
snap install qt6-6-hello_*.snap --dangerous | ||
[ "$(qt6-6-hello)" = "hello world" ] | ||
# Verify that the extension command chain went through the proper setup procedure | ||
snap_user_data="$HOME/snap/qt6-6-hello/current" | ||
[ -d "$snap_user_data/.config" ] | ||
[ -d "$snap_user_data/.local" ] | ||
[ -f "$snap_user_data/.last_revision" ] | ||
[ "$(cat "$snap_user_data/.last_revision")" = "SNAP_DESKTOP_LAST_REVISION=x1" ] | ||
# 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-6-core22 | ||
fi | ||
# Verify all dependencies were found. | ||
if echo "$output" | grep -q "part is missing libraries"; then | ||
echo "failed to find content snaps' libraries" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
project(hello) | ||
|
||
set (QT_MIN_VERSION "6.5.0") | ||
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core) | ||
|
||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") | ||
|
||
add_executable(hello hello.cpp) | ||
target_include_directories(hello PRIVATE ${Qt6Core_INCLUDE_DIRS}) | ||
target_link_libraries(hello PRIVATE Qt6::Core) | ||
|
||
install(TARGETS hello RUNTIME DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <QString> | ||
#include <iostream> | ||
|
||
int main() | ||
{ | ||
QString s("hello world"); | ||
std::cout << s.toUtf8().constData() << std::endl; | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/spread/extensions/snaps/qt6-6-hello/snap/snapcraft.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: qt6-6-hello | ||
version: "1.0" | ||
summary: Test the qt6-6 extension | ||
description: It simply prints a hello world | ||
|
||
grade: devel | ||
confinement: strict | ||
|
||
apps: | ||
qt6-6-hello: | ||
command: usr/local/bin/hello | ||
extensions: [qt6-6] | ||
|
||
parts: | ||
hello: | ||
plugin: cmake | ||
source: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters