Unittests added

pull/6082/head
Antti Kauppila 2018-02-11 23:04:28 +02:00 committed by Ari Parkkila
parent 1cbddfbc10
commit 217271b156
793 changed files with 44076 additions and 6 deletions

13
features/cellular/.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
coverage/
lcov/
results/
coverages/
gcov/
*.exe
*.o
*.d
*.a
*.gcda
*.gcno
cpputest_*.xml
*_unit_tests*

View File

@ -0,0 +1 @@
UNITTESTS/*

View File

@ -0,0 +1,56 @@
#
# Makefile.test for CIot library unit tests
#
# List of subdirectories to build
TEST_FOLDER_NAME := UNITTESTS
TEST_FOLDER := ./UNITTESTS/
# List of unit test directories for libraries
UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*)))
TESTDIRS := $(UNITTESTS:%=build-%)
CLEANTESTDIRS := $(UNITTESTS:%=clean-%)
COVERAGEFILE := ./lcov/coverage.info
.PHONY: test
test: $(TESTDIRS)
@rm -rf ./lcov
@rm -rf ./coverage
@mkdir -p lcov
@mkdir -p lcov/results
@mkdir coverage
@find $(TEST_FOLDER) -name '*.xml' | xargs cp -t ./lcov/results/
@rm -f lcov/index.xml
@./xsl_script.sh
@cp junit_xsl.xslt lcov/.
@xsltproc -o lcov/testresults.html lcov/junit_xsl.xslt lcov/index.xml
@rm -f lcov/junit_xsl.xslt
@rm -f lcov/index.xml
@find ./ -name '*.gcno' | xargs cp --backup=numbered -t ./coverage/
@find ./ -name '*.gcda' | xargs cp --backup=numbered -t ./coverage/
@gcovr --object-directory ./coverage --exclude-unreachable-branches -e '.*/builds/.*' -e '.*/$(TEST_FOLDER_NAME)/.*' -e '.*/yotta_modules/.*' -e '.*/stubs/.*' -e '.*/mbed-coap/.*' -x -o ./lcov/gcovr.xml
@lcov -d $(TEST_FOLDER_NAME)/. -c -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/usr*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/$(TEST_FOLDER_NAME)*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/mbed-client-libservice*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/mbed-client*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/mbed-os/events*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/mbed-os/features/netsocket*" -o $(COVERAGEFILE)
@lcov -q -r $(COVERAGEFILE) "/mbed-os/platform*" -o $(COVERAGEFILE)
@genhtml -q $(COVERAGEFILE) --output-directory lcov/html
@echo mbed-ciot module unit tests built
$(TESTDIRS):
@make -C $(@:build-%=%)
$(CLEANDIRS):
@make -C $(@:clean-%=%) clean
$(CLEANTESTDIRS):
@make -C $(@:clean-%=%) clean
# Extend default clean rule
clean: clean-extra
clean-extra: $(CLEANDIRS) \
$(CLEANTESTDIRS)

View File

