ci tests for c10s
Resolves: RHELMISC-5983
This commit is contained in:
parent
db189150be
commit
d5bb31f403
2
.fmf/version
Normal file
2
.fmf/version
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
1
|
||||||
|
|
5
plans/basic.fmf
Normal file
5
plans/basic.fmf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
22
tests/gnome_characters_test.py
Executable file
22
tests/gnome_characters_test.py
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
from gi import require_version
|
||||||
|
require_version('Gc', '1.0')
|
||||||
|
from gi.repository import Gc
|
||||||
|
|
||||||
|
|
||||||
|
class TestGnomeCharacters(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_dummy(self):
|
||||||
|
self.assertEqual(True, True)
|
||||||
|
|
||||||
|
@unittest.expectedFailure
|
||||||
|
def test_expected_failure(self):
|
||||||
|
self.assertEqual('BLACK SMILING FACE', Gc.character_name("☺"))
|
||||||
|
|
||||||
|
def test_character_name(self):
|
||||||
|
self.assertEqual('WHITE SMILING FACE', Gc.character_name("☺"))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
8
tests/main.fmf
Normal file
8
tests/main.fmf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
test: ./runtest.sh
|
||||||
|
duration: 50m
|
||||||
|
framework: beakerlib
|
||||||
|
require:
|
||||||
|
- gnome-characters
|
||||||
|
- desktop-file-utils
|
||||||
|
- gtk3-devel
|
||||||
|
- python3-gobject
|
29
tests/runtest.sh
Executable file
29
tests/runtest.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
NAME=gnome-characters
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm gnome-characters
|
||||||
|
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||||
|
rlRun "cp gnome_characters_test.py $tmp"
|
||||||
|
rlRun "pushd $tmp"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun -t -s "env LD_LIBRARY_PATH=/usr/lib64/org.gnome.Characters GI_TYPELIB_PATH=/usr/lib/girepository-1.0:/usr/lib64/org.gnome.Characters/girepository-1.0 ./gnome_characters_test.py -v" 0 "Running test cases"
|
||||||
|
echo "==== START of `cat ${rlRun_LOG}`: log of ${test_file} ===="
|
||||||
|
cat ${rlRun_LOG}
|
||||||
|
echo "==== END of `cat ${rlRun_LOG}`: log of ${test_file} ===="
|
||||||
|
rlAssertNotGrep FAIL ${rlRun_LOG}
|
||||||
|
rlGetTestState
|
||||||
|
rlLog "Number of failed asserts so far: ${ECODE}"
|
||||||
|
rlFileSubmit ${rlRun_LOG}
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user