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 = \
58
58
tests/org.test.Deprecated.SHA1.file.yaml \
59
59
tests/hello.sh \
60
60
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 \
61
64
$(NULL )
62
65
63
66
installed_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')
105
105
' test-runtime.json' ,
106
106
' test.json' ,
107
107
' test.yaml' ,
108
+ ' tests/org.flatpak_builder.gui.desktop' ,
109
+ ' tests/org.flatpak_builder.gui.json' ,
110
+ ' tests/org.flatpak_builder.gui.metainfo.xml' ,
108
111
109
112
install_dir : installed_testdir,
110
113
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
23
23
24
24
skip_without_fuse
25
25
26
- echo " 1..7 "
26
+ echo " 1..8 "
27
27
28
28
setup_repo
29
29
install_repo
@@ -49,6 +49,10 @@ cp $(dirname $0)/Hello-desktop.appdata.xml .
49
49
cp $( dirname $0 ) /org.test.Hello.desktop .
50
50
cp $( dirname $0 ) /org.test.Hello.xml .
51
51
cp $( 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 .
52
56
mkdir include1
53
57
cp $( dirname $0 ) /module1.json include1/
54
58
cp $( dirname $0 ) /module1.yaml include1/
@@ -127,3 +131,13 @@ ${FLATPAK_BUILDER} $FL_GPGARGS --repo=$REPO --force-clean runtimedir \
127
131
test-runtime.json >&2
128
132
129
133
echo " ok runtime build cleanup with build-args"
134
+
135
+ # test screenshot ref commit
136
+ ${FLATPAK_BUILDER} --repo=$REPO /repo_sc --force-clean builddir_sc \
137
+ --mirror-screenshots-url=https://example.org/media \
138
+ org.flatpak_builder.gui.json >&2
139
+ ostree --repo=$REPO /repo_sc refs| grep -Eq " ^screenshots/$( flatpak --default-arch) $"
140
+ ostree checkout --repo=$REPO /repo_sc -U screenshots/$( flatpak --default-arch) outdir_sc
141
+ find outdir_sc -path " */screenshots/image-1_orig.png" -type f | grep -q .
142
+
143
+ echo " ok screenshot ref commit"
You can’t perform that action at this time.
0 commit comments