@ -0,0 +1,19 @@
#scan for folders having "Makefile" in them and remove 'this' to prevent loop
DIRS := $(filter-out ./, $(sort $(dir $(shell find . -name 'Makefile'))))
all:
for dir in $(DIRS); do \
cd $$dir; make gcov; cd ..; cd ..;\
done
clean:
for dir in $(DIRS); do \
cd $$dir; make clean; cd ..; cd ..;\
done
rm -rf ../source/*gcov ../source/*gcda ../source/*o
rm -rf stubs/*gcov stubs/*gcda stubs/*o
rm -rf results/*
rm -rf coverages/*
rm -rf results
rm -rf coverages

View File

@ -0,0 +1,562 @@
#---------
#
# MakefileWorker.mk
#
# Include this helper file in your makefile
# It makes
# A static library
# A test executable
#
# See this example for parameter settings
# examples/Makefile
#
#----------
# Inputs - these variables describe what to build
#
# INCLUDE_DIRS - Directories used to search for include files.
# This generates a -I for each directory
# SRC_DIRS - Directories containing source file to built into the library
# SRC_FILES - Specific source files to build into library. Helpful when not all code
# in a directory can be built for test (hopefully a temporary situation)
# TEST_SRC_DIRS - Directories containing unit test code build into the unit test runner
# These do not go in a library. They are explicitly included in the test runner
# TEST_SRC_FILES - Specific source files to build into the unit test runner
# These do not go in a library. They are explicitly included in the test runner
# MOCKS_SRC_DIRS - Directories containing mock source files to build into the test runner
# These do not go in a library. They are explicitly included in the test runner
#----------
# You can adjust these variables to influence how to build the test target
# and where to put and name outputs
# See below to determine defaults
# COMPONENT_NAME - the name of the thing being built
# TEST_TARGET - name the test executable. By default it is
# $(COMPONENT_NAME)_tests
# Helpful if you want 1 > make files in the same directory with different
# executables as output.
# CPPUTEST_HOME - where CppUTest home dir found
# TARGET_PLATFORM - Influences how the outputs are generated by modifying the
# CPPUTEST_OBJS_DIR and CPPUTEST_LIB_DIR to use a sub-directory under the
# normal objs and lib directories. Also modifies where to search for the
# CPPUTEST_LIB to link against.
# CPPUTEST_OBJS_DIR - a directory where o and d files go
# CPPUTEST_LIB_DIR - a directory where libs go
# CPPUTEST_ENABLE_DEBUG - build for debug
# CPPUTEST_USE_MEM_LEAK_DETECTION - Links with overridden new and delete
# CPPUTEST_USE_STD_CPP_LIB - Set to N to keep the standard C++ library out
# of the test harness
# CPPUTEST_USE_GCOV - Turn on coverage analysis
# Clean then build with this flag set to Y, then 'make gcov'
# CPPUTEST_MAPFILE - generate a map file
# CPPUTEST_WARNINGFLAGS - overly picky by default
# OTHER_MAKEFILE_TO_INCLUDE - a hook to use this makefile to make
# other targets. Like CSlim, which is part of fitnesse
# CPPUTEST_USE_VPATH - Use Make's VPATH functionality to support user
# specification of source files and directories that aren't below
# the user's Makefile in the directory tree, like:
# SRC_DIRS += ../../lib/foo
# It defaults to N, and shouldn't be necessary except in the above case.
#----------
#
# Other flags users can initialize to sneak in their settings
# CPPUTEST_CXXFLAGS - flags for the C++ compiler
# CPPUTEST_CPPFLAGS - flags for the C++ AND C preprocessor
# CPPUTEST_CFLAGS - flags for the C complier
# CPPUTEST_LDFLAGS - Linker flags
#----------
# Some behavior is weird on some platforms. Need to discover the platform.
# Platforms
UNAME_OUTPUT = "$(shell uname -a)"
MACOSX_STR = Darwin
MINGW_STR = MINGW
CYGWIN_STR = CYGWIN
LINUX_STR = Linux
SUNOS_STR = SunOS
UNKNWOWN_OS_STR = Unknown
# Compilers
CC_VERSION_OUTPUT ="$(shell $(CXX) -v 2>&1)"
CLANG_STR = clang
SUNSTUDIO_CXX_STR = SunStudio
UNAME_OS = $(UNKNWOWN_OS_STR)
ifeq ($(findstring $(MINGW_STR),$(UNAME_OUTPUT)),$(MINGW_STR))
UNAME_OS = $(MINGW_STR)
endif
ifeq ($(findstring $(CYGWIN_STR),$(UNAME_OUTPUT)),$(CYGWIN_STR))
UNAME_OS = $(CYGWIN_STR)
endif
ifeq ($(findstring $(LINUX_STR),$(UNAME_OUTPUT)),$(LINUX_STR))
UNAME_OS = $(LINUX_STR)
endif
ifeq ($(findstring $(MACOSX_STR),$(UNAME_OUTPUT)),$(MACOSX_STR))
UNAME_OS = $(MACOSX_STR)
#lion has a problem with the 'v' part of -a
UNAME_OUTPUT = "$(shell uname -pmnrs)"
endif
ifeq ($(findstring $(SUNOS_STR),$(UNAME_OUTPUT)),$(SUNOS_STR))
UNAME_OS = $(SUNOS_STR)
SUNSTUDIO_CXX_ERR_STR = CC -flags
ifeq ($(findstring $(SUNSTUDIO_CXX_ERR_STR),$(CC_VERSION_OUTPUT)),$(SUNSTUDIO_CXX_ERR_STR))
CC_VERSION_OUTPUT ="$(shell $(CXX) -V 2>&1)"
COMPILER_NAME = $(SUNSTUDIO_CXX_STR)
endif
endif
ifeq ($(findstring $(CLANG_STR),$(CC_VERSION_OUTPUT)),$(CLANG_STR))
COMPILER_NAME = $(CLANG_STR)
endif
#Kludge for mingw, it does not have cc.exe, but gcc.exe will do
ifeq ($(UNAME_OS),$(MINGW_STR))
CC := gcc
endif
#And another kludge. Exception handling in gcc 4.6.2 is broken when linking the
# Standard C++ library as a shared library. Unbelievable.
ifeq ($(UNAME_OS),$(MINGW_STR))
CPPUTEST_LDFLAGS += -static
endif
ifeq ($(UNAME_OS),$(CYGWIN_STR))
CPPUTEST_LDFLAGS += -static
endif
#Kludge for MacOsX gcc compiler on Darwin9 who can't handle pendantic
ifeq ($(UNAME_OS),$(MACOSX_STR))
ifeq ($(findstring Version 9,$(UNAME_OUTPUT)),Version 9)
CPPUTEST_PEDANTIC_ERRORS = N
endif
endif
ifndef COMPONENT_NAME
COMPONENT_NAME = name_this_in_the_makefile
endif
# Debug on by default
ifndef CPPUTEST_ENABLE_DEBUG
CPPUTEST_ENABLE_DEBUG = Y
endif
# new and delete for memory leak detection on by default
ifndef CPPUTEST_USE_MEM_LEAK_DETECTION
CPPUTEST_USE_MEM_LEAK_DETECTION = Y
endif
# Use the standard C library
ifndef CPPUTEST_USE_STD_C_LIB
CPPUTEST_USE_STD_C_LIB = Y
endif
# Use the standard C++ library
ifndef CPPUTEST_USE_STD_CPP_LIB
CPPUTEST_USE_STD_CPP_LIB = Y
endif
# Use gcov, off by default
ifndef CPPUTEST_USE_GCOV
CPPUTEST_USE_GCOV = N
endif
ifndef CPPUTEST_PEDANTIC_ERRORS
CPPUTEST_PEDANTIC_ERRORS = Y
endif
# Default warnings
ifndef CPPUTEST_WARNINGFLAGS
CPPUTEST_WARNINGFLAGS = -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion
ifeq ($(CPPUTEST_PEDANTIC_ERRORS), Y)
# CPPUTEST_WARNINGFLAGS += -pedantic-errors
CPPUTEST_WARNINGFLAGS += -pedantic
endif
ifeq ($(UNAME_OS),$(LINUX_STR))
CPPUTEST_WARNINGFLAGS += -Wsign-conversion
endif
CPPUTEST_CXX_WARNINGFLAGS = -Woverloaded-virtual
CPPUTEST_C_WARNINGFLAGS = -Wstrict-prototypes
endif
#Wonderful extra compiler warnings with clang
ifeq ($(COMPILER_NAME),$(CLANG_STR))
# -Wno-disabled-macro-expansion -> Have to disable the macro expansion warning as the operator new overload warns on that.
# -Wno-padded -> I sort-of like this warning but if there is a bool at the end of the class, it seems impossible to remove it! (except by making padding explicit)
# -Wno-global-constructors Wno-exit-time-destructors -> Great warnings, but in CppUTest it is impossible to avoid as the automatic test registration depends on the global ctor and dtor
# -Wno-weak-vtables -> The TEST_GROUP macro declares a class and will automatically inline its methods. Thats ok as they are only in one translation unit. Unfortunately, the warning can't detect that, so it must be disabled.
CPPUTEST_CXX_WARNINGFLAGS += -Weverything -Wno-disabled-macro-expansion -Wno-padded -Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables
CPPUTEST_C_WARNINGFLAGS += -Weverything -Wno-padded
endif
# Uhm. Maybe put some warning flags for SunStudio here?
ifeq ($(COMPILER_NAME),$(SUNSTUDIO_CXX_STR))
CPPUTEST_CXX_WARNINGFLAGS =
CPPUTEST_C_WARNINGFLAGS =
endif
# Default dir for temporary files (d, o)
ifndef CPPUTEST_OBJS_DIR
ifndef TARGET_PLATFORM
CPPUTEST_OBJS_DIR = objs
else
CPPUTEST_OBJS_DIR = objs/$(TARGET_PLATFORM)
endif
endif
# Default dir for the outout library
ifndef CPPUTEST_LIB_DIR
ifndef TARGET_PLATFORM
CPPUTEST_LIB_DIR = lib
else
CPPUTEST_LIB_DIR = lib/$(TARGET_PLATFORM)
endif
endif
# No map by default
ifndef CPPUTEST_MAP_FILE
CPPUTEST_MAP_FILE = N
endif
# No extentions is default
ifndef CPPUTEST_USE_EXTENSIONS
CPPUTEST_USE_EXTENSIONS = N
endif
# No VPATH is default
ifndef CPPUTEST_USE_VPATH
CPPUTEST_USE_VPATH := N
endif
# Make empty, instead of 'N', for usage in $(if ) conditionals
ifneq ($(CPPUTEST_USE_VPATH), Y)
CPPUTEST_USE_VPATH :=
endif
ifndef TARGET_PLATFORM
#CPPUTEST_LIB_LINK_DIR = $(CPPUTEST_HOME)/lib
CPPUTEST_LIB_LINK_DIR = /usr/lib/x86_64-linux-gnu
else
CPPUTEST_LIB_LINK_DIR = $(CPPUTEST_HOME)/lib/$(TARGET_PLATFORM)
endif
# --------------------------------------
# derived flags in the following area
# --------------------------------------
# Without the C library, we'll need to disable the C++ library and ...
ifeq ($(CPPUTEST_USE_STD_C_LIB), N)
CPPUTEST_USE_STD_CPP_LIB = N
CPPUTEST_USE_MEM_LEAK_DETECTION = N
CPPUTEST_CPPFLAGS += -DCPPUTEST_STD_C_LIB_DISABLED
CPPUTEST_CPPFLAGS += -nostdinc
endif
CPPUTEST_CPPFLAGS += -DCPPUTEST_COMPILATION
ifeq ($(CPPUTEST_USE_MEM_LEAK_DETECTION), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED
else
ifndef CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h
endif
ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h
endif
endif
ifeq ($(CPPUTEST_ENABLE_DEBUG), Y)
CPPUTEST_CXXFLAGS += -g
CPPUTEST_CFLAGS += -g
CPPUTEST_LDFLAGS += -g
endif
ifeq ($(CPPUTEST_USE_STD_CPP_LIB), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_STD_CPP_LIB_DISABLED
ifeq ($(CPPUTEST_USE_STD_C_LIB), Y)
CPPUTEST_CXXFLAGS += -nostdinc++
endif
endif
ifdef $(GMOCK_HOME)
GTEST_HOME = $(GMOCK_HOME)/gtest
CPPUTEST_CPPFLAGS += -I$(GMOCK_HOME)/include
GMOCK_LIBRARY = $(GMOCK_HOME)/lib/.libs/libgmock.a
LD_LIBRARIES += $(GMOCK_LIBRARY)
CPPUTEST_CPPFLAGS += -DINCLUDE_GTEST_TESTS
CPPUTEST_WARNINGFLAGS =
CPPUTEST_CPPFLAGS += -I$(GTEST_HOME)/include -I$(GTEST_HOME)
GTEST_LIBRARY = $(GTEST_HOME)/lib/.libs/libgtest.a
LD_LIBRARIES += $(GTEST_LIBRARY)
endif
ifeq ($(CPPUTEST_USE_GCOV), Y)
CPPUTEST_CXXFLAGS += -fprofile-arcs -ftest-coverage
CPPUTEST_CFLAGS += -fprofile-arcs -ftest-coverage
endif
CPPUTEST_CXXFLAGS += $(CPPUTEST_WARNINGFLAGS) $(CPPUTEST_CXX_WARNINGFLAGS)
CPPUTEST_CPPFLAGS += $(CPPUTEST_WARNINGFLAGS)
CPPUTEST_CXXFLAGS += $(CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE)
CPPUTEST_CPPFLAGS += $(CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE)
CPPUTEST_CFLAGS += $(CPPUTEST_C_WARNINGFLAGS)
TARGET_MAP = $(COMPONENT_NAME).map.txt
ifeq ($(CPPUTEST_MAP_FILE), Y)
CPPUTEST_LDFLAGS += -Wl,-map,$(TARGET_MAP)
endif
# Link with CppUTest lib
CPPUTEST_LIB = $(CPPUTEST_LIB_LINK_DIR)/libCppUTest.a
ifeq ($(CPPUTEST_USE_EXTENSIONS), Y)
CPPUTEST_LIB += $(CPPUTEST_LIB_LINK_DIR)/libCppUTestExt.a
endif
ifdef CPPUTEST_STATIC_REALTIME
LD_LIBRARIES += -lrt
endif
TARGET_LIB = \
$(CPPUTEST_LIB_DIR)/lib$(COMPONENT_NAME).a
ifndef TEST_TARGET
ifndef TARGET_PLATFORM
TEST_TARGET = $(COMPONENT_NAME)_tests
else
TEST_TARGET = $(COMPONENT_NAME)_$(TARGET_PLATFORM)_tests
endif
endif
#Helper Functions
get_src_from_dir = $(wildcard $1/*.cpp) $(wildcard $1/*.cc) $(wildcard $1/*.c)
get_dirs_from_dirspec = $(wildcard $1)
get_src_from_dir_list = $(foreach dir, $1, $(call get_src_from_dir,$(dir)))
__src_to = $(subst .c,$1, $(subst .cc,$1, $(subst .cpp,$1,$(if $(CPPUTEST_USE_VPATH),$(notdir $2),$2))))
src_to = $(addprefix $(CPPUTEST_OBJS_DIR)/,$(call __src_to,$1,$2))
src_to_o = $(call src_to,.o,$1)
src_to_d = $(call src_to,.d,$1)
src_to_gcda = $(call src_to,.gcda,$1)
src_to_gcno = $(call src_to,.gcno,$1)
time = $(shell date +%s)
delta_t = $(eval minus, $1, $2)
debug_print_list = $(foreach word,$1,echo " $(word)";) echo;
#Derived
STUFF_TO_CLEAN += $(TEST_TARGET) $(TEST_TARGET).exe $(TARGET_LIB) $(TARGET_MAP)
SRC += $(call get_src_from_dir_list, $(SRC_DIRS)) $(SRC_FILES)
OBJ = $(call src_to_o,$(SRC))
STUFF_TO_CLEAN += $(OBJ)
TEST_SRC += $(call get_src_from_dir_list, $(TEST_SRC_DIRS)) $(TEST_SRC_FILES)
TEST_OBJS = $(call src_to_o,$(TEST_SRC))
STUFF_TO_CLEAN += $(TEST_OBJS)
MOCKS_SRC += $(call get_src_from_dir_list, $(MOCKS_SRC_DIRS))
MOCKS_OBJS = $(call src_to_o,$(MOCKS_SRC))
STUFF_TO_CLEAN += $(MOCKS_OBJS)
ALL_SRC = $(SRC) $(TEST_SRC) $(MOCKS_SRC)
# If we're using VPATH
ifeq ($(CPPUTEST_USE_VPATH), Y)
# gather all the source directories and add them
VPATH += $(sort $(dir $(ALL_SRC)))
# Add the component name to the objs dir path, to differentiate between same-name objects
CPPUTEST_OBJS_DIR := $(addsuffix /$(COMPONENT_NAME),$(CPPUTEST_OBJS_DIR))
endif
#Test coverage with gcov
GCOV_OUTPUT = gcov_output.txt
GCOV_REPORT = gcov_report.txt
GCOV_ERROR = gcov_error.txt
GCOV_GCDA_FILES = $(call src_to_gcda, $(ALL_SRC))
GCOV_GCNO_FILES = $(call src_to_gcno, $(ALL_SRC))
TEST_OUTPUT = $(TEST_TARGET).txt
STUFF_TO_CLEAN += \
$(GCOV_OUTPUT)\
$(GCOV_REPORT)\
$(GCOV_REPORT).html\
$(GCOV_ERROR)\
$(GCOV_GCDA_FILES)\
$(GCOV_GCNO_FILES)\
$(TEST_OUTPUT)
#The gcda files for gcov need to be deleted before each run
#To avoid annoying messages.
GCOV_CLEAN = $(SILENCE)rm -f $(GCOV_GCDA_FILES) $(GCOV_OUTPUT) $(GCOV_REPORT) $(GCOV_ERROR)
RUN_TEST_TARGET = $(SILENCE) $(GCOV_CLEAN) ; echo "Running $(TEST_TARGET)"; ./$(TEST_TARGET) $(CPPUTEST_EXE_FLAGS) -ojunit
ifeq ($(CPPUTEST_USE_GCOV), Y)
ifeq ($(COMPILER_NAME),$(CLANG_STR))
LD_LIBRARIES += --coverage
else
LD_LIBRARIES += -lgcov
endif
endif
INCLUDES_DIRS_EXPANDED = $(call get_dirs_from_dirspec, $(INCLUDE_DIRS))
INCLUDES += $(foreach dir, $(INCLUDES_DIRS_EXPANDED), -I$(dir))
MOCK_DIRS_EXPANDED = $(call get_dirs_from_dirspec, $(MOCKS_SRC_DIRS))
INCLUDES += $(foreach dir, $(MOCK_DIRS_EXPANDED), -I$(dir))
CPPUTEST_CPPFLAGS += $(INCLUDES) $(CPPUTESTFLAGS)
DEP_FILES = $(call src_to_d, $(ALL_SRC))
STUFF_TO_CLEAN += $(DEP_FILES) $(PRODUCTION_CODE_START) $(PRODUCTION_CODE_END)
STUFF_TO_CLEAN += $(STDLIB_CODE_START) $(MAP_FILE) cpputest_*.xml junit_run_output
# We'll use the CPPUTEST_CFLAGS etc so that you can override AND add to the CppUTest flags
CFLAGS = $(CPPUTEST_CFLAGS) $(CPPUTEST_ADDITIONAL_CFLAGS)
CPPFLAGS = $(CPPUTEST_CPPFLAGS) $(CPPUTEST_ADDITIONAL_CPPFLAGS)
CXXFLAGS = $(CPPUTEST_CXXFLAGS) $(CPPUTEST_ADDITIONAL_CXXFLAGS)
LDFLAGS = $(CPPUTEST_LDFLAGS) $(CPPUTEST_ADDITIONAL_LDFLAGS)
# Don't consider creating the archive a warning condition that does STDERR output
ARFLAGS := $(ARFLAGS)c
DEP_FLAGS=-MMD -MP
# Some macros for programs to be overridden. For some reason, these are not in Make defaults
RANLIB = ranlib
# Targets
.PHONY: all
all: start $(TEST_TARGET)
$(RUN_TEST_TARGET)
.PHONY: start
start: $(TEST_TARGET)
$(SILENCE)START_TIME=$(call time)
.PHONY: all_no_tests
all_no_tests: $(TEST_TARGET)
.PHONY: flags
flags:
@echo
@echo "OS ${UNAME_OS}"
@echo "Compile C and C++ source with CPPFLAGS:"
@$(call debug_print_list,$(CPPFLAGS))
@echo "Compile C++ source with CXXFLAGS:"
@$(call debug_print_list,$(CXXFLAGS))
@echo "Compile C source with CFLAGS:"
@$(call debug_print_list,$(CFLAGS))
@echo "Link with LDFLAGS:"
@$(call debug_print_list,$(LDFLAGS))
@echo "Link with LD_LIBRARIES:"
@$(call debug_print_list,$(LD_LIBRARIES))
@echo "Create libraries with ARFLAGS:"
@$(call debug_print_list,$(ARFLAGS))
TEST_DEPS = $(TEST_OBJS) $(MOCKS_OBJS) $(PRODUCTION_CODE_START) $(TARGET_LIB) $(USER_LIBS) $(PRODUCTION_CODE_END) $(CPPUTEST_LIB) $(STDLIB_CODE_START)
test-deps: $(TEST_DEPS)
$(TEST_TARGET): $(TEST_DEPS)
@echo Linking $@
$(SILENCE)$(CXX) -o $@ $^ $(LD_LIBRARIES) $(LDFLAGS)
$(TARGET_LIB): $(OBJ)
@echo Building archive $@
$(SILENCE)mkdir -p $(dir $@)
$(SILENCE)$(AR) $(ARFLAGS) $@ $^
$(SILENCE)$(RANLIB) $@
test: $(TEST_TARGET)
$(RUN_TEST_TARGET) | tee $(TEST_OUTPUT)
vtest: $(TEST_TARGET)
$(RUN_TEST_TARGET) -v | tee $(TEST_OUTPUT)
$(CPPUTEST_OBJS_DIR)/%.o: %.cc
@echo compiling $(notdir $<)
$(SILENCE)mkdir -p $(dir $@)
$(SILENCE)$(COMPILE.cpp) $(DEP_FLAGS) $(OUTPUT_OPTION) $<
$(CPPUTEST_OBJS_DIR)/%.o: %.cpp
@echo compiling $(notdir $<)
$(SILENCE)mkdir -p $(dir $@)
$(SILENCE)$(COMPILE.cpp) $(DEP_FLAGS) $(OUTPUT_OPTION) $<
$(CPPUTEST_OBJS_DIR)/%.o: %.c
@echo compiling $(notdir $<)
$(SILENCE)mkdir -p $(dir $@)
$(SILENCE)$(COMPILE.c) $(DEP_FLAGS) $(OUTPUT_OPTION) $<
ifneq "$(MAKECMDGOALS)" "clean"
-include $(DEP_FILES)
endif
.PHONY: clean
clean:
@echo Making clean
$(SILENCE)$(RM) $(STUFF_TO_CLEAN)
$(SILENCE)rm -rf gcov objs #$(CPPUTEST_OBJS_DIR)
$(SILENCE)rm -rf $(CPPUTEST_LIB_DIR)
$(SILENCE)find . -name "*.gcno" | xargs rm -f
$(SILENCE)find . -name "*.gcda" | xargs rm -f
#realclean gets rid of all gcov, o and d files in the directory tree
#not just the ones made by this makefile
.PHONY: realclean
realclean: clean
$(SILENCE)rm -rf gcov
$(SILENCE)find . -name "*.gdcno" | xargs rm -f
$(SILENCE)find . -name "*.[do]" | xargs rm -f
gcov: test
ifeq ($(CPPUTEST_USE_VPATH), Y)
$(SILENCE)gcov --object-directory $(CPPUTEST_OBJS_DIR) $(SRC) >> $(GCOV_OUTPUT) 2>> $(GCOV_ERROR)
else
$(SILENCE)for d in $(SRC_DIRS) ; do \
gcov --object-directory $(CPPUTEST_OBJS_DIR)/$$d $$d/*.c $$d/*.cpp >> $(GCOV_OUTPUT) 2>>$(GCOV_ERROR) ; \
done
$(SILENCE)for f in $(SRC_FILES) ; do \
gcov --object-directory $(CPPUTEST_OBJS_DIR)/$$f $$f >> $(GCOV_OUTPUT) 2>>$(GCOV_ERROR) ; \
done
endif
# $(CPPUTEST_HOME)/scripts/filterGcov.sh $(GCOV_OUTPUT) $(GCOV_ERROR) $(GCOV_REPORT) $(TEST_OUTPUT)
/usr/share/cpputest/scripts/filterGcov.sh $(GCOV_OUTPUT) $(GCOV_ERROR) $(GCOV_REPORT) $(TEST_OUTPUT)
$(SILENCE)cat $(GCOV_REPORT)
$(SILENCE)mkdir -p gcov
$(SILENCE)mv *.gcov gcov
$(SILENCE)mv gcov_* gcov
@echo "See gcov directory for details"
.PHONEY: format
format:
$(CPPUTEST_HOME)/scripts/reformat.sh $(PROJECT_HOME_DIR)
.PHONEY: debug
debug:
@echo
@echo "Target Source files:"
@$(call debug_print_list,$(SRC))
@echo "Target Object files:"
@$(call debug_print_list,$(OBJ))
@echo "Test Source files:"
@$(call debug_print_list,$(TEST_SRC))
@echo "Test Object files:"
@$(call debug_print_list,$(TEST_OBJS))
@echo "Mock Source files:"
@$(call debug_print_list,$(MOCKS_SRC))
@echo "Mock Object files:"
@$(call debug_print_list,$(MOCKS_OBJS))
@echo "All Input Dependency files:"
@$(call debug_print_list,$(DEP_FILES))
@echo Stuff to clean:
@$(call debug_print_list,$(STUFF_TO_CLEAN))
@echo Includes:
@$(call debug_print_list,$(INCLUDES))
-include $(OTHER_MAKEFILE_TO_INCLUDE)

View File

@ -0,0 +1,21 @@
include ../../makefile_defines.txt
COMPONENT_NAME = AT_CellularBase_unit
#This must be changed manually
SRC_FILES = \
../../../framework/AT/AT_CellularBase.cpp
TEST_SRC_FILES = \
main.cpp \
at_cellularbasetest.cpp \
test_at_cellularbase.cpp \
../../stubs/ATHandler_stub.cpp \
../../stubs/EventQueue_stub.cpp \
../../stubs/FileHandle_stub.cpp \
../../stubs/mbed_assert_stub.cpp \
include ../../MakefileWorker.mk
CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT

View File

@ -0,0 +1,37 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
*/
#include "CppUTest/TestHarness.h"
#include "test_at_cellularbase.h"
#include "AT_CellularBase.h"
TEST_GROUP(AT_CellularBase)
{
Test_AT_CellularBase* unit;
void setup()
{
unit = new Test_AT_CellularBase();
}
void teardown()
{
delete unit;
}
};
TEST(AT_CellularBase, Create)
{
CHECK(unit != NULL);
}
TEST(AT_CellularBase, test_AT_CellularBase_get_at_handler)
{
unit->test_AT_CellularBase_get_at_handler();
}
TEST(AT_CellularBase, test_AT_CellularBase_get_device_error)
{
unit->test_AT_CellularBase_get_device_error();
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" hostname="localhost" name="AT_CellularBase" tests="3" time="0.000" timestamp="2018-02-11T22:58:53">
<properties>
</properties>
<testcase classname="AT_CellularBase" name="test_AT_CellularBase_get_device_error" time="0.000">
</testcase>
<testcase classname="AT_CellularBase" name="test_AT_CellularBase_get_at_handler" time="0.000">
</testcase>
<testcase classname="AT_CellularBase" name="Create" time="0.000">
</testcase>
<system-out></system-out>
<system-err></system-err>
</testsuite>

View File

@ -0,0 +1,41 @@
-: 0:Source:../../../framework/AT/AT_CellularBase.cpp
-: 0:Graph:objs/AT_CellularBase_unit/AT_CellularBase.gcno
-: 0:Data:objs/AT_CellularBase_unit/AT_CellularBase.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/*
-: 2: * Copyright (c) 2017, Arm Limited and affiliates.
-: 3: * SPDX-License-Identifier: Apache-2.0
-: 4: *
-: 5: * Licensed under the Apache License, Version 2.0 (the "License");
-: 6: * you may not use this file except in compliance with the License.
-: 7: * You may obtain a copy of the License at
-: 8: *
-: 9: * http://www.apache.org/licenses/LICENSE-2.0
-: 10: *
-: 11: * Unless required by applicable law or agreed to in writing, software
-: 12: * distributed under the License is distributed on an "AS IS" BASIS,
-: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-: 14: * See the License for the specific language governing permissions and
-: 15: * limitations under the License.
-: 16: */
-: 17:
-: 18:#include "AT_CellularBase.h"
-: 19:
-: 20:using namespace mbed;
-: 21:
2: 22:AT_CellularBase::AT_CellularBase(ATHandler& at) : _at(at)
-: 23:{
-: 24:
2: 25:}
-: 26:
1: 27:ATHandler& AT_CellularBase::get_at_handler()
-: 28:{
1: 29: return _at;
-: 30:}
-: 31:
1: 32:device_err_t AT_CellularBase::get_device_error() const
-: 33:{
1: 34: return _at.get_last_device_error();
-: 35:}
-: 36:

View File

@ -0,0 +1,4 @@
File '../../../framework/AT/AT_CellularBase.cpp'
Lines executed:100.00% of 6
Creating 'AT_CellularBase.cpp.gcov'

View File

@ -0,0 +1 @@
100.00% ../framework/AT/AT_CellularBase.cpp

View File

@ -0,0 +1,4 @@
<table border=2 cellspacing=5 cellpadding=5>
<tr><th>Coverage</th><th>File</th></tr>
<tr><td>100.00% </td><td>../framework/AT/<a href='file:./AT_CellularBase.cpp.gcov'>AT_CellularBase.cpp</a></td></tr>
</table>

View File

@ -0,0 +1,15 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
*/
#include "CppUTest/CommandLineTestRunner.h"
#include "CppUTest/TestPlugin.h"
#include "CppUTest/TestRegistry.h"
#include "CppUTestExt/MockSupportPlugin.h"
int main(int ac, char** av)
{
return CommandLineTestRunner::RunAllTests(ac, av);
}
IMPORT_TEST_GROUP(AT_CellularBase);

View File

@ -0,0 +1,78 @@
objs/AT_CellularBase_unit/ATHandler_stub.o: \
../../stubs/ATHandler_stub.cpp \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
../../../../../platform/platform.h ../../target_h/device.h \
../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
../../../framework/common/CellularLog.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../../../../platform/mbed_debug.h
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../stubs/ATHandler_stub.h:
../../stubs/FileHandle_stub.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/device.h:
../../target_h/PinNames.h:
../../target_h/PeripheralNames.h:
../../../framework/common/CellularLog.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,48 @@
objs/AT_CellularBase_unit/AT_CellularBase.o: \
../../../framework/AT/AT_CellularBase.cpp \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/Callback.h
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/Callback.h:

View File

@ -0,0 +1,32 @@
objs/AT_CellularBase_unit/EventQueue_stub.o: \
../../stubs/EventQueue_stub.cpp ../../../../../events/EventQueue.h \
../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h ../../../../../platform/Callback.h
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/Callback.h:

View File

@ -0,0 +1,42 @@
objs/AT_CellularBase_unit/FileHandle_stub.o: \
../../stubs/FileHandle_stub.cpp ../../stubs/FileHandle_stub.h \
../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h
../../stubs/FileHandle_stub.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/platform/mbed_retarget.h:
../../target_h/device.h:
../../target_h/PinNames.h:
../../target_h/PeripheralNames.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,49 @@
objs/AT_CellularBase_unit/at_cellularbasetest.o: at_cellularbasetest.cpp \
test_at_cellularbase.h ../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/Callback.h
test_at_cellularbase.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/Callback.h:

View File

@ -0,0 +1 @@
objs/AT_CellularBase_unit/main.o: main.cpp

View File

@ -0,0 +1,7 @@
objs/AT_CellularBase_unit/mbed_assert_stub.o: \
../../stubs/mbed_assert_stub.cpp ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:

View File

@ -0,0 +1,77 @@
objs/AT_CellularBase_unit/test_at_cellularbase.o: \
test_at_cellularbase.cpp test_at_cellularbase.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../platform/PlatformMutex.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
../../../framework/AT/ATHandler.h ../../stubs/FileHandle_stub.h \
../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
../../target_h/device.h ../../target_h/PinNames.h \
../../target_h/PeripheralNames.h ../../stubs/FileHandle_stub.h
test_at_cellularbase.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../platform/PlatformMutex.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/Callback.h:
../../stubs/ATHandler_stub.h:
../../../framework/AT/ATHandler.h:
../../stubs/FileHandle_stub.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/device.h:
../../target_h/PinNames.h:
../../target_h/PeripheralNames.h:
../../stubs/FileHandle_stub.h:

View File

@ -0,0 +1,46 @@
/*
* Copyright (c) 2018 ARM. All rights reserved.
*/
#include "CppUTest/TestHarness.h"
#include "test_at_cellularbase.h"
#include "EventQueue.h"
#include "AT_CellularBase.h"
#include "ATHandler_stub.h"
#include "FileHandle_stub.h"
#include <string.h>
using namespace mbed;
using namespace events;
Test_AT_CellularBase::Test_AT_CellularBase()
{
}
Test_AT_CellularBase::~Test_AT_CellularBase()
{
}
void Test_AT_CellularBase::test_AT_CellularBase_get_at_handler()
{
EventQueue eq;
FileHandle_stub fh;
ATHandler ah(&fh, eq, 100);
AT_CellularBase at(ah);
CHECK(&ah == &at.get_at_handler());
}
void Test_AT_CellularBase::test_AT_CellularBase_get_device_error()
{
EventQueue eq;
FileHandle_stub fh;
ATHandler ah(&fh, eq, 0);
AT_CellularBase at(ah);
ATHandler_stub::device_err_value.errCode = 8;
CHECK_EQUAL(8, at.get_device_error().errCode);
ATHandler_stub::device_err_value.errCode = 0;
}

View File

@ -0,0 +1,20 @@
/*
* Copyright (c) 2018 ARM. All rights reserved.
*/
#ifndef TEST_AT_CELLULARBASE_H
#define TEST_AT_CELLULARBASE_H
class Test_AT_CellularBase
{
public:
Test_AT_CellularBase();
virtual ~Test_AT_CellularBase();
void test_AT_CellularBase_get_at_handler();
void test_AT_CellularBase_get_device_error();
};
#endif // TEST_AT_CELLULARBASE_H

View File

@ -0,0 +1,30 @@
include ../../makefile_defines.txt
COMPONENT_NAME = AT_CellularDevice_unit
#This must be changed manually
SRC_FILES = \
../../../framework/AT/AT_CellularDevice.cpp
TEST_SRC_FILES = \
main.cpp \
at_cellulardevicetest.cpp \
test_at_cellulardevice.cpp \
../../stubs/AT_CellularNetwork_stub.cpp \
../../stubs/ATHandler_stub.cpp \
../../stubs/AT_CellularSMS_stub.cpp \
../../stubs/AT_CellularSIM_stub.cpp \
../../stubs/AT_CellularPower_stub.cpp \
../../stubs/AT_CellularInformation_stub.cpp \
../../stubs/AT_CellularMultiplexer_stub.cpp \
../../stubs/CellularUtil_stub.cpp \
../../stubs/AT_CellularBase_stub.cpp \
../../stubs/NetworkInterface_stub.cpp \
../../stubs/EventQueue_stub.cpp \
../../stubs/FileHandle_stub.cpp \
../../stubs/mbed_assert_stub.cpp \
include ../../MakefileWorker.mk
CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT

View File

@ -0,0 +1,96 @@
/*
* Copyright (c) 2018 ARM. All rights reserved.
*/
#include "CppUTest/TestHarness.h"
#include "test_at_cellulardevice.h"
TEST_GROUP(AT_CellularDevice)
{
Test_AT_CellularDevice* unit;
void setup()
{
unit = new Test_AT_CellularDevice();
}
void teardown()
{
delete unit;
}
};
TEST(AT_CellularDevice, Create)
{
CHECK(unit != NULL);
}
TEST(AT_CellularDevice, test_AT_CellularDevice_constructor)
{
unit->test_AT_CellularDevice_constructor();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_get_at_handler)
{
unit->test_AT_CellularDevice_get_at_handler();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_network)
{
unit->test_AT_CellularDevice_open_network();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_sms)
{
unit->test_AT_CellularDevice_open_sms();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_power)
{
unit->test_AT_CellularDevice_open_power();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_sim)
{
unit->test_AT_CellularDevice_open_sim();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_multiplexer)
{
unit->test_AT_CellularDevice_open_multiplexer();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_open_information)
{
unit->test_AT_CellularDevice_open_information();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_network)
{
unit->test_AT_CellularDevice_close_network();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_sms)
{
unit->test_AT_CellularDevice_close_sms();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_power)
{
unit->test_AT_CellularDevice_close_power();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_sim)
{
unit->test_AT_CellularDevice_close_sim();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_multiplexer)
{
unit->test_AT_CellularDevice_close_multiplexer();
}
TEST(AT_CellularDevice, test_AT_CellularDevice_close_information)
{
unit->test_AT_CellularDevice_close_information();
}

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" hostname="localhost" name="AT_CellularDevice" tests="15" time="0.000" timestamp="2018-02-11T22:58:55">
<properties>
</properties>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_information" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_multiplexer" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_sim" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_power" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_sms" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_close_network" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_information" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_multiplexer" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_sim" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_power" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_sms" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_open_network" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_get_at_handler" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="test_AT_CellularDevice_constructor" time="0.000">
</testcase>
<testcase classname="AT_CellularDevice" name="Create" time="0.000">
</testcase>
<system-out></system-out>
<system-err></system-err>
</testsuite>

View File

@ -0,0 +1,253 @@
-: 0:Source:../../../framework/AT/AT_CellularDevice.cpp
-: 0:Graph:objs/AT_CellularDevice_unit/AT_CellularDevice.gcno
-: 0:Data:objs/AT_CellularDevice_unit/AT_CellularDevice.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/*
-: 2: * Copyright (c) 2017, Arm Limited and affiliates.
-: 3: * SPDX-License-Identifier: Apache-2.0
-: 4: *
-: 5: * Licensed under the Apache License, Version 2.0 (the "License");
-: 6: * you may not use this file except in compliance with the License.
-: 7: * You may obtain a copy of the License at
-: 8: *
-: 9: * http://www.apache.org/licenses/LICENSE-2.0
-: 10: *
-: 11: * Unless required by applicable law or agreed to in writing, software
-: 12: * distributed under the License is distributed on an "AS IS" BASIS,
-: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-: 14: * See the License for the specific language governing permissions and
-: 15: * limitations under the License.
-: 16: */
-: 17:
-: 18:#include "AT_CellularDevice.h"
-: 19:
-: 20:using namespace events;
-: 21:using namespace mbed;
-: 22:
-: 23:#define DEFAULT_AT_TIMEOUT 1000 // at default timeout in milliseconds
-: 24:
10: 25:AT_CellularDevice::AT_CellularDevice(EventQueue &queue) :
10: 26: _atHandlers(0), _network(0), _sms(0), _sim(0), _power(0), _multiplexer(0), _information(0), _queue(queue), _default_timeout(DEFAULT_AT_TIMEOUT)
-: 27:{
10: 28:}
-: 29:
21: 30:AT_CellularDevice::~AT_CellularDevice()
-: 31:{
10: 32: close_network();
10: 33: close_sms();
10: 34: close_power();
10: 35: close_sim();
10: 36: close_multiplexer();
10: 37: close_information();
-: 38:
10: 39: ATHandler *atHandler = _atHandlers;
26: 40: while (atHandler) {
8: 41: ATHandler *old = atHandler;
8: 42: atHandler = atHandler->_nextATHandler;
8: 43: delete old;
8: 44: old = NULL;
-: 45: }
11: 46:}
-: 47:
-: 48:// each parser is associated with one filehandle (that is UART or a MUX channel)
18: 49:ATHandler* AT_CellularDevice::get_at_handler(FileHandle *fileHandle)
-: 50:{
18: 51: if (!fileHandle) {
6: 52: return NULL;
-: 53: }
12: 54: ATHandler *atHandler = _atHandlers;
18: 55: while (atHandler) {
5: 56: if (atHandler->get_file_handle() == fileHandle) {
2: 57: atHandler->inc_ref_count();
2: 58: return atHandler;
-: 59: }
3: 60: atHandler = atHandler->_nextATHandler;
-: 61: }
-: 62:
10: 63: atHandler = new ATHandler(fileHandle, _queue, _default_timeout);
10: 64: if (atHandler) {
10: 65: atHandler->_nextATHandler = _atHandlers;
10: 66: _atHandlers = atHandler;
-: 67: }
-: 68:
10: 69: return atHandler;
-: 70:}
-: 71:
12: 72:void AT_CellularDevice::release_at_handler(ATHandler* at_handler)
-: 73:{
12: 74: if (!at_handler) {
1: 75: return;
-: 76: }
11: 77: at_handler->dec_ref_count();
11: 78: if (at_handler->get_ref_count() == 0) {
-: 79: // we can delete this at_handler
11: 80: ATHandler *atHandler = _atHandlers;
11: 81: ATHandler *prev = NULL;
37: 82: while (atHandler) {
15: 83: if (atHandler == at_handler) {
2: 84: if (prev == NULL) {
1: 85: _atHandlers = _atHandlers->_nextATHandler;
-: 86: }
-: 87: else {
1: 88: prev->_nextATHandler = atHandler->_nextATHandler;
-: 89: }
2: 90: delete atHandler;
2: 91: atHandler = NULL;
2: 92: break;
-: 93: } else {
13: 94: prev = atHandler;
13: 95: atHandler =atHandler->_nextATHandler;
-: 96: }
-: 97: }
-: 98: }
-: 99:}
-: 100:
3: 101:CellularNetwork *AT_CellularDevice::open_network(FileHandle *fh)
-: 102:{
3: 103: if (!_network) {
3: 104: ATHandler *atHandler = get_at_handler(fh);
3: 105: if (atHandler) {
2: 106: _network = new AT_CellularNetwork(*atHandler);
2: 107: if (!_network) {
#####: 108: release_at_handler(atHandler);
-: 109: }
-: 110: }
-: 111: }
3: 112: return _network;
-: 113:}
-: 114:
3: 115:CellularSMS *AT_CellularDevice::open_sms(FileHandle *fh)
-: 116:{
3: 117: if (!_sms) {
3: 118: ATHandler *atHandler = get_at_handler(fh);
3: 119: if (atHandler) {
2: 120: _sms = new AT_CellularSMS(*atHandler);
2: 121: if (!_sms) {
#####: 122: release_at_handler(atHandler);
-: 123: }
-: 124: }
-: 125: }
3: 126: return _sms;
-: 127:}
-: 128:
3: 129:CellularSIM *AT_CellularDevice::open_sim(FileHandle *fh)
-: 130:{
3: 131: if (!_sim) {
3: 132: ATHandler *atHandler = get_at_handler(fh);
3: 133: if (atHandler) {
2: 134: _sim = new AT_CellularSIM(*atHandler);
2: 135: if (!_sim) {
#####: 136: release_at_handler(atHandler);
-: 137: }
-: 138: }
-: 139: }
3: 140: return _sim;
-: 141:}
-: 142:
3: 143:CellularPower *AT_CellularDevice::open_power(FileHandle *fh)
-: 144:{
3: 145: if (!_power) {
3: 146: ATHandler *atHandler = get_at_handler(fh);
3: 147: if (atHandler) {
2: 148: _power = new AT_CellularPower(*atHandler);
2: 149: if (!_power) {
#####: 150: release_at_handler(atHandler);
-: 151: }
-: 152: }
-: 153: }
3: 154: return _power;
-: 155:}
-: 156:
2: 157:CellularMultiplexer *AT_CellularDevice::open_multiplexer(FileHandle *fh)
-: 158:{
2: 159: if (!_multiplexer) {
2: 160: ATHandler *atHandler = get_at_handler(fh);
2: 161: if (atHandler) {
1: 162: _multiplexer = new AT_CellularMultiplexer(*atHandler);
1: 163: if (!_multiplexer) {
#####: 164: release_at_handler(atHandler);
-: 165: }
-: 166: }
-: 167: }
-: 168:
2: 169: return _multiplexer;
-: 170:}
-: 171:
4: 172:CellularInformation *AT_CellularDevice::open_information(FileHandle *fh)
-: 173:{
4: 174: if (!_information) {
4: 175: ATHandler *atHandler = get_at_handler(fh);
4: 176: if (atHandler) {
3: 177: _information = new AT_CellularInformation(*atHandler);
3: 178: if (!_information) {
#####: 179: release_at_handler(atHandler);
-: 180: }
-: 181: }
-: 182: }
4: 183: return _information;
-: 184:}
-: 185:
10: 186:void AT_CellularDevice::close_network()
-: 187:{
10: 188: if (_network) {
2: 189: release_at_handler(&_network->get_at_handler());
2: 190: delete _network;
2: 191: _network = NULL;
-: 192: }
10: 193:}
-: 194:
10: 195:void AT_CellularDevice::close_sms()
-: 196:{
10: 197: if (_sms) {
2: 198: release_at_handler(&_sms->get_at_handler());
2: 199: delete _sms;
2: 200: _sms = NULL;
-: 201: }
10: 202:}
10: 203:void AT_CellularDevice::close_power()
-: 204:{
10: 205: if (_power) {
2: 206: release_at_handler(&_power->get_at_handler());
2: 207: delete _power;
2: 208: _power = NULL;
-: 209: }
10: 210:}
-: 211:
10: 212:void AT_CellularDevice::close_sim()
-: 213:{
10: 214: if (_sim) {
2: 215: release_at_handler(&_sim->get_at_handler());
2: 216: delete _sim;
2: 217: _sim = NULL;
-: 218: }
10: 219:}
-: 220:
10: 221:void AT_CellularDevice::close_multiplexer()
-: 222:{
10: 223: if (_multiplexer) {
1: 224: release_at_handler(&_multiplexer->get_at_handler());
1: 225: delete _multiplexer;
1: 226: _multiplexer = NULL;
-: 227: }
10: 228:}
-: 229:
12: 230:void AT_CellularDevice::close_information()
-: 231:{
12: 232: if (_information) {
3: 233: release_at_handler(&_information->get_at_handler());
3: 234: delete _information;
3: 235: _information = NULL;
-: 236: }
12: 237:}
-: 238:
#####: 239:void AT_CellularDevice::set_timeout(int timeout)
-: 240:{
#####: 241: _default_timeout = timeout;
-: 242:
#####: 243: ATHandler *atHandler = _atHandlers;
#####: 244: while (atHandler) {
#####: 245: atHandler->set_at_timeout(_default_timeout, true); // set as default timeout
#####: 246: atHandler = atHandler->_nextATHandler;
-: 247: }
#####: 248:}

View File

@ -0,0 +1,126 @@
-: 0:Source:../../../framework/API/CellularDevice.h
-: 0:Graph:objs/AT_CellularDevice_unit/AT_CellularDevice.gcno
-: 0:Data:objs/AT_CellularDevice_unit/AT_CellularDevice.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:/*
-: 2: * Copyright (c) 2017, Arm Limited and affiliates.
-: 3: * SPDX-License-Identifier: Apache-2.0
-: 4: *
-: 5: * Licensed under the Apache License, Version 2.0 (the "License");
-: 6: * you may not use this file except in compliance with the License.
-: 7: * You may obtain a copy of the License at
-: 8: *
-: 9: * http://www.apache.org/licenses/LICENSE-2.0
-: 10: *
-: 11: * Unless required by applicable law or agreed to in writing, software
-: 12: * distributed under the License is distributed on an "AS IS" BASIS,
-: 13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-: 14: * See the License for the specific language governing permissions and
-: 15: * limitations under the License.
-: 16: */
-: 17:
-: 18:#ifndef CELLULAR_DEVICE_H_
-: 19:#define CELLULAR_DEVICE_H_
-: 20:
-: 21:#include "FileHandle.h"
-: 22:
-: 23:#include "CellularSIM.h"
-: 24:#include "CellularNetwork.h"
-: 25:#include "CellularSMS.h"
-: 26:#include "CellularPower.h"
-: 27:#include "CellularMultiplexer.h"
-: 28:#include "CellularInformation.h"
-: 29:
-: 30:namespace mbed {
-: 31:
-: 32:/**
-: 33: * Class CellularDevice
-: 34: *
-: 35: * An abstract interface that defines opening and closing of cellular interfaces.
-: 36: * Deleting/Closing of opened interfaces can be done only via this class.
-: 37: */
10: 38:class CellularDevice
-: 39:{
-: 40:public:
-: 41: /** virtual Destructor
-: 42: */
10: 43: virtual ~CellularDevice() {}
-: 44:
-: 45:public:
-: 46: /** Create new CellularNetwork interface.
-: 47: *
-: 48: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 49: * @return New instance of interface CellularNetwork.
-: 50: */
-: 51: virtual CellularNetwork *open_network(FileHandle *fh) = 0;
-: 52:
-: 53: /** Create new CellularSMS interface.
-: 54: *
-: 55: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 56: * @return New instance of interface CellularSMS.
-: 57: */
-: 58: virtual CellularSMS *open_sms(FileHandle *fh) = 0;
-: 59:
-: 60: /** Create new CellularPower interface.
-: 61: *
-: 62: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 63: * @return New instance of interface CellularPower.
-: 64: */
-: 65: virtual CellularPower *open_power(FileHandle *fh) = 0;
-: 66:
-: 67: /** Create new CellularSIM interface.
-: 68: *
-: 69: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 70: * @return New instance of interface CellularSIM.
-: 71: */
-: 72: virtual CellularSIM *open_sim(FileHandle *fh) = 0;
-: 73:
-: 74: /** Create new CellularMultiplexer interface.
-: 75: *
-: 76: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 77: * @return New instance of interface CellularMultiplexer.
-: 78: */
-: 79: virtual CellularMultiplexer *open_multiplexer(FileHandle *fh) = 0;
-: 80:
-: 81: /** Create new CellularInformation interface.
-: 82: *
-: 83: * @param fh file handle used in communication to modem. Can be for example UART handle.
-: 84: * @return New instance of interface CellularInformation.
-: 85: */
-: 86: virtual CellularInformation *open_information(FileHandle *fh) = 0;
-: 87:
-: 88: /** Closes the opened CellularNetwork by deleting the CellularNetwork instance.
-: 89: */
-: 90: virtual void close_network() = 0;
-: 91:
-: 92: /** Closes the opened CellularNetwork by deleting the CellularSMS instance.
-: 93: */
-: 94: virtual void close_sms() = 0;
-: 95:
-: 96: /** Closes the opened CellularNetwork by deleting the CellularPower instance.
-: 97: */
-: 98: virtual void close_power() = 0;
-: 99:
-: 100: /** Closes the opened CellularNetwork by deleting the CellularSIM instance.
-: 101: */
-: 102: virtual void close_sim() = 0;
-: 103:
-: 104: /** Closes the opened CellularNetwork by deleting the CellularMultiplexer instance.
-: 105: */
-: 106: virtual void close_multiplexer() = 0;
-: 107:
-: 108: /** Closes the opened CellularNetwork by deleting the CellularInformation instance.
-: 109: */
-: 110: virtual void close_information() = 0;
-: 111:
-: 112: /** Set the default response timeout.
-: 113: *
-: 114: * @param timeout milliseconds to wait response from modem
-: 115: */
-: 116: virtual void set_timeout(int timeout) = 0;
-: 117:};
-: 118:
-: 119:} // namespace mbed
-: 120:
-: 121:#endif // CELLULAR_DEVICE_H_

View File

@ -0,0 +1,8 @@
File '../../../framework/AT/AT_CellularDevice.cpp'
Lines executed:90.65% of 139
Creating 'AT_CellularDevice.cpp.gcov'
File '../../../framework/API/CellularDevice.h'
Lines executed:100.00% of 2
Creating 'CellularDevice.h.gcov'

View File

@ -0,0 +1,2 @@
100.00% ../framework/API/CellularDevice.h
90.65% ../framework/AT/AT_CellularDevice.cpp

View File

@ -0,0 +1,5 @@
<table border=2 cellspacing=5 cellpadding=5>
<tr><th>Coverage</th><th>File</th></tr>
<tr><td>100.00% </td><td>../framework/API/<a href='file:./CellularDevice.h.gcov'>CellularDevice.h</a></td></tr>
<tr><td> 90.65% </td><td>../framework/AT/<a href='file:./AT_CellularDevice.cpp.gcov'>AT_CellularDevice.cpp</a></td></tr>
</table>

View File

@ -0,0 +1,15 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
*/
#include "CppUTest/CommandLineTestRunner.h"
#include "CppUTest/TestPlugin.h"
#include "CppUTest/TestRegistry.h"
#include "CppUTestExt/MockSupportPlugin.h"
int main(int ac, char** av)
{
return CommandLineTestRunner::RunAllTests(ac, av);
}
IMPORT_TEST_GROUP(AT_CellularDevice);

View File

@ -0,0 +1,78 @@
objs/AT_CellularDevice_unit/ATHandler_stub.o: \
../../stubs/ATHandler_stub.cpp \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h ../../stubs/ATHandler_stub.h \
../../stubs/FileHandle_stub.h ../../../../../platform/FileHandle.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_poll.h \
../../../../../platform/platform.h ../../target_h/device.h \
../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
../../../framework/common/CellularLog.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../../../../platform/mbed_debug.h
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../stubs/ATHandler_stub.h:
../../stubs/FileHandle_stub.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/device.h:
../../target_h/PinNames.h:
../../target_h/PeripheralNames.h:
../../../framework/common/CellularLog.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,53 @@
objs/AT_CellularDevice_unit/AT_CellularBase_stub.o: \
../../stubs/AT_CellularBase_stub.cpp \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h ../../stubs/AT_CellularBase_stub.h \
../../../framework/AT/ATHandler.h
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../stubs/AT_CellularBase_stub.h:
../../../framework/AT/ATHandler.h:

View File

@ -0,0 +1,152 @@
objs/AT_CellularDevice_unit/AT_CellularDevice.o: \
../../../framework/AT/AT_CellularDevice.cpp \
../../../framework/AT/AT_CellularDevice.h \
../../../framework/API/CellularDevice.h \
../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
../../target_h/platform/mbed_retarget.h ../../target_h/device.h \
../../target_h/PinNames.h ../../target_h/PeripheralNames.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../framework/API/CellularSIM.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/API/CellularNetwork.h \
../../../../../features/netsocket/CellularInterface.h \
../../../../../features/netsocket/NetworkInterface.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../features/netsocket/SocketAddress.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/mbed_toolchain.h \
../../../../../features/netsocket/NetworkInterface.h \
../../../framework/common/CellularList.h \
../../../framework/API/CellularSMS.h ../../../../../platform/Callback.h \
../../../framework/API/CellularPower.h \
../../../framework/API/CellularMultiplexer.h \
../../../framework/API/CellularInformation.h \
../../../framework/AT/AT_CellularNetwork.h \
../../../framework/API/CellularNetwork.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h ../../../../../events/EventQueue.h \
../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h \
../../../../../platform/PlatformMutex.h \
../../../../../features/netsocket/NetworkStack.h \
../../../framework/AT/AT_CellularSIM.h \
../../../framework/API/CellularSIM.h \
../../../framework/AT/AT_CellularSMS.h \
../../../framework/API/CellularSMS.h \
../../../framework/AT/AT_CellularPower.h \
../../../framework/API/CellularPower.h \
../../../framework/AT/AT_CellularMultiplexer.h \
../../../framework/API/CellularMultiplexer.h \
../../../framework/AT/AT_CellularInformation.h \
../../../framework/API/CellularInformation.h
../../../framework/AT/AT_CellularDevice.h:
../../../framework/API/CellularDevice.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/platform/mbed_retarget.h:
../../target_h/device.h:
../../target_h/PinNames.h:
../../target_h/PeripheralNames.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../framework/API/CellularSIM.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/API/CellularNetwork.h:
../../../../../features/netsocket/CellularInterface.h:
../../../../../features/netsocket/NetworkInterface.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../features/netsocket/SocketAddress.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/mbed_toolchain.h:
../../../../../features/netsocket/NetworkInterface.h:
../../../framework/common/CellularList.h:
../../../framework/API/CellularSMS.h:
../../../../../platform/Callback.h:
../../../framework/API/CellularPower.h:
../../../framework/API/CellularMultiplexer.h:
../../../framework/API/CellularInformation.h:
../../../framework/AT/AT_CellularNetwork.h:
../../../framework/API/CellularNetwork.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/PlatformMutex.h:
../../../../../features/netsocket/NetworkStack.h:
../../../framework/AT/AT_CellularSIM.h:
../../../framework/API/CellularSIM.h:
../../../framework/AT/AT_CellularSMS.h:
../../../framework/API/CellularSMS.h:
../../../framework/AT/AT_CellularPower.h:
../../../framework/API/CellularPower.h:
../../../framework/AT/AT_CellularMultiplexer.h:
../../../framework/API/CellularMultiplexer.h:
../../../framework/AT/AT_CellularInformation.h:
../../../framework/API/CellularInformation.h:

View File

@ -0,0 +1,54 @@
objs/AT_CellularDevice_unit/AT_CellularInformation_stub.o: \
../../stubs/AT_CellularInformation_stub.cpp \
../../../framework/AT/AT_CellularInformation.h \
../../../framework/API/CellularInformation.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h
../../../framework/AT/AT_CellularInformation.h:
../../../framework/API/CellularInformation.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:

View File

@ -0,0 +1,69 @@
objs/AT_CellularDevice_unit/AT_CellularMultiplexer_stub.o: \
../../stubs/AT_CellularMultiplexer_stub.cpp \
../../../framework/AT/AT_CellularMultiplexer.h \
../../../framework/API/CellularMultiplexer.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h \
../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../target_h/device.h ../../../../../platform/mbed_debug.h
../../../framework/AT/AT_CellularMultiplexer.h:
../../../framework/API/CellularMultiplexer.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../../framework/common/CellularLog.h:
../../target_h/PinNames.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../target_h/device.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,112 @@
objs/AT_CellularDevice_unit/AT_CellularNetwork_stub.o: \
../../stubs/AT_CellularNetwork_stub.cpp \
../../../framework/AT/AT_CellularNetwork.h \
../../../framework/API/CellularNetwork.h \
../../../../../features/netsocket/CellularInterface.h \
../../../../../features/netsocket/NetworkInterface.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../features/netsocket/SocketAddress.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../features/netsocket/NetworkInterface.h \
../../../framework/common/CellularList.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../features/netsocket/nsapi_types.h \
../../../../../platform/Callback.h \
../../../../../features/netsocket/NetworkStack.h \
../../../framework/common/CellularUtil.h \
../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../target_h/device.h ../../../../../platform/mbed_debug.h \
../../../../../platform/FileHandle.h ../../../../../platform/Callback.h \
../../../../../platform/mbed_poll.h ../../../../../platform/platform.h \
../../target_h/PeripheralNames.h
../../../framework/AT/AT_CellularNetwork.h:
../../../framework/API/CellularNetwork.h:
../../../../../features/netsocket/CellularInterface.h:
../../../../../features/netsocket/NetworkInterface.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../features/netsocket/SocketAddress.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../features/netsocket/NetworkInterface.h:
../../../framework/common/CellularList.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../features/netsocket/nsapi_types.h:
../../../../../platform/Callback.h:
../../../../../features/netsocket/NetworkStack.h:
../../../framework/common/CellularUtil.h:
../../../framework/common/CellularLog.h:
../../target_h/PinNames.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../target_h/device.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/FileHandle.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_poll.h:
../../../../../platform/platform.h:
../../target_h/PeripheralNames.h:

View File

@ -0,0 +1,72 @@
objs/AT_CellularDevice_unit/AT_CellularPower_stub.o: \
../../stubs/AT_CellularPower_stub.cpp \
../../../framework/AT/AT_CellularPower.h \
../../../framework/API/CellularPower.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h \
../../../framework/common/CellularUtil.h \
../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../target_h/device.h ../../../../../platform/mbed_debug.h
../../../framework/AT/AT_CellularPower.h:
../../../framework/API/CellularPower.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../../framework/common/CellularUtil.h:
../../../framework/common/CellularLog.h:
../../target_h/PinNames.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../target_h/device.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,69 @@
objs/AT_CellularDevice_unit/AT_CellularSIM_stub.o: \
../../stubs/AT_CellularSIM_stub.cpp \
../../../framework/AT/AT_CellularSIM.h \
../../../framework/API/CellularSIM.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../../../platform/Callback.h \
../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../target_h/device.h ../../../../../platform/mbed_debug.h
../../../framework/AT/AT_CellularSIM.h:
../../../framework/API/CellularSIM.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../../../platform/Callback.h:
../../../framework/common/CellularLog.h:
../../target_h/PinNames.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../target_h/device.h:
../../../../../platform/mbed_debug.h:

View File

@ -0,0 +1,68 @@
objs/AT_CellularDevice_unit/AT_CellularSMS_stub.o: \
../../stubs/AT_CellularSMS_stub.cpp \
../../../framework/AT/AT_CellularSMS.h \
../../../framework/API/CellularSMS.h ../../../../../platform/Callback.h \
../../../../../platform/mbed_assert.h \
../../../../../platform/mbed_preprocessor.h \
../../../../../platform/mbed_toolchain.h \
../../../../../features/netsocket/nsapi_types.h \
../../../framework/AT/AT_CellularBase.h \
../../../framework/AT/ATHandler.h \
../../target_h/platform/mbed_retarget.h \
../../../../../events/EventQueue.h ../../../../../events/equeue/equeue.h \
../../../../../events/equeue/equeue_platform.h \
../../../../../platform/Callback.h ../../../../../platform/NonCopyable.h \
../../../../../platform/mbed_toolchain.h \
../../../../../platform/mbed_debug.h \
../../../../../platform/PlatformMutex.h \
../../../framework/common/CellularLog.h ../../target_h/PinNames.h \
../../../../../hal/us_ticker_api.h ../../../../../hal/ticker_api.h \
../../target_h/device.h ../../../../../platform/mbed_debug.h
../../../framework/AT/AT_CellularSMS.h:
../../../framework/API/CellularSMS.h:
../../../../../platform/Callback.h:
../../../../../platform/mbed_assert.h:
../../../../../platform/mbed_preprocessor.h:
../../../../../platform/mbed_toolchain.h:
../../../../../features/netsocket/nsapi_types.h:
../../../framework/AT/AT_CellularBase.h:
../../../framework/AT/ATHandler.h:
../../target_h/platform/mbed_retarget.h:
../../../../../events/EventQueue.h:
../../../../../events/equeue/equeue.h:
../../../../../events/equeue/equeue_platform.h:
../../../../../platform/Callback.h:
../../../../../platform/NonCopyable.h:
../../../../../platform/mbed_toolchain.h:
../../../../../platform/mbed_debug.h:
../../../../../platform/PlatformMutex.h:
../../../framework/common/CellularLog.h:
../../target_h/PinNames.h:
../../../../../hal/us_ticker_api.h:
../../../../../hal/ticker_api.h:
../../target_h/device.h:
../../../../../platform/mbed_debug.h:

Some files were not shown because too many files have changed in this diff Show More