Skip to content

Commit d673dab

Browse files
jmichalski-antfkokosinski
authored andcommitted
tests: add VIRTIO PCI build test
This commit adds a build test for the VIRTIO PCI device. Signed-off-by: Jakub Michalski <jmichalski@antmicro.com> Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
1 parent 42dfea0 commit d673dab

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2024 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pcie0 {
8+
virtio_pci: virtio_pci {
9+
compatible = "virtio,pci";
10+
11+
vendor-id = <0x1af4>;
12+
device-id = <0x105a>;
13+
14+
interrupts = <0xb 0x0 0x0>;
15+
interrupt-parent = <&intc>;
16+
17+
status = "okay";
18+
};
19+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_TEST=y
2+
CONFIG_VIRTIO=y
3+
CONFIG_PCIE=y
4+
CONFIG_VIRTIO_PCI=y
5+
CONFIG_HEAP_MEM_POOL_SIZE=1024
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2024 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- virtio
6+
tests:
7+
drivers.virtio_pci.build:
8+
platform_allow: qemu_x86_64

0 commit comments

Comments
 (0)