Re: [PATCH xts 1/3] Default to using the tetexec.cfg from the build directory.

2016-09-02 Thread Adam Jackson
On Wed, 2016-08-31 at 16:45 -0700, Eric Anholt wrote:
> One less environment variable the user needs to set to prevent
> spurious failures.

Series is:

Reviewed-by: Adam Jackson 

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xts 1/3] Default to using the tetexec.cfg from the build directory.

2016-08-31 Thread Eric Anholt
One less environment variable the user needs to set to prevent
spurious failures.
---
 src/tet3/apilib/Makefile.am | 3 ++-
 src/tet3/apilib/dconfig.c   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tet3/apilib/Makefile.am b/src/tet3/apilib/Makefile.am
index 70391ed910df..e55afb3e6617 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)/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 129557909dd1..acad188e 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) {
-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel