292 lines
10 KiB
Diff
292 lines
10 KiB
Diff
commit d16d2ecb99b3b32f8d7319fec02754a2b9fc4a5b
|
|
Author: Josh Stone <jistone@redhat.com>
|
|
Date: Tue Feb 26 09:34:52 2013 -0800
|
|
|
|
Hack the testsuite into shape for installation
|
|
|
|
* make.components: Fix a findstring call which block parseThat.
|
|
* parseThat/Makefile.in: Respect DESTDIR.
|
|
* testsuite/make.module.tmpl: Forgo rpath, and install all targets.
|
|
* testsuite/src/runTests-utils.C (setupVars): Don't complain about the
|
|
scripts dir, as it's not actually needed anyway.
|
|
* testsuite/src/test_driver.C(updateSearchPaths): fix a strcat->strcpy.
|
|
(getRTLibDir): Hack out the builddir path, and just use ../
|
|
* testsuite/src/dyninst/test1_18F_fortran.F: Backport a fix from master.
|
|
|
|
diff --git a/make.components b/make.components
|
|
index 159a44a..17f41c5 100644
|
|
--- a/make.components
|
|
+++ b/make.components
|
|
@@ -86,7 +86,7 @@ endif # StackwalkerAPI
|
|
endif # SymtabAPI
|
|
endif # default
|
|
|
|
-ifeq (findstring(dyninstAPI,$(fullSystem)),dyninstAPI)
|
|
+ifeq ($(findstring dyninstAPI,$(fullSystem)),dyninstAPI)
|
|
BUILD_PARSETHAT ?= true
|
|
endif
|
|
|
|
diff --git a/parseThat/Makefile.in b/parseThat/Makefile.in
|
|
index 6226a35..1dd1e08 100644
|
|
--- a/parseThat/Makefile.in
|
|
+++ b/parseThat/Makefile.in
|
|
@@ -23,6 +23,10 @@ vpath % @srcdir@/src
|
|
# -------------------------------------------
|
|
.PHONY: clean ready
|
|
|
|
+ifdef DESTDIR
|
|
+prefix := $(DESTDIR)$(prefix)
|
|
+endif
|
|
+
|
|
SRCS = parseThat.C \
|
|
config.C \
|
|
ipc.C \
|
|
diff --git a/testsuite/make.module.tmpl b/testsuite/make.module.tmpl
|
|
index fc03503..38393e0 100644
|
|
--- a/testsuite/make.module.tmpl
|
|
+++ b/testsuite/make.module.tmpl
|
|
@@ -225,7 +225,7 @@ proccontrol_COMPONENT_LIB = $(LIBPROCCONTROLCOMP)
|
|
SPACE :=
|
|
SPACE +=
|
|
#COMPONENT_LDFLAGS += $(subst $(SPACE),,-Wl,--enable-new-dtags$(ALL_COMP_DIRS:%=,-rpath,%))
|
|
-COMPONENT_LDFLAGS += $(subst $(SPACE),,-Wl$(ALL_COMP_DIRS:%=,-rpath,%))
|
|
+#COMPONENT_LDFLAGS += $(subst $(SPACE),,-Wl$(ALL_COMP_DIRS:%=,-rpath,%))
|
|
|
|
all: default
|
|
|
|
@@ -244,8 +244,19 @@ full: test-full
|
|
### A list of all the targets we're building, for install purposes
|
|
#######################################################################
|
|
|
|
-ALL_TARGETS_DEST = $(addprefix $(TEST_DEST)/,$(ALL_TARGETS))
|
|
-LIBTESTSUITE_DEST = $(addprefix $(TEST_DEST)/,$(LIBTESTSUITE))
|
|
+TEST_DEST ?= $(LIBRARY_DEST)/testsuite
|
|
+
|
|
+ALL_TARGETS = $(LIBTESTLAUNCH) $(LIBTESTSUITE) $(TESTLIBS)
|
|
+ALL_TARGETS += $(MUTATORS) $(MUTATEES_MINIMUM)
|
|
+ALL_TARGETS += $(DRIVERS) $(OUTPUT_DRIVERS) $(COMPONENTS)
|
|
+
|
|
+FULL_TARGETS = $(LIBTESTLAUNCH) $(LIBTESTSUITE) $(TESTLIBS)
|
|
+FULL_TARGETS += $(MUTATORS) $(MUTATEES)
|
|
+FULL_TARGETS += $(DRIVERS) $(OUTPUT_DRIVERS) $(COMPONENTS)
|
|
+
|
|
+ALL_TARGETS_DEST = $(addprefix $(TEST_DEST)/,$(ALL_TARGETS))
|
|
+FULL_TARGETS_DEST = $(addprefix $(TEST_DEST)/,$(FULL_TARGETS))
|
|
+LIBTESTSUITE_DEST = $(addprefix $(TEST_DEST)/,$(LIBTESTSUITE))
|
|
|
|
#######################################################################
|
|
### Some pattern rules
|
|
@@ -272,13 +283,11 @@ include make.mutators.gen
|
|
|
|
include make.solo_mutatee.gen
|
|
|
|
-mutatees:
|
|
-
|
|
-mutators:
|
|
-
|
|
-components:
|
|
-
|
|
-testlibs:
|
|
+MUTATEES =
|
|
+MUTATEES_MINIMUM =
|
|
+MUTATORS =
|
|
+COMPONENTS =
|
|
+TESTLIBS =
|
|
|
|
#######################################################################
|
|
### Filter results, if needed
|
|
@@ -294,13 +303,13 @@ include $(TO_CORE)/make.components
|
|
|
|
ifneq ($(wildcard ../src/dyninst), )
|
|
ifneq ($(findstring dyninstAPI,$(fullSystem)),)
|
|
-mutatees: $(filter-out $(BUILD_FILTER), $(dyninst_SOLO_MUTATEES))
|
|
-mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(dyninst_SOLO_MUTATEES)))
|
|
-mutators: $(dyninst_MUTATORS_SO)
|
|
-components: $(LIBDYNINSTCOMP)
|
|
-testlibs: $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
|
|
+MUTATEES += $(filter-out $(BUILD_FILTER), $(dyninst_SOLO_MUTATEES))
|
|
+MUTATEES_MINIMUM += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(dyninst_SOLO_MUTATEES)))
|
|
+MUTATORS += $(dyninst_MUTATORS_SO)
|
|
+COMPONENTS += $(LIBDYNINSTCOMP)
|
|
+TESTLIBS += $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
|
|
ifndef SKIP_BUILD_RTLIB_32
|
|
-testlibs: $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
|
|
+TESTLIBS += $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
|
|
dyninst_targs = $(DYNINST_TESTLIBS_ABI) $(DYNINST_STATIC_TESTLIBS_ABI)
|
|
endif
|
|
dyninst_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(dyninst_SOLO_MUTATEES)))
|
|
@@ -310,11 +319,11 @@ endif
|
|
|
|
ifneq ($(wildcard ../src/symtab), )
|
|
ifneq ($(findstring symtabAPI,$(fullSystem)),)
|
|
-mutatees: $(filter-out $(BUILD_FILTER), $(symtab_SOLO_MUTATEES))
|
|
-mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(symtab_SOLO_MUTATEES)))
|
|
-mutators: $(symtab_MUTATORS_SO)
|
|
-components: $(LIBSYMTABCOMP)
|
|
-testlibs: $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
|
|
+MUTATEES += $(filter-out $(BUILD_FILTER), $(symtab_SOLO_MUTATEES))
|
|
+MUTATEES_MINIMUM += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(symtab_SOLO_MUTATEES)))
|
|
+MUTATORS += $(symtab_MUTATORS_SO)
|
|
+COMPONENTS += $(LIBSYMTABCOMP)
|
|
+TESTLIBS += $(DYNINST_TESTLIBS) $(DYNINST_STATIC_TESTLIBS)
|
|
symtab_targs = $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(symtab_SOLO_MUTATEES)))
|
|
symtab_targs = $(symtab_MUTATORS_SO) $(LIBSYMTABCOMP)
|
|
endif
|
|
@@ -322,12 +331,12 @@ endif
|
|
|
|
ifneq ($(wildcard ../src/instruction), )
|
|
ifneq ($(findstring instructionAPI,$(fullSystem)),)
|
|
-mutatees: $(filter-out $(BUILD_FILTER), $(instruction_SOLO_MUTATEES))
|
|
-mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(instruction_SOLO_MUTATEES)))
|
|
-mutators: $(instruction_MUTATORS_SO)
|
|
+MUTATEES += $(filter-out $(BUILD_FILTER), $(instruction_SOLO_MUTATEES))
|
|
+MUTATEES_MINIMUM += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(instruction_SOLO_MUTATEES)))
|
|
+MUTATORS += $(instruction_MUTATORS_SO)
|
|
ifneq ($(instruction_MUTATORS_SO), )
|
|
-components: $(LIBINSTRUCTIONCOMP)
|
|
-testlibs:
|
|
+COMPONENTS += $(LIBINSTRUCTIONCOMP)
|
|
+TESTLIBS +=
|
|
instruction_targs = $(LIBINSTRUCTIONCOMP)
|
|
endif
|
|
instruction_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(instruction_SOLO_MUTATEES)))
|
|
@@ -337,12 +346,12 @@ endif
|
|
|
|
ifneq ($(wildcard ../src/proccontrol), )
|
|
ifneq ($(findstring proccontrol,$(fullSystem)),)
|
|
-mutatees: $(filter-out $(BUILD_FILTER), $(proccontrol_SOLO_MUTATEES))
|
|
-mutatees_minimum: $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)))
|
|
-mutators: $(proccontrol_MUTATORS_SO)
|
|
+MUTATEES += $(filter-out $(BUILD_FILTER), $(proccontrol_SOLO_MUTATEES))
|
|
+MUTATEES_MINIMUM += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)))
|
|
+MUTATORS += $(proccontrol_MUTATORS_SO)
|
|
ifneq ($(proccontrol_MUTATORS_SO), )
|
|
-components: $(LIBPROCCONTROLCOMP)
|
|
-testlibs: $(PROCCONTROL_TESTLIBS) $(PROCCONTROL_TESTLIBS_ABI) $(DYNINST_TESTLIBS) $(DYNINST_TESTLIBS_ABI)
|
|
+COMPONENTS += $(LIBPROCCONTROLCOMP)
|
|
+TESTLIBS += $(PROCCONTROL_TESTLIBS) $(PROCCONTROL_TESTLIBS_ABI) $(DYNINST_TESTLIBS) $(DYNINST_TESTLIBS_ABI)
|
|
proccontrol_targs = $(LIBPROCCONTROLCOMP) $(PROCCONTROL_TESTLIBS) $(PROCCONTROL_TESTLIBS_ABI) $(DYNINST_TESTLIBS) $(DYNINST_TESTLIBS_ABI)
|
|
endif
|
|
proccontrol_targs += $(filter-out $(BUILD_FILTER), $(filter-out $(MINIMUM_BUILD_FILTER), $(proccontrol_SOLO_MUTATEES)))
|
|
@@ -350,6 +359,16 @@ proccontrol_targs += $(proccontrol_MUTATORS_SO)
|
|
endif
|
|
endif
|
|
|
|
+mutatees: $(MUTATEES)
|
|
+
|
|
+mutatees_minimum: $(MUTATEES_MINIMUM)
|
|
+
|
|
+mutators: $(MUTATORS)
|
|
+
|
|
+components: $(COMPONENTS)
|
|
+
|
|
+testlibs: $(TESTLIBS)
|
|
+
|
|
common_infra: drivers output_drivers
|
|
|
|
dyninstAPI: common_infra $(dyninst_targs) $(symtab_targs) $(instruction_targs) $(proccontrol_targs)
|
|
@@ -360,7 +379,13 @@ instructionAPI: common_infra $(instruction_targs)
|
|
|
|
proccontrol: common_infra $(proccontrol_targs)
|
|
|
|
-install: default
|
|
+install: $(TEST_DEST)
|
|
+
|
|
+install-full: $(TEST_DEST)
|
|
+
|
|
+$(TEST_DEST)/%: %
|
|
+ @echo Installing $@
|
|
+ $(HIDE_COMP)$(INSTALL) -t $(TEST_DEST) $<
|
|
|
|
symlink: all
|
|
|
|
@@ -409,7 +434,8 @@ endif
|
|
|
|
testlibs: $(LIBTESTSUITE)
|
|
|
|
-drivers: test_driver runTests testdriver_wrapper
|
|
+DRIVERS = test_driver runTests testdriver_wrapper
|
|
+drivers: $(DRIVERS)
|
|
|
|
.PHONY: clean install distclean mutators mutatees testlibs gnu_mutatees native_mutatees echo all
|
|
|
|
@@ -563,7 +589,8 @@ endif
|
|
|
|
# Install directory
|
|
$(TEST_DEST):
|
|
- mkdir $(TEST_DEST)
|
|
+ @echo Installing $@
|
|
+ $(HIDE_COMP)$(INSTALL) -d $(TEST_DEST)
|
|
|
|
#######################################################################
|
|
### Generic Mutator build rule:
|
|
@@ -841,3 +868,6 @@ endif
|
|
endif
|
|
endif
|
|
endif
|
|
+
|
|
+install: $(ALL_TARGETS_DEST)
|
|
+install-full: $(FULL_TARGETS_DEST)
|
|
diff --git a/testsuite/src/dyninst/test1_18F_fortran.F b/testsuite/src/dyninst/test1_18F_fortran.F
|
|
index a33241b..9863fef 100644
|
|
--- a/testsuite/src/dyninst/test1_18F_fortran.F
|
|
+++ b/testsuite/src/dyninst/test1_18F_fortran.F
|
|
@@ -47,8 +47,6 @@
|
|
#define AND and
|
|
#define OR or
|
|
#endif
|
|
- DATA test1_18_globalVariable1/42/
|
|
- END
|
|
!------------------------------------------------------------------------------
|
|
|
|
SUBROUTINE test1_18f_init_globals
|
|
diff --git a/testsuite/src/runTests-utils.C b/testsuite/src/runTests-utils.C
|
|
index 0f54874..02bd505 100644
|
|
--- a/testsuite/src/runTests-utils.C
|
|
+++ b/testsuite/src/runTests-utils.C
|
|
@@ -403,12 +403,14 @@ void setupVars(bool useLog, string &logfile)
|
|
}
|
|
|
|
pdscrdir = base_dir + "/dyninst/scripts";
|
|
+#if 0
|
|
if ( ! isDir(pdscrdir) )
|
|
{
|
|
cerr << pdscrdir << " does not exist. Paradyn scripts dir required."
|
|
<< endl;
|
|
exit(1);
|
|
}
|
|
+#endif
|
|
|
|
// Determine Test log dir
|
|
char *pdtst = getenv("PDTST");
|
|
diff --git a/testsuite/src/test_driver.C b/testsuite/src/test_driver.C
|
|
index 02eec1a..31def33 100644
|
|
--- a/testsuite/src/test_driver.C
|
|
+++ b/testsuite/src/test_driver.C
|
|
@@ -755,7 +755,7 @@ void updateSearchPaths(const char *filename) {
|
|
// Add current directory to the search path
|
|
const char *pathenv = getenv("PATH");
|
|
char *newpath = (char *) malloc (strlen(pathenv)+3);
|
|
- strcat(newpath, pathenv);
|
|
+ strcpy(newpath, pathenv);
|
|
strcat(newpath, ":.");
|
|
execpath = searchPath(newpath, filename);
|
|
if(execpath == NULL) {
|
|
@@ -805,6 +805,8 @@ void updateSearchPaths(const char *filename) {
|
|
}
|
|
|
|
std::string getRTLibDir() {
|
|
+ return "../";
|
|
+#if 0
|
|
char *platform = getenv("PLATFORM");
|
|
char cwd[1024];
|
|
if (!platform) {
|
|
@@ -822,6 +824,7 @@ std::string getRTLibDir() {
|
|
std::string rtlib = "../../dyninstAPI_RT/";
|
|
rtlib += platform;
|
|
return rtlib;
|
|
+#endif
|
|
}
|
|
|
|
#if !defined(os_windows_test)
|