-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add CTest base harness testing
Add a testcase to validate the added CTest twister harness. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- Loading branch information
Showing
3 changed files
with
28 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,19 @@ | ||
# Copyright (c) 2024 Basalte bv | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
|
||
project(ctest_base) | ||
|
||
target_sources(app PRIVATE ${ZEPHYR_BASE}/misc/empty_file.c) | ||
|
||
enable_testing() | ||
include(CTest) | ||
|
||
# A test that always succeeds | ||
add_test(NAME success COMMAND ${CMAKE_COMMAND} -E true) | ||
|
||
# A test that is expected to fail | ||
add_test(NAME failure COMMAND ${CMAKE_COMMAND} -E false) | ||
set_property(TEST failure PROPERTY WILL_FAIL true) |
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 @@ | ||
# Intentionally empty |
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,8 @@ | ||
common: | ||
tags: | ||
- test_framework | ||
integration_platforms: | ||
- native_sim | ||
harness: ctest | ||
tests: | ||
testing.ctest.base: {} |