2013-03-15 21:36:26 +00:00
|
|
|
commit 701eb936767886bfd7b8858e8e2151173f9dc6bd
|
2013-02-25 22:47:18 +00:00
|
|
|
Author: Josh Stone <jistone@redhat.com>
|
2013-02-26 17:36:17 +00:00
|
|
|
Date: Tue Feb 26 09:34:52 2013 -0800
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
Hack the testsuite into shape for installation
|
|
|
|
|
|
|
|
* 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.
|
2013-03-15 21:36:26 +00:00
|
|
|
* testsuite/src/test_driver.C (getRTLibDir): Hack out the builddir path,
|
|
|
|
and just use ../ (aka %{libdir}/dyninst/testsuite/../)
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
diff --git a/testsuite/make.module.tmpl b/testsuite/make.module.tmpl
|
2013-03-15 21:36:26 +00:00
|
|
|
index 1d3ce2c..1c76d8f 100644
|
2013-02-25 22:47:18 +00:00
|
|
|
--- a/testsuite/make.module.tmpl
|
|
|
|
+++ b/testsuite/make.module.tmpl
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -227,7 +227,7 @@ proccontrol_COMPONENT_LIB = $(LIBPROCCONTROLCOMP)
|
2013-02-25 22:47:18 +00:00
|
|
|
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
|
|
|
|
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -246,8 +246,19 @@ full: test-full
|
2013-02-25 22:47:18 +00:00
|
|
|
### 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
|
|
|
|
+
|
2013-02-26 17:36:17 +00:00
|
|
|
+ALL_TARGETS = $(LIBTESTLAUNCH) $(LIBTESTSUITE) $(TESTLIBS)
|
2013-02-25 22:47:18 +00:00
|
|
|
+ALL_TARGETS += $(MUTATORS) $(MUTATEES_MINIMUM)
|
|
|
|
+ALL_TARGETS += $(DRIVERS) $(OUTPUT_DRIVERS) $(COMPONENTS)
|
|
|
|
+
|
2013-02-26 17:36:17 +00:00
|
|
|
+FULL_TARGETS = $(LIBTESTLAUNCH) $(LIBTESTSUITE) $(TESTLIBS)
|
2013-02-25 22:47:18 +00:00
|
|
|
+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
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -274,13 +285,11 @@ include make.mutators.gen
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
include make.solo_mutatee.gen
|
|
|
|
|
|
|
|
-mutatees:
|
|
|
|
-
|
|
|
|
-mutators:
|
|
|
|
-
|
|
|
|
-components:
|
|
|
|
-
|
|
|
|
-testlibs:
|
|
|
|
+MUTATEES =
|
|
|
|
+MUTATEES_MINIMUM =
|
|
|
|
+MUTATORS =
|
|
|
|
+COMPONENTS =
|
|
|
|
+TESTLIBS =
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
### Filter results, if needed
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -296,13 +305,13 @@ include $(TO_CORE)/make.components
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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)))
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -312,11 +321,11 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -324,12 +333,12 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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)))
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -339,12 +348,12 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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)))
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -352,6 +361,16 @@ proccontrol_targs += $(proccontrol_MUTATORS_SO)
|
2013-02-25 22:47:18 +00:00
|
|
|
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)
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -362,7 +381,13 @@ instructionAPI: common_infra $(instruction_targs)
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -412,7 +437,8 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -566,7 +592,8 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
|
|
|
|
# Install directory
|
|
|
|
$(TEST_DEST):
|
|
|
|
- mkdir $(TEST_DEST)
|
|
|
|
+ @echo Installing $@
|
|
|
|
+ $(HIDE_COMP)$(INSTALL) -d $(TEST_DEST)
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
### Generic Mutator build rule:
|
2013-03-15 21:36:26 +00:00
|
|
|
@@ -857,3 +884,6 @@ endif
|
2013-02-25 22:47:18 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
+
|
|
|
|
+install: $(ALL_TARGETS_DEST)
|
|
|
|
+install-full: $(FULL_TARGETS_DEST)
|
|
|
|
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
|
2013-03-15 21:36:26 +00:00
|
|
|
index 0fc3117..31def33 100644
|
2013-02-25 22:47:18 +00:00
|
|
|
--- a/testsuite/src/test_driver.C
|
|
|
|
+++ b/testsuite/src/test_driver.C
|
|
|
|
@@ -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)
|