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 authored and agkaminski committed Jul 26, 2024
1 parent 022f090 commit ab7a721
Show file tree
Hide file tree
Showing 4 changed files with 1,207 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sys/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Custom name as LOCAL_DIR is auto-reset by binary.mk
MY_LOCAL_DIR := $(call my-dir)

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)
DEP_LIBS := unity
LOCAL_CFLAGS := -fno-builtin $(3)
LOCAL_LDFLAGS := $(2)

include $(binary.mk)
endef

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

0 comments on commit ab7a721

Please sign in to comment.