[gnome-software/uajain/sync-back-installed-apps-state: 5/7] flatpak: Enable tests related to extensions



commit 03afdf72a9d4c641bece2242a6c78f721dab8464
Author: Umang Jain <mailumangjain gmail com>
Date:   Mon Dec 2 22:38:44 2019 +0530

    flatpak: Enable tests related to extensions
    
    Tests were skipped in 15c6a8d15 due to missing files. Add the files,
    so that the tests can be re-enabled again.

 .../org.test.Chiron.Extension/files/.empty         |   0
 .../org.test.Chiron.Extension/metadata             |   6 +++++
 .../org.test.Chiron.Extension/usr/.gitignore       |   1 +
 .../usr/share/libtest/README                       |   1 +
 .../org.test.Chiron.Extension.metainfo.xml         |  12 +++++++++
 .../org.test.Chiron.Extension/files/.empty         |   0
 .../org.test.Chiron.Extension/metadata             |   6 +++++
 .../org.test.Chiron.Extension/usr/.gitignore       |   1 +
 .../usr/share/libtest/README                       |   0
 .../org.test.Chiron.Extension.metainfo.xml         |  12 +++++++++
 .../tests/app-extension/org.test.Chiron/.gitignore |   2 ++
 .../org.test.Chiron/files/bin/chiron.sh            |   2 ++
 .../share/appdata/org.test.Chiron.appdata.xml      |  16 ++++++++++++
 .../share/applications/org.test.Chiron.desktop     |   6 +++++
 .../icons/hicolor/128x128/apps/org.test.Chiron.png | Bin 0 -> 334 bytes
 .../tests/app-extension/org.test.Chiron/metadata   |  10 ++++++++
 plugins/flatpak/tests/build.py                     |  28 ++++++++++-----------
 plugins/flatpak/tests/flatpakrepos.tar.gz          | Bin 34594 -> 59930 bytes
 plugins/flatpak/tests/meson.build                  |   2 ++
 19 files changed, 91 insertions(+), 14 deletions(-)
---
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/.empty 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/files/.empty
new file mode 100644
index 00000000..e69de29b
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/metadata 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/metadata
new file mode 100644
index 00000000..d81f8f90
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/metadata
@@ -0,0 +1,6 @@
+[Runtime]
+name=org.test.Chiron.Extension
+sdk=org.test.Runtime/x86_64/master
+
+[ExtensionOf]
+ref=app/org.test.Chiron/x86_64/master
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/.gitignore 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/.gitignore
new file mode 100644
index 00000000..3600b9cf
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/.gitignore
@@ -0,0 +1 @@
+app-info
diff --git a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/libtest/README 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/libtest/README
new file mode 100644
index 00000000..a0b97030
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/libtest/README
@@ -0,0 +1 @@
+UPDATED!
\ No newline at end of file
diff --git 
a/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
new file mode 100644
index 00000000..d884539f
--- /dev/null
+++ 
b/plugins/flatpak/tests/app-extension-update/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2017 Endless Mobile, Inc.
+     Author: Joaquim Rocha <jrocha endlessm com>
+-->
+<component type="runtime">
+  <id>org.test.Chiron.Extension</id>
+  <metadata_license>CC0</metadata_license>
+  <project_license>GPL-2.0+</project_license>
+  <name>Chiron App Extension</name>
+  <summary>Test extension for flatpak self tests</summary>
+</component>
+
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/.empty 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/files/.empty
new file mode 100644
index 00000000..e69de29b
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/metadata 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/metadata
new file mode 100644
index 00000000..d81f8f90
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/metadata
@@ -0,0 +1,6 @@
+[Runtime]
+name=org.test.Chiron.Extension
+sdk=org.test.Runtime/x86_64/master
+
+[ExtensionOf]
+ref=app/org.test.Chiron/x86_64/master
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/.gitignore 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/.gitignore
new file mode 100644
index 00000000..3600b9cf
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/.gitignore
@@ -0,0 +1 @@
+app-info
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/libtest/README 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/libtest/README
new file mode 100644
index 00000000..e69de29b
diff --git 
a/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
new file mode 100644
index 00000000..d884539f
--- /dev/null
+++ 
b/plugins/flatpak/tests/app-extension/org.test.Chiron.Extension/usr/share/metainfo/org.test.Chiron.Extension.metainfo.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2017 Endless Mobile, Inc.
+     Author: Joaquim Rocha <jrocha endlessm com>
+-->
+<component type="runtime">
+  <id>org.test.Chiron.Extension</id>
+  <metadata_license>CC0</metadata_license>
+  <project_license>GPL-2.0+</project_license>
+  <name>Chiron App Extension</name>
+  <summary>Test extension for flatpak self tests</summary>
+</component>
+
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron/.gitignore 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/.gitignore
new file mode 100644
index 00000000..fea15c05
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron/.gitignore
@@ -0,0 +1,2 @@
+export
+files/share/app-info
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron/files/bin/chiron.sh 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/bin/chiron.sh
new file mode 100755
index 00000000..e61d5019
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/bin/chiron.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Hello world"
diff --git 
a/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/appdata/org.test.Chiron.appdata.xml 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/appdata/org.test.Chiron.appdata.xml
new file mode 100644
index 00000000..0d912a89
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/appdata/org.test.Chiron.appdata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2016 Richard Hughes <richard hughsie com> -->
+<component type="desktop">
+  <id>org.test.Chiron.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>GPL-2.0+</project_license>
+  <name>Chiron</name>
+  <summary>Single line synopsis</summary>
+  <description><p>Long description.</p></description>
+  <url type="homepage">http://127.0.0.1/</url>
+  <releases>
+    <release date="2014-12-15" version="1.2.3">
+      <description><p>This is better.</p></description>
+    </release>
+  </releases>
+</component>
diff --git 
a/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/applications/org.test.Chiron.desktop 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/applications/org.test.Chiron.desktop
new file mode 100644
index 00000000..2fbdf959
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/applications/org.test.Chiron.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Chiron
+Exec=chiron.sh
+Icon=org.test.Chiron
+Keywords=Bingo;
diff --git 
a/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/icons/hicolor/128x128/apps/org.test.Chiron.png
 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/icons/hicolor/128x128/apps/org.test.Chiron.png
