Skip to content

Commit

Permalink
Remove libxml2 dependency (#209)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Haines <[email protected]>
  • Loading branch information
hainest and Tim Haines authored Mar 8, 2022
1 parent 476bfce commit 8f653c5
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 472 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,8 @@ set(CMAKE_MODULE_PATH
"${Dyninst_DIR}"
"${Dyninst_DIR}/Modules")

include(LibXml2)
include(optimization)

include_directories(${LibXml2_INCLUDE_DIRS})
link_directories(${LibXml2_LIBRARY_DIRS})

# CMake tries to auto-add flags to link lines, which isn't helpful. Blanking
# this variable should fix.
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
Expand Down Expand Up @@ -133,7 +129,6 @@ set(LIBTESTSUITE_COMMON_SRCS
src/module.C
src/ResumeLog.C
src/test_lib_templates.C
src/JUnitOutputDriver.cpp
src/UsageMonitor.C)

set(LIBTESTLAUNCH_SRCS
Expand All @@ -146,15 +141,15 @@ set(LIBTESTLAUNCH_SRCS
src/UsageMonitor.C
src/TestOutputDriver.C
src/StdOutputDriver.C
src/JUnitOutputDriver.cpp)
)

if(UNIX)
add_library(testSuite
SHARED
src/test_lib_soExecution.C
${LIBTESTSUITE_COMMON_SRCS})
add_library(testlaunch SHARED ${LIBTESTLAUNCH_SRCS})
target_link_libraries(testlaunch ${LibXml2_LIBRARIES} testSuite)
target_link_libraries(testlaunch testSuite)
set(TESTSUITE_TESTLAUNCH_LINK testSuite testlaunch)
else()
add_library(testSuite
Expand All @@ -164,12 +159,11 @@ else()
${LIBTESTLAUNCH_SRCS})
set(TESTSUITE_TESTLAUNCH_LINK testSuite)
endif()
add_dependencies(testSuite LibXml2)

set_target_properties(${TESTSUITE_TESTLAUNCH_LINK}
PROPERTIES COMPILE_DEFINITIONS TESTLIB_DLL_BUILD)

target_link_libraries(testSuite ${CMAKE_DL_LIBS} ${LibXml2_LIBRARIES})
target_link_libraries(testSuite ${CMAKE_DL_LIBS})

add_library(DatabaseOutputDriver SHARED src/DatabaseOutputDriver.C)
target_link_libraries(DatabaseOutputDriver testSuite)
Expand Down
102 changes: 0 additions & 102 deletions cmake/LibXml2.cmake

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/build/Dyninst/testsuite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ sub run_tests {
my $cache = "$args->{'dyninst-cmake-cache-dir'}/CMakeCache.txt";
my @libs = load_from_cache($cache, \@lib_dirs);

# Grab the paths in the test suite build cache
$cache = "$args->{'testsuite-cmake-cache-dir'}/CMakeCache.txt";
@lib_dirs = 'LibXml2_LIBRARY_DIRS';
push @libs, load_from_cache($cache, \@lib_dirs);

push @libs, ($base_dir, realpath("$base_dir/../dyninst/lib"));
my $paths = join(':', list_unique(@libs));

Expand Down
6 changes: 0 additions & 6 deletions src/CmdLine.C
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ static int next_resume_group = -1;
static int next_resume_test = -1;
static bool no_header = false;
static bool measureMEMCPU = false;
static bool junit = false;
static bool dry_run = false;
static char *humanlog_name = NULL;
static char *logfilename = NULL;
Expand Down Expand Up @@ -213,7 +212,6 @@ void setupArgDictionary(ParameterDict &params)
params["printMutateeLogHeader"] = new ParamInt((int) printMutateeLogHeader);
params["no_header"] = new ParamInt((int) no_header);
params["measureMEMCPU"] = new ParamInt((int) measureMEMCPU);
params["junit"] = new ParamInt((int) junit);
params["dry_run"] = new ParamInt((int) dry_run);

if (!logfilename)
Expand Down Expand Up @@ -573,10 +571,6 @@ static int handleArgs(int argc, char *argv[])
}
given_mutator = atoi(argv[++i]);
}
else if(strcmp(argv[i], "-junit") == 0) {
junit = true;
measureMEMCPU = true;
}
else if(strcmp(argv[i], "-dry-run") == 0)
dry_run = true;
}
Expand Down
Loading

0 comments on commit 8f653c5

Please sign in to comment.