Add CI TMT
Resolves: RHEL-62167
This commit is contained in:
parent
aba7e65a1b
commit
e796618c64
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
5
plans/test.fmf
Normal file
5
plans/test.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
5
tests/base/main.fmf
Normal file
5
tests/base/main.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Simple test of python-pycotap
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
require:
|
||||
- python3-pycotap
|
36
tests/base/test.py
Executable file
36
tests/base/test.py
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
from pycotap import TAPTestRunner
|
||||
from pycotap import LogMode
|
||||
|
||||
|
||||
class SimpleTest(unittest.TestCase):
|
||||
@classmethod
|
||||
def function_name(cls):
|
||||
return sys._getframe().f_back.f_code.co_name
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
print(cls.function_name())
|
||||
|
||||
def setUp(self):
|
||||
print(SimpleTest.function_name())
|
||||
|
||||
def main(self):
|
||||
print(SimpleTest.function_name())
|
||||
|
||||
def test_foo(self):
|
||||
print(SimpleTest.function_name())
|
||||
|
||||
|
||||
def main():
|
||||
loader = unittest.TestLoader()
|
||||
runner = TAPTestRunner(test_output_log=LogMode.LogToError)
|
||||
unittest.main(testRunner=runner, testLoader=loader)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
9
tests/base/test.sh
Executable file
9
tests/base/test.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartTest
|
||||
rlRun -t "./test.py"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user