Skip to content

Commit b4624b3

Browse files
authored
ci: tmt tests improvements (#899)
- hotfix for #799 (doesn't need new release, I've already pushed the changes downstream) - reformat the fmf files to look more like yaml - install doc examples in their own `venv` --------- Signed-off-by: Cristian Le <[email protected]>
1 parent c415696 commit b4624b3

File tree

13 files changed

+25
-30
lines changed

13 files changed

+25
-30
lines changed

.distro/plans/examples.fmf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
summary:
2-
Documentation examples
1+
summary: Documentation examples
32
discover+:
43
how: fmf
54
filter: "tag: examples"

.distro/plans/smoke.fmf

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
summary:
2-
Basic smoke tests
1+
/:
2+
inherit: false
3+
4+
summary: Basic smoke tests
35
discover:
46
how: fmf
57
filter: "tag: smoke"

.distro/tests/smoke.fmf

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ path: /
55

66
# Define tests
77
/version:
8+
summary: Read version
89
test: python3 -c "import scikit_build_core; print(scikit_build_core.__version__)"
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
summary:
2-
Nanobind downstream example
1+
summary: Nanobind downstream example
32
adjust:
43
enabled: false
54
because: Nanobind is not yet packaged on Fedora
65
#require+:
7-
# - python3-nanobind
6+
# - python3dist(nanobind)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
summary:
2-
Pybind downstream example
1+
summary: Pybind downstream example
32
require+:
43
- gcc-c++
5-
- pybind11-devel
4+
- python3dist(pybind11)
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
summary:
2-
Abi3 example project
1+
summary: Abi3 example project
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
summary:
2-
C example project
1+
summary: C example project
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
summary:
2-
Cython example project
1+
summary: Cython example project
32
require+:
4-
- python3-cython
3+
- python3dist(cython)
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
summary:
2-
F2PY example project
1+
summary: F2PY example project
32
require+:
43
- gcc-gfortran
5-
- python3-numpy
4+
- python3dist(numpy)
65
- python3-numpy-f2py
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
summary:
2-
Nanobind example project
1+
summary: Nanobind example project
32
adjust:
43
enabled: false
54
because: Nanobind is not yet packaged on Fedora
65
#require+:
7-
# - python3-nanobind
6+
# - python3dist(nanobind)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
summary:
2-
Pybind example project
1+
summary: Pybind example project
32
require+:
43
- gcc-c++
5-
- pybind11-devel
4+
- python3dist(pybind11)
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
summary:
2-
Swig example project
1+
summary: Swig example project
32
require+:
43
- swig

docs/examples/test.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ rlJournalStart
1212
fi
1313
rlRun "pushd $tmp"
1414
rlRun "tree" 0 "Show directory tree"
15+
rlRun "python3 -m venv .venv --system-site-packages" 0 "Create venv with system packages"
16+
rlRun "source .venv/bin/activate" 0 "Activate venv"
1517
rlRun "set -o pipefail"
1618
rlPhaseEnd
1719

1820
rlPhaseStartTest
19-
rlRun "pip install --user . --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
21+
rlRun "pip install . -v --config-settings=build.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
2022
if [ "${HAS_PYTEST}" == True ]; then
21-
rlRun "pytest" 0 "Run built-in pytest"
23+
rlRun "python3 -m pytest" 0 "Run built-in pytest"
2224
else
2325
rlRun "python3 test.py" 0 "Test project is installed correctly"
2426
fi

0 commit comments

Comments
 (0)