diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2014-08-01 15:26:18 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-08-02 01:00:08 +0000 |
commit | edb7a9110536cb079e26dafcdb5c12b028be84d3 (patch) | |
tree | 52a5afaced187c4863a23f569ae920b6faf60bbb /wsutil | |
parent | 6b11cd97f2153bb015ade6efd05929999de85457 (diff) | |
download | wireshark-edb7a9110536cb079e26dafcdb5c12b028be84d3.tar.gz wireshark-edb7a9110536cb079e26dafcdb5c12b028be84d3.tar.bz2 wireshark-edb7a9110536cb079e26dafcdb5c12b028be84d3.zip |
Make the nameres test suite work out of tree by looking for the global hosts
file in the build directory (rather than the source directory).
Change-Id: I365e573ee84e9a41aa76f4aa9a4a6efaf42fb60e
Reviewed-on: https://code.wireshark.org/review/3334
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/filesystem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index 796251fec1..6125236bd7 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -1705,10 +1705,13 @@ get_persconffile_path(const char *filename, gboolean from_profile) char * get_datafile_path(const char *filename) { - if (running_in_build_directory_flag && !strcmp(filename, "AUTHORS-SHORT")) { + if (running_in_build_directory_flag && + (!strcmp(filename, "AUTHORS-SHORT") || + !strcmp(filename, "hosts"))) { /* We're running in the build directory and the requested file is a - * generated file. Return the file name in the build directory (not - * in the source/data directory). + * generated (or a test) file. Return the file name in the build + * directory (not in the source/data directory). + * (Oh the things we do to keep the source directory pristine...) */ return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_progfile_dir(), filename); } else { |