-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: usb: gs_usb: add build-only test for C++ header inclusion
Add build-only test for verifying the gs_usb.h header file when included from C++ code. Signed-off-by: Henrik Brix Andersen <[email protected]>
- Loading branch information
1 parent
215f7f9
commit 4b7e507
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
|
||
project(cxx LANGUAGES CXX) | ||
|
||
FILE(GLOB app_sources src/*.cpp) | ||
target_sources(app PRIVATE ${app_sources}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&zephyr_udc0 { | ||
gs_usb0: gs_usb0 { | ||
compatible = "gs_usb"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CONFIG_CPP=y | ||
|
||
CONFIG_USB_DEVICE_STACK=y | ||
|
||
CONFIG_USB_DEVICE_GS_USB_IDENTIFICATION=y | ||
CONFIG_USB_DEVICE_GS_USB_TIMESTAMP=y | ||
CONFIG_USB_DEVICE_GS_USB_TERMINATION=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <cannectivity/usb/class/gs_usb.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2024 Henrik Brix Andersen <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
common: | ||
tags: usb can | ||
depends_on: usb_device | ||
build_only: true | ||
integration_platforms: | ||
- frdm_k64f | ||
platform_exclude: | ||
- native_sim | ||
tests: | ||
usb.gs_usb.cxx98: | ||
extra_configs: | ||
- CONFIG_STD_CPP98=y | ||
usb.gs_usb.cxx11: | ||
extra_configs: | ||
- CONFIG_STD_CPP11=y | ||
usb.gs_usb.cxx14: | ||
extra_configs: | ||
- CONFIG_STD_CPP14=y | ||
usb.gs_usb.cxx17: | ||
extra_configs: | ||
- CONFIG_STD_CPP17=y | ||
usb.gs_usb.cxx2a: | ||
extra_configs: | ||
- CONFIG_STD_CPP2A=y | ||
usb.gs_usb.cxx20: | ||
extra_configs: | ||
- CONFIG_STD_CPP20=y | ||
usb.gs_usb.cxx2b: | ||
extra_configs: | ||
- CONFIG_STD_CPP2B=y |