Skip to content

Commit

Permalink
Merge pull request #2404 from grondo/intree-lua-path
Browse files Browse the repository at this point in the history
testsuite: fix in-tree LUA_PATH to find correct fluxometer during tests
  • Loading branch information
garlick committed Sep 28, 2019
2 parents 62535cd + 6d068f6 commit 373cc77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/libflux/Makefile.am
Expand Up @@ -38,7 +38,7 @@ intree_conf_cppflags = \
-DINTREE_MODULE_PATH=\"$(abs_top_builddir)/src/modules\" \
-DINTREE_CONNECTOR_PATH=\"$(abs_top_builddir)/src/connectors\" \
-DINTREE_EXEC_PATH=\"$(abs_top_builddir)/src/cmd:$(abs_top_srcdir)/src/cmd:$(abs_top_builddir)/src/broker\" \
-DINTREE_LUA_PATH_ADD=\"$(abs_top_srcdir)/src/bindings/lua/?.lua\" \
-DINTREE_LUA_PATH_ADD=\"$(abs_top_builddir)/t/?.lua\;$(abs_top_srcdir)/src/bindings/lua/?.lua\" \
-DINTREE_LUA_CPATH_ADD=\"$(abs_top_builddir)/src/bindings/lua/?.so\" \
-DINTREE_PYTHON_PATH=\"$(abs_top_srcdir)/src/bindings/python:$(abs_top_builddir)/src/bindings/python\" \
-DINTREE_MAN_PATH=\"$(abs_top_builddir)/doc\" \
Expand Down
7 changes: 3 additions & 4 deletions t/Makefile.am
Expand Up @@ -11,16 +11,15 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src/common/libflux \
$(ZMQ_CFLAGS)

# If LUA_PATH is already set, ensure ./?.lua appears in LUA_PATH so that
# fluxometer.lua is found. O/w, if LUA_PATH is *not* set, ./?.lua already
# appears in the default LUA_PATH, so do nothing.
# Always set LUA_PATH such that builddir/?.lua is first so that the
# build version of fluxometer.lua is found.
#
# If we're testing with "installed" Flux, then also add path to Lua bindings
# to LUA_CPATH, so that non-installed test modules can be found (at this
# time, only lalarm.so)
#
AM_TESTS_ENVIRONMENT = \
test -n "$$LUA_PATH" && export LUA_PATH="$(builddir)/?.lua;$$LUA_PATH";\
export LUA_PATH="$(builddir)/?.lua;$$LUA_PATH;;;";\
test -n "$$FLUX_TEST_INSTALLED_PATH" && \
export LUA_CPATH="$(abs_top_builddir)/src/bindings/lua/.libs/?.so;$$LUA_CPATH;;"; \
export PYTHONPATH="$(abs_top_builddir)/src/bindings/python:$(abs_top_srcdir)/src/bindings/python:$(top_srcdir)/t/python/tap:$(PYTHON_SITE_PKG):$$PYTHONPATH";
Expand Down

0 comments on commit 373cc77

Please sign in to comment.