Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 4e6315e

Browse files
author
Shashwat Pandey
committed
Flatpak: add qa tests for flatpak.
Add tests for flatpak command line. Signed-off-by: Shashwat Pandey <shashwatx.pandey@intel.com>
1 parent b2510f8 commit 4e6315e

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

meta-iotqa/conf/test/refkit-image-gateway-flatpak-runtime.manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ oeqa.runtime.core.iotivity.client
44
oeqa.runtime.multimedia.audio.pulseaudio
55
oeqa.runtime.sanity.flatpak
66
oeqa.runtime.sanity.flatpak-session
7+
oeqa.runtime.sanity.flatpak-commandline

meta-iotqa/conf/test/refkit-image-gateway.manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ oeqa.runtime.peripherals.upm.upm
77
oeqa.runtime.programming.nodejs.apprt_nodejs
88
oeqa.runtime.sanity.flatpak
99
oeqa.runtime.sanity.flatpak-session
10+
oeqa.runtime.sanity.flatpak-commandline
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import time
2+
import subprocess
3+
from oeqa.oetest import oeRuntimeTest
4+
5+
6+
class SanityTestFlatpakCommandline(oeRuntimeTest):
7+
"""
8+
@class SanityTestFlatpak
9+
"""
10+
11+
def test_version(self):
12+
'''
13+
Test the version of flatpak.
14+
@fn test_version
15+
'''
16+
# ************Flatpak Version************
17+
(status, output) = self.target.run("flatpak --version")
18+
self.assertEqual(status, 0, msg="flatpak version command failed: %s " % output)
19+
20+
21+
def test_list(self):
22+
'''
23+
Test to list down all flatpak app.
24+
@fn test_list
25+
'''
26+
# ************Flatpak List************
27+
(status, output) = self.target.run("flatpak list")
28+
self.assertEqual(status, 0, msg="flatpak list command failed: %s " % output)
29+
30+
31+
def test_run(self):
32+
'''
33+
Test to run an application using flatpak.
34+
@fn test_run
35+
@param self
36+
@return
37+
'''
38+
# ************Flatpak Run************
39+
p = subprocess.Popen('flatpak run org.example.BasePlatform/x86_64/refkit.0', shell=True, stdout=subprocess.PIPE)
40+
time.sleep(2)
41+
p.terminate()

0 commit comments

Comments
 (0)