Skip to content

Commit

Permalink
tests: Test appdata installation
Browse files Browse the repository at this point in the history
Signed-off-by: Guido Günther <agx@sigxcpu.org>
  • Loading branch information
agx committed Jul 26, 2021
1 parent 0535a54 commit 0c646ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/make-test-app.sh
Expand Up @@ -113,9 +113,8 @@ mkdir -p ${DIR}/files/share/icons/HighContrast/64x64/apps
cp $(dirname $0)/org.test.Hello.png ${DIR}/files/share/icons/HighContrast/64x64/apps/${APP_ID}.png


mkdir -p ${DIR}/files/share/app-info/xmls
mkdir -p ${DIR}/files/share/app-info/icons/flatpak/64x64
gzip -c > ${DIR}/files/share/app-info/xmls/${APP_ID}.xml.gz <<EOF
mkdir -p ${DIR}/files/share/appdata
cat <<EOF > ${DIR}/files/share/appdata/${APP_ID}.xml
<?xml version="1.0" encoding="UTF-8"?>
<components version="0.8">
<component type="desktop">
Expand All @@ -133,6 +132,9 @@ gzip -c > ${DIR}/files/share/app-info/xmls/${APP_ID}.xml.gz <<EOF
</component>
</components>
EOF
mkdir -p ${DIR}/files/share/app-info/xmls
mkdir -p ${DIR}/files/share/app-info/icons/flatpak/64x64
gzip -c ${DIR}/files/share/appdata/${APP_ID}.xml > ${DIR}/files/share/app-info/xmls/${APP_ID}.xml.gz
cp $(dirname $0)/org.test.Hello.png ${DIR}/files/share/app-info/icons/flatpak/64x64/${APP_ID}.png

if [ x$COLLECTION_ID != x ]; then
Expand Down
1 change: 1 addition & 0 deletions tests/test-run.sh
Expand Up @@ -44,6 +44,7 @@ assert_has_file $FL_DIR/app/org.test.Hello/$ARCH/stable/active/metadata
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/export
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
assert_has_file $FL_DIR/exports/share/appdata/org.test.Hello.xml
# Ensure Exec key is rewritten
assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
assert_has_file $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini
Expand Down

0 comments on commit 0c646ee

Please sign in to comment.