File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 Basalte bv
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ cmake_minimum_required (VERSION 3.20.0 )
5
+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
6
+
7
+ project (ctest_base )
8
+
9
+ target_sources (app PRIVATE ${ZEPHYR_BASE} /misc/empty_file.c )
10
+
11
+ enable_testing ()
12
+ include (CTest )
13
+
14
+ add_test (NAME exe_help COMMAND ${CMAKE_BINARY_DIR} /zephyr/zephyr.exe --help )
15
+ add_test (NAME exe_run COMMAND ${CMAKE_BINARY_DIR} /zephyr/zephyr.exe -stop_at=3 -no-rt )
16
+ set_property (
17
+ TEST exe_run
18
+ PROPERTY PASS_REGULAR_EXPRESSION "Stopped at [0-9.]+s"
19
+ )
20
+
21
+ # A test that always succeeds
22
+ add_test (NAME success COMMAND ${CMAKE_COMMAND} -E true )
23
+
24
+ # A test that is expected to fail
25
+ add_test (NAME failure COMMAND ${CMAKE_COMMAND} -E false )
26
+ set_property (TEST failure PROPERTY WILL_FAIL true )
Original file line number Diff line number Diff line change
1
+ # Intentionally empty
Original file line number Diff line number Diff line change
1
+ common :
2
+ tags :
3
+ - test_framework
4
+ platform_allow :
5
+ - native_sim
6
+ integration_platforms :
7
+ - native_sim
8
+ harness : ctest
9
+ tests :
10
+ testing.ctest.base : {}
You can’t perform that action at this time.
0 commit comments