Skip to content

Commit eaa58c5

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

File tree

4 files changed

+84
-8
lines changed

4 files changed

+84
-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-rawhide
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
@@ -199,7 +199,7 @@ process_all_targets() {
199199

200200
# build ramalama container image first, as other images inherit from it
201201
build "ramalama" "$command"
202-
for i in container-images/*; do
202+
for i in ./container-images/*; do
203203
i=$(basename "$i")
204204
# skip these directories
205205
if [[ "$i" =~ ^(scripts|ramalama)$ ]]; then

plans/main.fmf

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
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+
/validate:
14+
summary: Validate tests
15+
discover+:
16+
filter: 'tag:validate'
17+
18+
/unit:
19+
summary: Unit tests
20+
discover+:
21+
filter: 'tag:unit'
22+
23+
/bats-docker:
24+
summary: System tests in container
25+
discover+:
26+
filter: 'tag:container'
27+
28+
/bats-nocontainer:
29+
summary: System tests run on host
30+
discover+:
31+
filter: 'tag:nocontainer'

test/tmt/main.fmf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
- pytest
13+
- shellcheck
14+
15+
/gpu_info:
16+
tag: [ system_info, validate ]
17+
summary: Display GPU info
18+
test: lshw -C display
19+
require:
20+
- lshw
21+
22+
/validate:
23+
tag: [ validate ]
24+
summary: validate
25+
test: make -C $TMT_TREE/validate
26+
27+
/unit:
28+
tag: [ unit ]
29+
summary: Run unit tests
30+
test: make -C $TMT_TREE/unit-tests
31+
32+
/bats-docker:
33+
tag: [ system, container ]
34+
summary: bats-docker tests
35+
test: |
36+
pushd $TMT_TREE
37+
.github/scripts/install-ollama.sh
38+
./container_build.sh build ramalama
39+
make bats-docker
40+
popd
41+
42+
/bats-nocontainer:
43+
tag: [ system, nocontainer ]
44+
summary: bats-nocontainer tests
45+
test: |
46+
pushd $TMT_TREE
47+
.github/scripts/install-ollama.sh
48+
make bats-nocontainer
49+
popd

0 commit comments

Comments
 (0)