Skip to content

Commit 816a432

Browse files
committed
tests/cmake: add tests for syscall generation scripts
This commit adds tests for the fixes introduced by commits 54e3699 and f8d3f0e. Signed-off-by: Loek Le Blansch <loek.le-blansch.pv@renesas.com>
1 parent f8d3f0e commit 816a432

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

tests/cmake/syscalls/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
3+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
4+
project(app C)
5+
target_sources(app PRIVATE main.c)
6+

tests/cmake/syscalls/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include "main.h"
2+
3+
int main(void) { return 0; }
4+

tests/cmake/syscalls/main.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include <zephyr/syscall.h>
4+
5+
// fixed in commit 54e369998747ccb89c2e563c4167b4a90c8670b2
6+
// clang-format off
7+
__syscall void
8+
test_wrapped(int foo);
9+
// clang-format on
10+
11+
// fixed in commit f8d3f0e8c83790207aabeb5c5a3b28e686224802
12+
__syscall void test_empty();
13+
14+
#include <zephyr/syscalls/main.h>
15+

tests/cmake/syscalls/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_APPLICATION_DEFINED_SYSCALL=y

tests/cmake/syscalls/testcase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tests:
2+
buildsystem.syscalls:
3+
build_only: true
4+
platform_allow: native_sim

0 commit comments

Comments
 (0)