Skip to content

Commit d80119a

Browse files
committed
TMT: run tests with GPUs
Fixes: #1054 Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent d68bda6 commit d80119a

File tree

4 files changed

+90
-8
lines changed

4 files changed

+90
-8
lines changed

.packit.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ actions:
2222
jobs:
2323
# Copr builds for Fedora
2424
- job: copr_build
25-
trigger: pull_request
25+
trigger: ignore
2626
packages: [ramalama-fedora]
2727
enable_net: true
2828
targets: &fedora_copr_targets
@@ -32,7 +32,7 @@ jobs:
3232

3333
# Copr builds for CentOS Stream
3434
- job: copr_build
35-
trigger: pull_request
35+
trigger: ignore
3636
enable_net: true
3737
packages: [ramalama-centos]
3838
targets: &centos_copr_targets
@@ -50,12 +50,14 @@ jobs:
5050
# Tests for Fedora
5151
- job: tests
5252
trigger: pull_request
53+
skip_build: true
5354
packages: [ramalama-fedora]
54-
targets: *fedora_copr_targets
55+
targets:
56+
- fedora-latest
5557

5658
# Tests for CentOS Stream
5759
- job: tests
58-
trigger: pull_request
60+
trigger: ignore
5961
packages: [ramalama-centos]
6062
targets: *centos_copr_targets
6163

container_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ process_all_targets() {
221221

222222
# build ramalama container image first, as other images inherit from it
223223
build "ramalama" "$command"
224-
for i in container-images/*; do
224+
for i in ./container-images/*; do
225225
i=$(basename "$i")
226226
# skip these directories
227227
if [[ "$i" =~ ^(scripts|ramalama)$ ]]; then

plans/main.fmf

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1-
summary: Check installed rpm metadata
21
discover:
3-
how: shell
2+
how: fmf
43
execute:
54
how: tmt
6-
script: rpm -qi python3-ramalama
5+
6+
provision:
7+
how: artemis
8+
hardware:
9+
gpu:
10+
device-name: GK210 (Tesla K80)
11+
vendor-name: NVIDIA
12+
13+
/gpu_info:
14+
summary: Display GPU info
15+
discover+:
16+
test: /test/tmt/gpu_info
17+
18+
/validate:
19+
discover+:
20+
test: /test/tmt/validate
21+
22+
/unit:
23+
discover+:
24+
test: /test/tmt/unit
25+
26+
/bats-docker:
27+
discover+:
28+
test: /test/tmt/bats-docker
29+
30+
/bats-nocontainer:
31+
discover+:
32+
test: /test/tmt/bats-nocontainer

test/tmt/main.fmf

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#/rpm:
2+
# summary: Verify rpm installation
3+
# test: rpm -qi python3-ramalama
4+
require:
5+
- bats
6+
- black
7+
- codespell
8+
- flake8
9+
- isort
10+
- jq
11+
- make
12+
- perl-Clone
13+
- perl-FindBin
14+
- pipx
15+
- podman-docker
16+
- pytest
17+
- python3-argcomplete
18+
- python3-huggingface-hub
19+
- shellcheck
20+
21+
/gpu_info:
22+
summary: Display GPU info
23+
test: lshw -C display
24+
require:
25+
- lshw
26+
27+
/validate:
28+
summary: Run validate test
29+
test: make -C $TMT_TREE validate
30+
31+
/unit:
32+
summary: Run unit tests
33+
test: make -C $TMT_TREE unit-tests
34+
35+
/bats-docker:
36+
summary: Run system tests in container
37+
test: |
38+
touch /etc/containers/nodocker
39+
pushd $TMT_TREE
40+
.github/scripts/install-ollama.sh
41+
./container_build.sh build ramalama
42+
make bats-docker
43+
popd
44+
duration: 30m
45+
46+
/bats-nocontainer:
47+
summary: Run system tests on host
48+
test: |
49+
pushd $TMT_TREE
50+
.github/scripts/install-ollama.sh
51+
./container-images/scripts/build_llama_and_whisper.sh
52+
make bats-nocontainer
53+
popd
54+
duration: 30m

0 commit comments

Comments
 (0)