Skip to content

Commit c5b6e6a

Browse files
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 b34c374 commit c5b6e6a

File tree

5 files changed

+49
-0
lines changed

5 files changed

+49
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_TEST=y
2+
CONFIG_VIRTIO=y
3+
CONFIG_PCIE=y
4+
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+
filter: CONFIG_DT_HAS_VIRTIO_PCI_ENABLED
3+
build_only: true
4+
tags:
5+
- drivers
6+
- virtio
7+
tests:
8+
drivers.virtio_pci.build: {}

0 commit comments

Comments
 (0)