Feature/write property type check refactor (#182)

* refactor write-property tag check

* modify ports objects to use write-property tag check API

* modify example objects to use write-property tag check API

* Fix object unit test builds

* Fix and run unit ztests via CMake

* Enable unit testing on Travis CI

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-06-23 10:10:12 -05:00
committed by GitHub
parent 31b7fb3c40
commit 810a2f93de
139 changed files with 1142 additions and 4375 deletions
+440 -31
View File
@@ -1,43 +1,452 @@
#Makefile to build test case
CC = gcc
SRC_DIR = ../../../src
TEST_DIR = ../../../test
INCLUDES = -I$(SRC_DIR) -I$(TEST_DIR)
DEFINES = -DDEBUG_ENABLED=0
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.13
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
# Default target executed when no arguments are given to make.
default_target: all
SRCS = main.c \
$(SRC_DIR)/bacnet/bacreal.c \
$(SRC_DIR)/bacnet/basic/sys/bigend.c \
$(TEST_DIR)/ctest.c
.PHONY : default_target
TARGET_NAME = unittest
ifeq ($(OS),Windows_NT)
TARGET_EXT = .exe
else
TARGET_EXT =
endif
TARGET = $(TARGET_NAME)$(TARGET_EXT)
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
#=============================================================================
# Special targets provided by cmake.
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/skarg/Projects/bacnet-stack
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/skarg/Projects/bacnet-stack
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local/fast
# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
/usr/bin/ctest --force-new-ctest-process $(ARGS)
.PHONY : test
# Special rule for the target test
test/fast: test
.PHONY : test/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"dev\" \"lib\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# The main all target
all: cmake_check_build_system
cd /home/skarg/Projects/bacnet-stack && $(CMAKE_COMMAND) -E cmake_progress_start /home/skarg/Projects/bacnet-stack/CMakeFiles /home/skarg/Projects/bacnet-stack/test/bacnet/bacreal/CMakeFiles/progress.marks
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f CMakeFiles/Makefile2 test/bacnet/bacreal/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/skarg/Projects/bacnet-stack/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
rm -rf ${TARGET} $(OBJS)
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f CMakeFiles/Makefile2 test/bacnet/bacreal/clean
.PHONY : clean
test: ${TARGET}
./${TARGET}
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f CMakeFiles/Makefile2 test/bacnet/bacreal/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f CMakeFiles/Makefile2 test/bacnet/bacreal/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/skarg/Projects/bacnet-stack && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/rule:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f CMakeFiles/Makefile2 test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/rule
.PHONY : test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/rule
# Convenience name for target.
test_bacreal: test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/rule
.PHONY : test_bacreal
# fast build rule for target.
test_bacreal/fast:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build
.PHONY : test_bacreal/fast
__/__/__/src/bacnet/bacdcode.o: __/__/__/src/bacnet/bacdcode.c.o
.PHONY : __/__/__/src/bacnet/bacdcode.o
# target to build an object file
__/__/__/src/bacnet/bacdcode.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacdcode.c.o
.PHONY : __/__/__/src/bacnet/bacdcode.c.o
__/__/__/src/bacnet/bacdcode.i: __/__/__/src/bacnet/bacdcode.c.i
.PHONY : __/__/__/src/bacnet/bacdcode.i
# target to preprocess a source file
__/__/__/src/bacnet/bacdcode.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacdcode.c.i
.PHONY : __/__/__/src/bacnet/bacdcode.c.i
__/__/__/src/bacnet/bacdcode.s: __/__/__/src/bacnet/bacdcode.c.s
.PHONY : __/__/__/src/bacnet/bacdcode.s
# target to generate assembly for a file
__/__/__/src/bacnet/bacdcode.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacdcode.c.s
.PHONY : __/__/__/src/bacnet/bacdcode.c.s
__/__/__/src/bacnet/bacint.o: __/__/__/src/bacnet/bacint.c.o
.PHONY : __/__/__/src/bacnet/bacint.o
# target to build an object file
__/__/__/src/bacnet/bacint.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacint.c.o
.PHONY : __/__/__/src/bacnet/bacint.c.o
__/__/__/src/bacnet/bacint.i: __/__/__/src/bacnet/bacint.c.i
.PHONY : __/__/__/src/bacnet/bacint.i
# target to preprocess a source file
__/__/__/src/bacnet/bacint.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacint.c.i
.PHONY : __/__/__/src/bacnet/bacint.c.i
__/__/__/src/bacnet/bacint.s: __/__/__/src/bacnet/bacint.c.s
.PHONY : __/__/__/src/bacnet/bacint.s
# target to generate assembly for a file
__/__/__/src/bacnet/bacint.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacint.c.s
.PHONY : __/__/__/src/bacnet/bacint.c.s
__/__/__/src/bacnet/bacreal.o: __/__/__/src/bacnet/bacreal.c.o
.PHONY : __/__/__/src/bacnet/bacreal.o
# target to build an object file
__/__/__/src/bacnet/bacreal.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacreal.c.o
.PHONY : __/__/__/src/bacnet/bacreal.c.o
__/__/__/src/bacnet/bacreal.i: __/__/__/src/bacnet/bacreal.c.i
.PHONY : __/__/__/src/bacnet/bacreal.i
# target to preprocess a source file
__/__/__/src/bacnet/bacreal.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacreal.c.i
.PHONY : __/__/__/src/bacnet/bacreal.c.i
__/__/__/src/bacnet/bacreal.s: __/__/__/src/bacnet/bacreal.c.s
.PHONY : __/__/__/src/bacnet/bacreal.s
# target to generate assembly for a file
__/__/__/src/bacnet/bacreal.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacreal.c.s
.PHONY : __/__/__/src/bacnet/bacreal.c.s
__/__/__/src/bacnet/bacstr.o: __/__/__/src/bacnet/bacstr.c.o
.PHONY : __/__/__/src/bacnet/bacstr.o
# target to build an object file
__/__/__/src/bacnet/bacstr.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacstr.c.o
.PHONY : __/__/__/src/bacnet/bacstr.c.o
__/__/__/src/bacnet/bacstr.i: __/__/__/src/bacnet/bacstr.c.i
.PHONY : __/__/__/src/bacnet/bacstr.i
# target to preprocess a source file
__/__/__/src/bacnet/bacstr.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacstr.c.i
.PHONY : __/__/__/src/bacnet/bacstr.c.i
__/__/__/src/bacnet/bacstr.s: __/__/__/src/bacnet/bacstr.c.s
.PHONY : __/__/__/src/bacnet/bacstr.s
# target to generate assembly for a file
__/__/__/src/bacnet/bacstr.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/bacstr.c.s
.PHONY : __/__/__/src/bacnet/bacstr.c.s
__/__/__/src/bacnet/basic/sys/bigend.o: __/__/__/src/bacnet/basic/sys/bigend.c.o
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.o
# target to build an object file
__/__/__/src/bacnet/basic/sys/bigend.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/basic/sys/bigend.c.o
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.c.o
__/__/__/src/bacnet/basic/sys/bigend.i: __/__/__/src/bacnet/basic/sys/bigend.c.i
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.i
# target to preprocess a source file
__/__/__/src/bacnet/basic/sys/bigend.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/basic/sys/bigend.c.i
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.c.i
__/__/__/src/bacnet/basic/sys/bigend.s: __/__/__/src/bacnet/basic/sys/bigend.c.s
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.s
# target to generate assembly for a file
__/__/__/src/bacnet/basic/sys/bigend.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/__/src/bacnet/basic/sys/bigend.c.s
.PHONY : __/__/__/src/bacnet/basic/sys/bigend.c.s
__/__/ztest/src/ztest.o: __/__/ztest/src/ztest.c.o
.PHONY : __/__/ztest/src/ztest.o
# target to build an object file
__/__/ztest/src/ztest.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest.c.o
.PHONY : __/__/ztest/src/ztest.c.o
__/__/ztest/src/ztest.i: __/__/ztest/src/ztest.c.i
.PHONY : __/__/ztest/src/ztest.i
# target to preprocess a source file
__/__/ztest/src/ztest.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest.c.i
.PHONY : __/__/ztest/src/ztest.c.i
__/__/ztest/src/ztest.s: __/__/ztest/src/ztest.c.s
.PHONY : __/__/ztest/src/ztest.s
# target to generate assembly for a file
__/__/ztest/src/ztest.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest.c.s
.PHONY : __/__/ztest/src/ztest.c.s
__/__/ztest/src/ztest_mock.o: __/__/ztest/src/ztest_mock.c.o
.PHONY : __/__/ztest/src/ztest_mock.o
# target to build an object file
__/__/ztest/src/ztest_mock.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest_mock.c.o
.PHONY : __/__/ztest/src/ztest_mock.c.o
__/__/ztest/src/ztest_mock.i: __/__/ztest/src/ztest_mock.c.i
.PHONY : __/__/ztest/src/ztest_mock.i
# target to preprocess a source file
__/__/ztest/src/ztest_mock.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest_mock.c.i
.PHONY : __/__/ztest/src/ztest_mock.c.i
__/__/ztest/src/ztest_mock.s: __/__/ztest/src/ztest_mock.c.s
.PHONY : __/__/ztest/src/ztest_mock.s
# target to generate assembly for a file
__/__/ztest/src/ztest_mock.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/__/__/ztest/src/ztest_mock.c.s
.PHONY : __/__/ztest/src/ztest_mock.c.s
src/main.o: src/main.c.o
.PHONY : src/main.o
# target to build an object file
src/main.c.o:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/src/main.c.o
.PHONY : src/main.c.o
src/main.i: src/main.c.i
.PHONY : src/main.i
# target to preprocess a source file
src/main.c.i:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/src/main.c.i
.PHONY : src/main.c.i
src/main.s: src/main.c.s
.PHONY : src/main.s
# target to generate assembly for a file
src/main.c.s:
cd /home/skarg/Projects/bacnet-stack && $(MAKE) -f test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/build.make test/bacnet/bacreal/CMakeFiles/test_bacreal.dir/src/main.c.s
.PHONY : src/main.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/strip"
@echo "... install/local"
@echo "... test"
@echo "... list_install_components"
@echo "... test_bacreal"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... install"
@echo "... __/__/__/src/bacnet/bacdcode.o"
@echo "... __/__/__/src/bacnet/bacdcode.i"
@echo "... __/__/__/src/bacnet/bacdcode.s"
@echo "... __/__/__/src/bacnet/bacint.o"
@echo "... __/__/__/src/bacnet/bacint.i"
@echo "... __/__/__/src/bacnet/bacint.s"
@echo "... __/__/__/src/bacnet/bacreal.o"
@echo "... __/__/__/src/bacnet/bacreal.i"
@echo "... __/__/__/src/bacnet/bacreal.s"
@echo "... __/__/__/src/bacnet/bacstr.o"
@echo "... __/__/__/src/bacnet/bacstr.i"
@echo "... __/__/__/src/bacnet/bacstr.s"
@echo "... __/__/__/src/bacnet/basic/sys/bigend.o"
@echo "... __/__/__/src/bacnet/basic/sys/bigend.i"
@echo "... __/__/__/src/bacnet/basic/sys/bigend.s"
@echo "... __/__/ztest/src/ztest.o"
@echo "... __/__/ztest/src/ztest.i"
@echo "... __/__/ztest/src/ztest.s"
@echo "... __/__/ztest/src/ztest_mock.o"
@echo "... __/__/ztest/src/ztest_mock.i"
@echo "... __/__/ztest/src/ztest_mock.s"
@echo "... src/main.o"
@echo "... src/main.i"
@echo "... src/main.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/skarg/Projects/bacnet-stack && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
include: .depend