tests: migrate STI tests to TMT
This commit is contained in:
parent
d9e96fd5fb
commit
830dbbe0e0
5 changed files with 22 additions and 46 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
5
plans/ci.fmf
Normal file
5
plans/ci.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
6
tests/silvester-number/main.fmf
Normal file
6
tests/silvester-number/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
summary: Calculate Silvester Number
|
||||
framework: shell
|
||||
test: ./test.sh
|
||||
component: mpfr
|
||||
recommends:
|
||||
- gawk
|
||||
10
tests/silvester-number/test.sh
Executable file
10
tests/silvester-number/test.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh -eux
|
||||
|
||||
OUT="$(gawk -M 'BEGIN {
|
||||
s = 2
|
||||
for (i = 1; i <= 7; i++)
|
||||
s = s * (s - 1) + 1
|
||||
print s
|
||||
}')"
|
||||
|
||||
test "$OUT" = "113423713055421844361000443"
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
- hosts: all
|
||||
vars:
|
||||
- ansible_python_interpreter: /usr/bin/python3
|
||||
- artifacts: ./artifacts
|
||||
tags:
|
||||
- classic
|
||||
- container
|
||||
- atomic
|
||||
tasks:
|
||||
- name: create artifacts
|
||||
file:
|
||||
path: "{{ artifacts }}"
|
||||
state: directory
|
||||
delegate_to: localhost
|
||||
|
||||
- name: do it all
|
||||
block:
|
||||
- name: calculate Silvester number
|
||||
command: |
|
||||
gawk -M 'BEGIN {
|
||||
s = 2
|
||||
for (i = 1; i <= 7; i++)
|
||||
s = s * (s - 1) + 1
|
||||
print s
|
||||
}'
|
||||
register: silvester
|
||||
|
||||
- name: verify Silvester number
|
||||
fail:
|
||||
when: silvester.stdout != '113423713055421844361000443'
|
||||
|
||||
always:
|
||||
- name: write log
|
||||
copy:
|
||||
content: |
|
||||
stderr:
|
||||
{{ silvester.stderr }}
|
||||
stdout:
|
||||
{{ silvester.stdout }}
|
||||
dest: "{{ artifacts }}/test.log"
|
||||
delegate_to: localhost
|
||||
|
||||
# fetch:
|
||||
# dest: "{{ artifacts }}/"
|
||||
# src: "/tmp/test.log"
|
||||
# flat: yes
|
||||
Loading…
Add table
Add a link
Reference in a new issue