mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Attempt to ease unit testing by having a builtin rule to set up LD_LIBRARY_PATH
and run gnustep-tests on the files in a specified directory. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@39082 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
92418cccc1
commit
423ae3bde7
7 changed files with 42 additions and 0 deletions
|
@ -2,6 +2,15 @@
|
|||
|
||||
* TestFramework/gnustep-tests.in: Deprecate Env.sh ... use TestInfo to
|
||||
set test ewnvironment
|
||||
* Instance/framework.make: Add rule to invoke gnustep-tests
|
||||
* Instance/library.make: Add rule to invoke gnustep-tests
|
||||
* Master/clibrary.make: pass 'make check' to instance
|
||||
* Master/framework.make: pass 'make check' to instance
|
||||
* Master/library.make: pass 'make check' to instance
|
||||
* Master/test-library.make: pass 'make check' to instance
|
||||
Simple minded initial attempt to make unit testing for libraries and
|
||||
frameworks easier by having a built-in rule to execute test files in
|
||||
a subdirectory specified using xxx_TEST_DIR
|
||||
|
||||
2015-09-23 Germán Arias <germanandre@gmx.es>
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ endif
|
|||
# xxx_MAKE_CURRENT_VERSION is used to decide if the framework version
|
||||
# we compiling should be made the current/default version or not
|
||||
# (default is "yes")
|
||||
# xxx_TEST_DIR is the directory in which 'make check' will cause tests
|
||||
# to be run using gnustep-tests.
|
||||
#
|
||||
# where xxx is the framework name
|
||||
#
|
||||
|
@ -808,6 +810,17 @@ internal-framework-uninstall_::
|
|||
$(RM_LN_S) $(LIB_LINK_DLL_FILE); \
|
||||
$(END_ECHO)
|
||||
endif
|
||||
|
||||
internal-framework-check::
|
||||
ifneq ($($(GNUSTEP_INSTANCE)_TEST_DIR),)
|
||||
@(echo "export LD_LIBRARY_PATH=\"$$(pwd)/$(GNUSTEP_INSTANCE).framework:$(LD_LIBRARY_PATH)\"" > $($(GNUSTEP_INSTANCE)_TEST_DIR)/TestInfo; \
|
||||
if [ "$(DEBUG)" = "" ]; then \
|
||||
gnustep-tests $($(GNUSTEP_INSTANCE)_TEST_DIR);\
|
||||
else \
|
||||
gnustep-tests --debug $($(GNUSTEP_INSTANCE)_TEST_DIR);\
|
||||
fi;)
|
||||
endif
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
#
|
||||
|
|
|
@ -43,6 +43,8 @@ include $(GNUSTEP_MAKEFILES)/Instance/Shared/headers.make
|
|||
# The directory where the header files are located is xxx_HEADER_FILES_DIR
|
||||
# The directory where to install the header files inside the library
|
||||
# installation directory is xxx_HEADER_FILES_INSTALL_DIR
|
||||
# The directory in which 'make check' will cause tests to be run using
|
||||
# gnustep-tests is xxx_TEST_DIR
|
||||
#
|
||||
# Where xxx is the name of the library
|
||||
#
|
||||
|
@ -338,7 +340,17 @@ endif
|
|||
#
|
||||
# Testing targets
|
||||
#
|
||||
# Put the path to the directory containing the library to be tested in
|
||||
# LD_LIBRARY_PATH for running the tests and then invoke gnustep-tests
|
||||
internal-library-check::
|
||||
ifneq ($($(GNUSTEP_INSTANCE)_TEST_DIR),)
|
||||
@(echo "export LD_LIBRARY_PATH=\"$$(pwd)/$(GNUSTEP_OBJ_DIR):$(LD_LIBRARY_PATH)\"" > $($(GNUSTEP_INSTANCE)_TEST_DIR)/TestInfo; \
|
||||
if [ "$(DEBUG)" = "" ]; then \
|
||||
gnustep-tests $($(GNUSTEP_INSTANCE)_TEST_DIR);\
|
||||
else \
|
||||
gnustep-tests --debug $($(GNUSTEP_INSTANCE)_TEST_DIR);\
|
||||
fi;)
|
||||
endif
|
||||
|
||||
#
|
||||
# If the user makefile contains the command
|
||||
|
|
|
@ -45,6 +45,8 @@ internal-master-clibrary-all: $(CLIBRARY_NAME:=.all.clibrary.variables)
|
|||
|
||||
endif
|
||||
|
||||
internal-check:: $(CLIBRARY_NAME:=.check.clibrary.variables)
|
||||
|
||||
internal-install:: $(CLIBRARY_NAME:=.install.clibrary.variables)
|
||||
|
||||
internal-uninstall:: $(CLIBRARY_NAME:=.uninstall.clibrary.variables)
|
||||
|
|
|
@ -41,6 +41,8 @@ internal-all:: $(GNUSTEP_OBJ_DIR) $(FRAMEWORK_NAME:=.all.framework.variables)
|
|||
|
||||
$(FRAMEWORK_NAME:=.all.framework.variables): $(FRAMEWORK_NAME:=.build-headers.framework.variables)
|
||||
|
||||
internal-check:: $(FRAMEWORK_NAME:=.check.framework.variables)
|
||||
|
||||
internal-install:: $(FRAMEWORK_NAME:=.install.framework.variables)
|
||||
|
||||
internal-uninstall:: $(FRAMEWORK_NAME:=.uninstall.framework.variables)
|
||||
|
|
|
@ -45,6 +45,8 @@ internal-master-library-all: $(LIBRARY_NAME:=.all.library.variables)
|
|||
|
||||
endif
|
||||
|
||||
internal-check:: $(LIBRARY_NAME:=.check.library.variables)
|
||||
|
||||
internal-install:: $(LIBRARY_NAME:=.install.library.variables)
|
||||
|
||||
internal-uninstall:: $(LIBRARY_NAME:=.uninstall.library.variables)
|
||||
|
|
|
@ -45,6 +45,8 @@ internal-master-test-lib-all: $(TEST_LIBRARY_NAME:=.all.test-lib.variables)
|
|||
|
||||
endif
|
||||
|
||||
internal-check:: $(TEST_LIBRARY_NAME:=.check.test-lib.variables)
|
||||
|
||||
internal-install:: $(TEST_LIBRARY_NAME:=.install.test-lib.variables)
|
||||
|
||||
internal-uninstall:: $(TEST_LIBRARY_NAME:=.uninstall.test-lib.variables)
|
||||
|
|
Loading…
Reference in a new issue