new file mode 100644
index 00000000..0c38f2f6
Binary files /dev/null and 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/files/share/icons/hicolor/128x128/apps/org.test.Chiron.png
 differ
diff --git a/plugins/flatpak/tests/app-extension/org.test.Chiron/metadata 
b/plugins/flatpak/tests/app-extension/org.test.Chiron/metadata
new file mode 100644
index 00000000..45b76d6a
--- /dev/null
+++ b/plugins/flatpak/tests/app-extension/org.test.Chiron/metadata
@@ -0,0 +1,10 @@
+[Application]
+name=org.test.Chiron
+runtime=org.test.Runtime/x86_64/master
+command=chiron.sh
+
+[Extension org.test.Chiron.Extension]
+directory=share/extension
+subdirectories=true
+version=master
+autodelete=true
diff --git a/plugins/flatpak/tests/build.py b/plugins/flatpak/tests/build.py
index aadf6e04..c51bb295 100755
--- a/plugins/flatpak/tests/build.py
+++ b/plugins/flatpak/tests/build.py
@@ -101,17 +101,17 @@ build_flatpak('org.test.Runtime',
               'only-runtime/repo')
 
 # app with an extension
-#copy_repo('only-runtime', 'app-extension')
-#build_flatpak('org.test.Chiron',
-#              'app-extension',
-#              'app-extension/repo',
-#              cleanrepodir=False)
-#build_flatpak('org.test.Chiron.Extension',
-#              'app-extension',
-#              'app-extension/repo',
-#              cleanrepodir=False)
-#copy_repo('app-extension', 'app-extension-update')
-#build_flatpak('org.test.Chiron.Extension',
-#              'app-extension-update',
-#              'app-extension-update/repo',
-#              cleanrepodir=False)
+copy_repo('only-runtime', 'app-extension')
+build_flatpak('org.test.Chiron',
+              'app-extension',
+              'app-extension/repo',
+              cleanrepodir=False)
+build_flatpak('org.test.Chiron.Extension',
+              'app-extension',
+              'app-extension/repo',
+              cleanrepodir=False)
+copy_repo('app-extension', 'app-extension-update')
+build_flatpak('org.test.Chiron.Extension',
+              'app-extension-update',
+              'app-extension-update/repo',
+              cleanrepodir=False)
diff --git a/plugins/flatpak/tests/flatpakrepos.tar.gz b/plugins/flatpak/tests/flatpakrepos.tar.gz
index 38294d93..e85bb28d 100644
Binary files a/plugins/flatpak/tests/flatpakrepos.tar.gz and b/plugins/flatpak/tests/flatpakrepos.tar.gz 
differ
diff --git a/plugins/flatpak/tests/meson.build b/plugins/flatpak/tests/meson.build
index 9a778d8b..47650791 100644
--- a/plugins/flatpak/tests/meson.build
+++ b/plugins/flatpak/tests/meson.build
@@ -22,5 +22,7 @@ custom_target(
     'app-update/repo/',
     'app-with-runtime/repo/',
     'only-runtime/repo/',
+    'app-extension/repo',
+    'app-extension-update/repo',
   ],
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]