tests: Test appdata installation

Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
Guido Günther
2021-07-26 12:28:53 +02:00
committed by Alexander Larsson
parent 766bf5f08a
commit f759a7dd27
2 changed files with 6 additions and 3 deletions

View File

@@ -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">
@@ -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

View File

@@ -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