-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cristian Le <[email protected]>
- Loading branch information
Showing
6 changed files
with
56 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
summary: Test python integration | ||
|
||
prepare: | ||
- how: install | ||
package: | ||
- python3dist(pip) | ||
- gcc-c++ | ||
- cmake | ||
- ninja-build | ||
# Defining all python dependencies manually here | ||
- python3dist(scikit-build-core) | ||
- how: shell | ||
script: | | ||
python3 -m venv --system-site-packages $TMT_PLAN_DATA/venv | ||
|
||
discover+: | ||
how: fmf | ||
path: . | ||
filter: "tag:python" | ||
execute: | ||
how: tmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
summary: Run the bundled ctests | ||
tag: [ cmake ] | ||
framework: beakerlib | ||
test: ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
framework: beakerlib | ||
test: ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
summary: Test the python installation | ||
tag: [ python ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k | ||
# shellcheck disable=all | ||
source /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
rlJournalStart | ||
rlPhaseStartSetup | ||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" | ||
rlRun "source \$TMT_PLAN_DATA/venv/bin/activate" 0 "Source the plan's virtual environment" | ||
# Secondary venv inheriting from the main virtual environment | ||
# keeps the plan's vnev clean | ||
rlRun "python3 -m venv --site-packages \$tmp/venv" 0 "Create the test's virtual environment" | ||
rlRun "deactivate && source \$tmp/venv/bin/activate" 0 "Source the test's virtual environment" | ||
rlRun "set -o pipefail" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest | ||
rlRun "pip install -v --no-build-isolation ." 0 "Install the test package" | ||
rlRun -s "main" 0 "Run the test executable" | ||
rlAssertGrep "Hello, World!" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartCleanup | ||
rlRun "rm -r $tmp" 0 "Remove tmp directory" | ||
rlPhaseEnd | ||
rlJournalEnd |