gnumake3: renamed TestFixture to CppunitTest

This commit is contained in:
Bjoern Michaelsen 2011-01-11 13:00:38 +01:00
parent 16275914be
commit 733831aee2
8 changed files with 51 additions and 54 deletions

View file

@ -26,46 +26,43 @@
#*************************************************************************
# TestFixture class
# CppunitTest class
# defined globally in TargetLocations.mk
# gb_TestFixture_get_linktargetname
# gb_CppunitTest_get_linktargetname
# defined by platform
# gb_TestFixture_TARGETTYPEFLAGS
# gb_TestFixture_get_filename
gb_TestFixture_CPPTESTTARGET := $(call gb_Executable_get_target,cppunittester)
gb_TestFixture_CPPTESTCOMMAND := $(gb_TestFixture_CPPTESTPRECOMMAND) $(gb_TestFixture_CPPTESTTARGET)
# gb_CppunitTest_TARGETTYPEFLAGS
# gb_CppunitTest_get_filename
gb_CppunitTest_CPPTESTTARGET := $(call gb_Executable_get_target,cppunittester)
gb_CppunitTest_CPPTESTCOMMAND := $(gb_CppunitTest_CPPTESTPRECOMMAND) $(gb_CppunitTest_CPPTESTTARGET)
.PHONY : $(call gb_TestFixture_get_clean_target,%)
$(call gb_TestFixture_get_clean_target,%) : $(call gb_LinkTarget_get_clean_target,$(call gb_Library_get_linktargetname,%))
.PHONY : $(call gb_CppunitTest_get_clean_target,%)
$(call gb_CppunitTest_get_clean_target,%) : $(call gb_LinkTarget_get_clean_target,$(call gb_Library_get_linktargetname,%))
$(call gb_Helper_abbreviate_dirs,\
rm -f $@)
.PHONY : $(call gb_TestFixture_get_target,%)
$(call gb_TestFixture_get_target,%) : $(gb_TestFixture_CPPTESTTARGET)
.PHONY : $(call gb_CppunitTest_get_target,%)
$(call gb_CppunitTest_get_target,%) : $(gb_CppunitTest_CPPTESTTARGET)
$(call gb_Output_announce,$*,$(true),CUT,2)
$(call gb_Helper_abbreviate_dirs_native,\
$(gb_TestFixture_CPPTESTCOMMAND) $(call gb_LinkTarget_get_target,$(call gb_TestFixture_get_linktargetname,$(call gb_TestFixture_get_filename,$*))))
$(gb_CppunitTest_CPPTESTCOMMAND) $(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktargetname,$(call gb_CppunitTest_get_filename,$*))))
# mkdir -p $(dir $@) && \
# $(gb_TestFixture_CPPTESTCOMMAND) $(call gb_LinkTarget_get_target,$(call gb_TestFixture_get_linktargetname,$(call gb_TestFixture_get_filename,$*))) > $@)
define gb_TestFixture_TestFixture
$(call gb_TestFixture__TestFixture_impl,$(1),$(call gb_TestFixture_get_linktargetname,$(call gb_TestFixture_get_filename,$(1))))
define gb_CppunitTest_CppunitTest
$(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest_get_linktargetname,$(call gb_CppunitTest_get_filename,$(1))))
endef
define gb_TestFixture__TestFixture_impl
define gb_CppunitTest__CppunitTest_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_TestFixture_TARGETTYPEFLAGS))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_CppunitTest_TARGETTYPEFLAGS))
$(call gb_LinkTarget_add_linked_libs,$(2),cppunit)
$(call gb_TestFixture_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
$$(eval $$(call gb_Module_register_target,$(call gb_TestFixture_get_target,$(1)),$(call gb_TestFixture_get_clean_target,$(1))))
$(call gb_CppunitTest_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1))))
endef
define gb_TestFixture__forward_to_Linktarget
gb_TestFixture_$(1) = $$(call gb_LinkTarget_$(1),$(call gb_TestFixture_get_linktargetname,$$(call gb_TestFixture_get_filename,$$(1))),$$(2),$$(3))
define gb_CppunitTest__forward_to_Linktarget
gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$(call gb_CppunitTest_get_linktargetname,$$(call gb_CppunitTest_get_filename,$$(1))),$$(2),$$(3))
endef
@ -91,7 +88,7 @@ $(eval $(foreach method,\
add_sdi_headers \
add_precompiled_header \
,\
$(call gb_TestFixture__forward_to_Linktarget,$(method))\
$(call gb_CppunitTest__forward_to_Linktarget,$(method))\
))
# vim: set noet sw=4 ts=4:

View file

