Skip to content

Commit 54cc323

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

File tree

4 files changed

+88
-8
lines changed

4 files changed

+88
-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: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
- shellcheck
19+
20+
/gpu_info:
21+
summary: Display GPU info
22+
test: lshw -C display
23+
require:
24+
- lshw
25+
26+
/validate:
27+
summary: Run validate test
28+
test: make -C $TMT_TREE validate
29+
30+
/unit:
31+
summary: Run unit tests
32+
test: make -C $TMT_TREE unit-tests
33+
34+
/bats-docker:
35+
summary: Run system tests in container
36+
test: |
37+
pushd $TMT_TREE
38+
.github/scripts/install-ollama.sh
39+
./container_build.sh build ramalama
40+
make bats-docker
41+
popd
42+
duration: 30m
43+
44+
/bats-nocontainer:
45+
summary: Run system tests on host
46+
test: |
47+
pushd $TMT_TREE
48+
.github/scripts/install-ollama.sh
49+
./container-images/scripts/build_llama_and_whisper.sh
50+
make bats-nocontainer
51+
popd
52+
duration: 30m

0 commit comments

Comments
 (0)