Commit 6fcc6042 authored by Akim Demaille's avatar Akim Demaille
Browse files

tests: expect a modern shell

Let's use a nice and clear syntax.
parent 397beb96
......@@ -2,59 +2,43 @@
# @configure_input@
# Wrapper around a non installed vcsn to make it work as an installed one.
abs_srcdir='@abs_top_srcdir@'
export abs_srcdir
abs_builddir='@abs_top_builddir@'
export abs_builddir
export abs_srcdir='@abs_top_srcdir@'
export abs_builddir='@abs_top_builddir@'
# Where the instantiated contexts are generated and compiled.
VCSN_PLUGINDIR=$abs_builddir/lib/plugins
export VCSN_PLUGINDIR
export VCSN_PLUGINDIR=$abs_builddir/lib/plugins
# Use the shipped files, not those installed.
: ${VCSN_DATADIR=$abs_srcdir/share/vcsn}
export VCSN_DATADIR
: ${VCSN_DATA_PATH=$VCSN_DATADIR:$abs_builddir/share/vcsn}
export VCSN_DATA_PATH
export VCSN_DATADIR=${VCSN_DATADIR-$abs_srcdir/share/vcsn}
export VCSN_DATA_PATH=${VCSN_DATA_PATH-$VCSN_DATADIR:$abs_builddir/share/vcsn}
# Use the built files, not those installed.
: ${VCSN_LIBEXECDIR=$abs_srcdir/libexec:$abs_builddir/libexec}
export VCSN_LIBEXECDIR
export VCSN_LIBEXECDIR=${VCSN_LIBEXECDIR-$abs_srcdir/libexec:$abs_builddir/libexec}
# Let bin/vcsn know what path it should use.
: ${VCSN_PATH=$abs_builddir/bin:$abs_srcdir/bin:$VCSN_LIBEXECDIR:$PATH}
export VCSN_PATH
export VCSN_PATH=${VCSN_PATH-$abs_builddir/bin:$abs_srcdir/bin:$VCSN_LIBEXECDIR:$PATH}
# Use the non-installed binaries.
PATH=$VCSN_PATH
export PATH
export PATH=$VCSN_PATH
# Use the non-installed Python modules, and its libraries.
VCSN_PYTHONDIR=$abs_srcdir/python
export VCSN_PYTHONDIR
PYTHONPATH=$VCSN_PYTHONDIR:$abs_builddir/python:$abs_builddir/python/.libs:$PYTHONPATH
export PYTHONPATH
export VCSN_PYTHONDIR=$abs_srcdir/python
export PYTHONPATH=$VCSN_PYTHONDIR:$abs_builddir/python:$abs_builddir/python/.libs:$PYTHONPATH
# Be sure to find tests/bin/test.py when this script is ran by hand.
PYTHONPATH=$abs_srcdir/tests/bin:$PYTHONPATH
export PYTHONPATH
LD_LIBRARY_PATH=$abs_builddir/lib/.libs:$abs_builddir/python/.libs:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$abs_builddir/lib/.libs:$abs_builddir/python/.libs:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
export PYTHONPATH=$abs_srcdir/tests/bin:$PYTHONPATH
export LD_LIBRARY_PATH=$abs_builddir/lib/.libs:$abs_builddir/python/.libs:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$abs_builddir/lib/.libs:$abs_builddir/python/.libs:$DYLD_LIBRARY_PATH
# Apple's SIP (System Integrity Protection) filters out the DYLD_*
# envvars when calling programs from /bin, in particular /bin/sh. As
# a result, when we invoke `vcsn` (the installed binary) we lose these
# variables. So pass them via another envvar, and let the installed
# `vcsn` install them when defined.
VCSN_DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
export VCSN_DYLD_LIBRARY_PATH
export VCSN_DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
# If we need to compile, use the non-installed headers and libs.
VCSN_CPPFLAGS="-I $abs_builddir -I $abs_srcdir @VCSN_CPPFLAGS@"
export VCSN_CPPFLAGS
VCSN_LDFLAGS="-L $abs_builddir/lib/.libs @VCSN_LDFLAGS@"
export VCSN_LDFLAGS
export VCSN_CPPFLAGS="-I $abs_builddir -I $abs_srcdir @VCSN_CPPFLAGS@"
export VCSN_LDFLAGS="-L $abs_builddir/lib/.libs @VCSN_LDFLAGS@"
case $1 in
('--export') ;; # We are sourced to set up the environment.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment