summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-08-31 16:02:41 -0700
committerEric Anholt <eric@anholt.net>2016-09-02 10:42:01 -0700
commit1b04c71fc8aaa6b4ef7665041e790590bc74ebed (patch)
tree35cf4c9a0e64d0a8ec1eedb532822b861ec90d17
parent20e953e15a58c01a2e78d204d5eba67be11fb488 (diff)
Default to using the tetexec.cfg from the build directory.
One less environment variable the user needs to set to prevent spurious failures. v2: Actually amend in the fix to the directory that I failed to do before sending out for review. Reviewed-by: Adam Jackson <ajax@redhat.com> (v1)
-rw-r--r--src/tet3/apilib/Makefile.am3
-rw-r--r--src/tet3/apilib/dconfig.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/tet3/apilib/Makefile.am b/src/tet3/apilib/Makefile.am
index 70391ed9..cff5df8b 100644
--- a/src/tet3/apilib/Makefile.am
+++ b/src/tet3/apilib/Makefile.am
@@ -1,4 +1,5 @@
-AM_CPPFLAGS = -I$(srcdir)/../inc -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(srcdir)/../inc -I$(top_srcdir)/include \
+ -DTET_DEFAULT_CONFIG=\"$(abs_top_builddir)/xts5/tetexec.cfg\"
# libapi_s is the shared portion of the library
xtslibdir = $(libexecdir)/xts5
diff --git a/src/tet3/apilib/dconfig.c b/src/tet3/apilib/dconfig.c
index 12955790..ac4444ad 100644
--- a/src/tet3/apilib/dconfig.c
+++ b/src/tet3/apilib/dconfig.c
@@ -144,7 +144,7 @@ TET_IMPORT void tet_config()
/* determine the config file name from the environment */
file = getenv("TET_CONFIG");
if (file == NULL || *file == '\0')
- return;
+ file = TET_DEFAULT_CONFIG;
/* open the file */
if ((fp = fopen(file, "r")) == (FILE *) 0) {