File tree Expand file tree Collapse file tree 6 files changed +106
-1
lines changed
Expand file tree Collapse file tree 6 files changed +106
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ dist_installed_test_data = \
5858 tests/org.test.Deprecated.SHA1.file.yaml \
5959 tests/hello.sh \
6060 tests/hello.tar.xz \
61+ tests/org.flatpak_builder.gui.desktop \
62+ tests/org.flatpak_builder.gui.json \
63+ tests/org.flatpak_builder.gui.metainfo.xml \
6164 $(NULL )
6265
6366installed_test_keyringdir = $(installed_testdir)/test-keyring
Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ if get_option('installed_tests')
105105 ' test-runtime.json' ,
106106 ' test.json' ,
107107 ' test.yaml' ,
108+ ' tests/org.flatpak_builder.gui.desktop' ,
109+ ' tests/org.flatpak_builder.gui.json' ,
110+ ' tests/org.flatpak_builder.gui.metainfo.xml' ,
108111
109112 install_dir : installed_testdir,
110113 install_mode : ' rw-r--r--' ,
Original file line number Diff line number Diff line change 1+ [Desktop Entry]
2+ Name =Example
3+ GenericName =Example
4+ Comment =Example
5+ Exec =hello %U
6+ Icon =org.flatpak_builder.gui
7+ Type =Application
8+ Categories =Network;
9+ Version =1.1
Original file line number Diff line number Diff line change 1+ {
2+ "id" : " org.flatpak_builder.gui" ,
3+ "runtime" : " org.test.Platform" ,
4+ "sdk" : " org.test.Sdk" ,
5+ "command" : " hello" ,
6+ "modules" : [
7+ {
8+ "name" : " hello_gui" ,
9+ "buildsystem" : " simple" ,
10+ "build-commands" : [
11+ " mkdir -p ${FLATPAK_DEST}/bin ${FLATPAK_DEST}/share/metainfo ${FLATPAK_DEST}/share/applications" ,
12+ " mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/64x64/apps" ,
13+ " cp -vf hello.sh ${FLATPAK_DEST}/bin/hello" ,
14+ " cp -vf ${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml" ,
15+ " cp -vf ${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop" ,
16+ " cp -vf org.test.Hello.png ${FLATPAK_DEST}/share/icons/hicolor/64x64/apps/${FLATPAK_ID}.png"
17+ ],
18+ "sources" : [
19+ {
20+ "type" : " script" ,
21+ "dest-filename" : " hello.sh" ,
22+ "commands" : [
23+ " echo \" Hello world, from a sandbox\" "
24+ ]
25+ },
26+ {
27+ "type" : " file" ,
28+ "path" : " org.flatpak_builder.gui.desktop"
29+ },
30+ {
31+ "type" : " file" ,
32+ "path" : " org.flatpak_builder.gui.metainfo.xml"
33+ },
34+ {
35+ "type" : " file" ,
36+ "path" : " org.test.Hello.png"
37+ }
38+ ]
39+ }
40+ ]
41+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <component type =" desktop-application" >
3+ <id >org.flatpak_builder.gui</id >
4+ <launchable type =" desktop-id" >org.flatpak_builder.gui.desktop</launchable >
5+ <metadata_license >CC0-1.0</metadata_license >
6+ <project_license >GPL-2.0+</project_license >
7+ <name >org.flatpak_builder.gui</name >
8+ <developer_name >Flatpak</developer_name >
9+ <summary >Foo foo foo foo</summary >
10+ <url type =" homepage" >https://flatpak.org</url >
11+ <description >
12+ <p >An example desktop application</p >
13+ </description >
14+ <screenshots >
15+ <!-- appstream silently continues without error if the file fails to
16+ download. since the tag only accepts http(s) urls, we add
17+ multiple sources so that in case one link fails, at least one
18+ of the other ones work. Replace with any other screenshot
19+ link if it fails
20+ -->
21+ <screenshot type =" default" >
22+ <caption >An example screenshot</caption >
23+ <image >https://raw.githubusercontent.com/flatpak/flatpak.github.io/0b56895e271bbcc7f86f9570933a96adff99e110/source/img/endless-apps.original.png</image >
24+ </screenshot >
25+ <screenshot >
26+ <caption >An example screenshot</caption >
27+ <image >https://docs.flathub.org/img/card.png</image >
28+ </screenshot >
29+ </screenshots >
30+ <url type =" bugtracker" >https://flatpak.org</url >
31+ <content_rating type =" oars-1.1" />
32+ <releases >
33+ <release version =" 0.0.1" date =" 2020-08-28" />
34+ </releases >
35+ </component >
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ set -euo pipefail
2323
2424skip_without_fuse
2525
26- echo " 1..7 "
26+ echo " 1..8 "
2727
2828setup_repo
2929install_repo
@@ -49,6 +49,10 @@ cp $(dirname $0)/Hello-desktop.appdata.xml .
4949cp $( dirname $0 ) /org.test.Hello.desktop .
5050cp $( dirname $0 ) /org.test.Hello.xml .
5151cp $( dirname $0 ) /org.test.Hello.appdata.xml .
52+ cp $( dirname $0 ) /org.flatpak_builder.gui.desktop .
53+ cp $( dirname $0 ) /org.flatpak_builder.gui.json .
54+ cp $( dirname $0 ) /org.flatpak_builder.gui.metainfo.xml .
55+ cp $( dirname $0 ) /org.test.Hello.png .
5256mkdir include1
5357cp $( dirname $0 ) /module1.json include1/
5458cp $( dirname $0 ) /module1.yaml include1/
@@ -130,3 +134,13 @@ ${FLATPAK_BUILDER} $FL_GPGARGS --repo=$REPO --force-clean runtimedir \
130134 test-runtime.json >&2
131135
132136echo " ok runtime build cleanup with build-args"
137+
138+ # test screenshot ref commit
139+ ${FLATPAK_BUILDER} --repo=$REPO /repo_sc --force-clean builddir_sc \
140+ --mirror-screenshots-url=https://example.org/media \
141+ org.flatpak_builder.gui.json >&2
142+ ostree --repo=$REPO /repo_sc refs| grep -Eq " ^screenshots/$( flatpak --default-arch) $"
143+ ostree checkout --repo=$REPO /repo_sc -U screenshots/$( flatpak --default-arch) outdir_sc
144+ find outdir_sc -path " */screenshots/image-1_orig.png" -type f | grep -q .
145+
146+ echo " ok screenshot ref commit"
You can’t perform that action at this time.
0 commit comments