Add smoke test for tmt

Cherry-picked from a122e5c6
This commit is contained in:
Lukas Zachar 2021-07-19 15:08:54 +02:00 committed by Tomáš Hrnčiar
parent 40387dc073
commit 83e811d3ea
3 changed files with 18 additions and 0 deletions

4
plans.fmf Normal file
View File

@ -0,0 +1,4 @@
discover:
how: fmf
execute:
how: tmt

2
tests/smoke.fmf Normal file
View File

@ -0,0 +1,2 @@
test: bash ./smoke.sh
framework: shell

12
tests/smoke.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -ex
username="test_$$"
id "$username" && userdel -rf "$username"
useradd "$username"
su -l -c "echo simple-manylinux-demo > requirements.txt" "$username"
su -l -c "micropipenv install -- --user" "$username"
su -l -c "python3 -c 'from dummyextension.extension import hello; assert hello() == \"Hello from Python extension!\"'" "$username"
userdel -rf "$username"