Add CI TMT
This commit is contained in:
parent
18333d7f24
commit
7f31276577
5 changed files with 57 additions and 0 deletions
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
|
||||
37
tests/base/test.py
Executable file
37
tests/base/test.py
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/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):
|
||||
sys.stdout = sys.__stdout__
|
||||
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…
Add table
Add a link
Reference in a new issue