@ -175,7 +175,7 @@ endef
define gb_Module_make_global_targets
ifneq ($$(gb_Module_TARGETSTACK),)
$$(eval $$(call gb_Output_error,Corrupted module target stack!))
$$(eval $$(call gb_Output_error,Corrupted module target stack!1))
endif
include $(1)
@ -186,7 +186,7 @@ subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(words $$(gb_Module_TARGETSTACK)),1)
$$(eval $$(call gb_Output_error,Corrupted module target stack!))
$$(eval $$(call gb_Output_error,Corrupted module target stack! $(gb_Module_TARGETSTACK)))
endif
gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
@ -195,7 +195,7 @@ gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBS
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),)
$$(eval $$(call gb_Output_error,Corrupted module target stack!))
$$(eval $$(call gb_Output_error,Corrupted module target stack!3))
endif
endef

View file

@ -73,7 +73,7 @@ gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
gb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1)
gb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1)
gb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs
gb_TestFixture_get_target = $(WORKDIR)/TestFixture/$(1).test
gb_CppunitTest_get_target = $(WORKDIR)/CppunitTest/$(1).test
define gb_Library_get_external_headers_target
$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
@ -104,7 +104,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
ResTarget \
SdiTarget \
SrsTarget \
TestFixture \
CppunitTest \
))
$(eval $(call gb_Helper_make_outdir_clean_targets,\
@ -130,7 +130,7 @@ $(eval $(call gb_Helper_make_dep_targets,\
gb_Library_get_linktargetname = Library/$(1)
gb_StaticLibrary_get_linktargetname = StaticLibrary/$(1)
gb_TestFixture_get_linktargetname = TestFixture/$(1)
gb_CppunitTest_get_linktargetname = CppunitTest/$(1)
define gb_Library_get_layer
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_LAYER)))

View file

@ -201,7 +201,7 @@ include $(foreach class, \
SdiTarget \
Package \
PrecompiledHeaders \
TestFixture \
CppunitTest \
JavaClassSet \
JunitTest \
Module \

View file

@ -313,13 +313,13 @@ define gb_Executable_get_rpath
-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
endef
# TestFixture class
# CppunitTest class
gb_TestFixture_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_TestFixture_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
gb_TestFixture_SYSPRE := libtest_
gb_TestFixture_EXT := .so
gb_TestFixture_get_filename = $(gb_TestFixture_SYSPRE)$(1)$(gb_TestFixture_EXT)
gb_CppunitTest_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
gb_CppunitTest_SYSPRE := libtest_
gb_CppunitTest_EXT := .so
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
# SdiTarget class

View file

@ -359,13 +359,13 @@ gb_Executable_LAYER := \
$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
# TestFixture class
# CppunitTest class
gb_TestFixture_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_TestFixture_CPPTESTPRECOMMAND :=
gb_TestFixture_SYSPRE := libtest_
gb_TestFixture_EXT := .dylib
gb_TestFixture_get_filename = $(gb_TestFixture_SYSPRE)$(1)$(gb_TestFixture_EXT)
gb_CppunitTest_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_CppunitTest_CPPTESTPRECOMMAND :=
gb_CppunitTest_SYSPRE := libtest_
gb_CppunitTest_EXT := .dylib
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
# SdiTarget class

View file

@ -289,13 +289,13 @@ gb_Executable_LAYER := \
$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
# TestFixture class
# CppunitTest class
gb_TestFixture_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_TestFixture_CPPTESTPRECOMMAND :=
gb_TestFixture_SYSPRE := libtest_
gb_TestFixture_EXT := .so
gb_TestFixture_get_filename = $(gb_TestFixture_SYSPRE)$(1)$(gb_TestFixture_EXT)
gb_CppunitTest_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_CppunitTest_CPPTESTPRECOMMAND :=
gb_CppunitTest_SYSPRE := libtest_
gb_CppunitTest_EXT := .so
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
# SdiTarget class

View file

@ -470,13 +470,13 @@ $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest
endef
# TestFixture class
# CppunitTest class
gb_TestFixture_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_TestFixture_CPPTESTPRECOMMAND :=
gb_TestFixture_SYSPRE := itest_
gb_TestFixture_EXT := .lib
gb_TestFixture_get_filename = $(gb_TestFixture_SYSPRE)$(1)$(gb_TestFixture_EXT)
gb_CppunitTest_TARGETTYPEFLAGS := $(gb_Library_TARGETTYPEFLAGS)
gb_CppunitTest_CPPTESTPRECOMMAND :=
gb_CppunitTest_SYSPRE := itest_
gb_CppunitTest_EXT := .lib
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
# SdiTarget class