summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2022-06-18 10:52:42 -0700
committerArmin Kuster <akuster808@gmail.com>2022-06-23 18:47:59 -0700
commit4e0d448aca97d6fcb7a9001801831b4e65e003b6 (patch)
tree4a369f069d6dd85618c1e8c03c511c90628d5d09
parentfec94e6ce42cb3754f4d6d89cd85102d9e669648 (diff)
downloadmeta-security-4e0d448aca97d6fcb7a9001801831b4e65e003b6.tar.gz
oeqa: Add a very basic firejail test
Currently check if --help works. RESULTS: RESULTS - ping.PingTest.test_ping: PASSED (0.07s) RESULTS - ssh.SSHTest.test_ssh: PASSED (2.41s) RESULTS - firejail.FirejailTest.test_firejail_basic: PASSED (1.30s) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--lib/oeqa/runtime/cases/firejail.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/firejail.py b/lib/oeqa/runtime/cases/firejail.py
new file mode 100644
index 0000000..88a8dda
--- /dev/null
+++ b/lib/oeqa/runtime/cases/firejail.py
@@ -0,0 +1,18 @@
1# Copyright (C) 2022 Armin Kuster <akuster808@gmail.com>
2#
3import re
4
5from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
7from oeqa.runtime.decorator.package import OEHasPackage
8
9class FirejailTest(OERuntimeTestCase):
10
11 @OEHasPackage(['firejail'])
12 @OEHasPackage(['libseccomp'])
13 @OETestDepends(['ssh.SSHTest.test_ssh'])
14 def test_firejail_basic(self):
15 status, output = self.target.run('firejail --help')
16 msg = ('Firejail --help command does not work as expected. '
17 'Status and output:%s and %s' % (status, output))
18 self.assertEqual(status, 0, msg = msg)