* Instance/test-library.make: Remove dejagnu code and replace

with rules to inherit from library.make


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@21297 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2005-06-10 21:22:28 +00:00
parent 09c54f78a5
commit db1ea032ae
2 changed files with 11 additions and 118 deletions

View file

@ -1,3 +1,8 @@
2005-06-10 Adam Fedor <fedor@gnu.org>
* Instance/test-library.make: Remove dejagnu code and replace
with rules to inherit from library.make
2005-06-10 Adam Fedor <fedor@gnu.org>
* Master/source-distribution.make (dist): Tar/copy the directory

View file

@ -1,12 +1,11 @@
#
# Instance/test-library.make
#
# Instance Makefile rules for dejagnu/GNUstep based testing
# Instance Makefile rules for test/non-installed libraries
#
# Copyright (C) 1997 Free Software Foundation, Inc.
# Copyright (C) 2005 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
# Author: Ovidiu Predescu <ovidiu@net-community.com>
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Makefile Package.
#
@ -24,119 +23,8 @@ ifeq ($(RULES_MAKE_LOADED),)
include $(GNUSTEP_MAKEFILES)/rules.make
endif
#
# The three main components to perform a test in the framework
# a) code to be tested
# b) scripts which say what/how to test
# c) test driver
#
# Component A can be any (or all) of the possible build targets
# supported by the GNUstep Makefile Package: library, tool,
# application, or bundle. The code is assumed to be compiled
# elsewhere and just needs to be accessed to run the tests.
#
# Component B are written by the user. The GNUstep Makefile Package
# does not interpret these scripts; it require that you specify
# a list of directories which contain the scripts for the code to be
# tested, so that this information can be passed to dejagnu.
#
# Component C is dependent upon the type of code to be tested; generally
# an interactive program is its own test driver as it can communicate
# directly with dejagnu. Libraries, however, require a test driver which
# interactively accepts commands from dejagnu; the Objective-C Testing
# Framework is the default test driver.
#
# Test drivers for the various build targets; the names should be unique
# across all of the test drivers:
#
# TEST_LIBRARY_NAME
#
# xxx_OBJC_FILES, xxx_C_FILES, and xxx_PSWRAP_FILES holds the files
# to be compiled for the xxx test driver.
#
# xxx_SCRIPT_DIRS is a list of directories containing the test scripts
# which will be performed by dejagnu for the xxx test driver.
#
# xxx_SCRIPTS_DIRECTORY is the directory where the xxx_SCRIPT_DIRS
# are located for the xxx test driver.
#
# xxx_INCLUDE_DIRS are additional headers directories to be searched
#
# xxx_LIB_DIRS and xxx_LIBS are additional libraries directories and
# libraries to link against, respectively to link the xxx test driver.
# The same paths are passed to the dynamic linker.
#
# Just inherit the build rule from library.make
SCRIPTS_DIRECTORY = $($(GNUSTEP_INSTANCE)_SCRIPTS_DIRECTORY)
CHECK_SCRIPT_DIRS = $($(GNUSTEP_INSTANCE)_SCRIPT_DIRS)
include $(GNUSTEP_MAKEFILES)/Instance/library.make
ifeq ($(SCRIPTS_DIRECTORY),)
SCRIPTS_DIRECTORY = .
endif
ALL_TEST_LIBRARY_LIBS = \
$(shell $(WHICH_LIB_SCRIPT) \
$(ALL_LIB_DIRS) \
$(ADDITIONAL_LIBRARY_LIBS) $(AUXILIARY_LIBS) \
$(AUXILIARY_TOOL_LIBS) $(FND_LIBS) \
debug=$(debug) profile=$(profile) shared=$(shared) \
libext=$(LIBEXT) shared_libext=$(SHARED_LIBEXT))
internal-test_lib-all_:: $(GNUSTEP_OBJ_DIR) \
$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE)
$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE): $(OBJ_FILES_TO_LINK)
$(LD) $(ALL_LDFLAGS) -o $(LDOUT)$@ \
$(OBJ_FILES_TO_LINK) \
$(ALL_TEST_LIBRARY_LIBS)
dejagnu_vars = "FOUNDATION_LIBRARY=$(FOUNDATION_LIB)" \
"OBJC_RUNTIME=$(OBJC_RUNTIME)"
internal-test_lib-check:: $(SCRIPTS_DIRECTORY)/config/unix.exp \
really-testlib-check
really-test_lib-check:
@(additional_library_paths="`echo $(ADDITIONAL_LIB_DIRS) | sed 's/-L//g'`"; \
additional_library_paths="`$(GNUSTEP_MAKEFILES)/transform_paths.sh $$additional_library_paths`"; \
. $(GNUSTEP_MAKEFILES)/ld_lib_path.sh; \
for f in $(CHECK_SCRIPT_DIRS); do \
if [ "$(SCRIPTS_DIRECTORY)" != "" ]; then \
echo "cd $(SCRIPTS_DIRECTORY); runtest --tool $$f --srcdir . PROG=../$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE) $(dejagnu_vars) $(ADDITIONAL_DEJAGNU_VARS)"; \
(cd $(SCRIPTS_DIRECTORY); runtest --tool $$f --srcdir . PROG=../$(GNUSTEP_OBJ_DIR)/$(GNUSTEP_INSTANCE) $(dejagnu_vars) $(ADDITIONAL_DEJAGNU_VARS)); \
else \
runtest --tool $$f --srcdir . PROG=./$(GNUSTEP_INSTANCE) \
$(dejagnu_vars) $(ADDITIONAL_DEJAGNU_VARS); \
fi; \
done)
_FORCE::
$(SCRIPTS_DIRECTORY)/config/unix.exp: _FORCE
$(ECHO_CREATING)$(MKDIRS) $(SCRIPTS_DIRECTORY)/config$(END_ECHO)
@(echo "Creating the $@ file..."; \
echo "## Do Not Edit ##" > $@; \
(echo "# Contents generated automatically by Makefile"; \
echo "#"; \
echo ""; \
echo "set OBJC_RUNTIME $(OBJC_RUNTIME)"; \
echo "set FOUNDATION_LIBRARY $(FOUNDATION_LIB)"; \
echo ""; \
echo "if {[file isdirectory $(GNUSTEP_USER_ROOT)/Library/Libraries/ObjCTest]} {"; \
echo " set OBJCTEST_DIR $(GNUSTEP_USER_ROOT)/Library/Libraries/ObjCTest"; \
echo "} elseif {[file isdirectory $(GNUSTEP_LOCAL_ROOT)/Library/Libraries/ObjCTest]} {"; \
echo " set OBJCTEST_DIR $(GNUSTEP_LOCAL_ROOT)/Library/Libraries/ObjCTest"; \
echo "} elseif {[file isdirectory $(GNUSTEP_SYSTEM_ROOT)/Library/Libraries/ObjCTest]} {"; \
echo " set OBJCTEST_DIR $(GNUSTEP_SYSTEM_ROOT)/Library/Libraries/ObjCTest"; \
echo "}"; \
echo "set objdir `pwd`"; \
echo "source \"\$$OBJCTEST_DIR/common.exp\""; \
echo ""; \
echo "# Maintain your own code in local.exp"; \
echo "source \"config/local.exp\"") >>$@)
internal-test_lib-install_::
internal-test_lib-uninstall_::
include $(GNUSTEP_MAKEFILES)/Instance/Shared/strings.make
internal-test_library-all_:: internal-library-all_