Skip to content

Commit

Permalink
sys: implement tests for native mutex and cond API
Browse files Browse the repository at this point in the history
JIRA: RTOS-870
  • Loading branch information
lukileczo committed Jul 18, 2024
1 parent 022f090 commit a7a2b1a
Show file tree
Hide file tree
Showing 4 changed files with 1,162 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sys/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Custom name as LOCAL_DIR is auto-reset by binary.mk
MY_LOCAL_DIR := $(call my-dir)
COMMON_SRCS := $(wildcard $(MY_LOCAL_DIR)*.c)

SYS_UNIT_TESTS :=

# Quick template for adding sys tests from subdir (makes test-sys-xxx binary from xxx/*.c)
# $(eval $(call add_sys_test,NAME[,LOCAL_LDFLAGS][,LOCAL_CFLAGS]))
define add_test_sys
NAME := test-sys-$(1)
SYS_UNIT_TESTS += test-sys-$(1)
SRCS := $(wildcard $(MY_LOCAL_DIR)$(1)/*.c) $(COMMON_SRCS)
DEP_LIBS := unity
LOCAL_CFLAGS := -I$(MY_LOCAL_DIR) -fno-builtin $(3)
LOCAL_LDFLAGS := -z stack-size=12288 $(2)

include $(binary.mk)
endef

$(eval $(call add_test_sys,cond))
$(eval $(call add_test_sys,mutex))
Loading

0 comments on commit a7a2b1a

Please sign in to comment.