Browse Source

configure: add --experimental-features flag (default: == DEVELOPER).

This will be used for option_simplified_commitment and other
still-being-specified options.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
plugin-6
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
fab5027d64
  1. 8
      configure
  2. 1
      tests/utils.py

8
configure

@ -47,6 +47,8 @@ usage()
echo " Prefix for make install"
usage_with_default "--enable/disable-developer" "$DEVELOPER" "enable" "disable"
echo " Developer mode, good for testing"
usage_with_default "--enable/disable-experimental-features" "$EXPERIMENTAL_FEATURES" "enable" "disable (unless developer)"
echo " Developer mode, good for testing"
usage_with_default "--enable/disable-compat" "$COMPAT" "enable" "disable"
echo " Compatibility mode, good to disable to see if your software breaks"
usage_with_default "--enable/disable-valgrind" "(autodetect)"
@ -101,6 +103,8 @@ for opt in "$@"; do
--prefix=*) PREFIX="${opt#--prefix=}";;
--enable-developer) DEVELOPER=1;;
--disable-developer) DEVELOPER=0;;
--enable-experimental-features) EXPERIMENTAL_FEATURES=1;;
--disable-experimental-features) EXPERIMENTAL_FEATURES=0;;
--enable-compat) COMPAT=1;;
--disable-compat) COMPAT=0;;
--enable-valgrind) VALGRIND=1;;
@ -113,6 +117,9 @@ for opt in "$@"; do
esac
done
# If EXPERIMENTAL_FEATURES not set, set it to same as DEVELOPER
EXPERIMENTAL_FEATURES=${EXPERIMENTAL_FEATURES:-$DEVELOPER}
echo -n "Compiling $CONFIGURATOR..."
$CC $CWARNFLAGS $CDEBUGFLAGS -o $CONFIGURATOR $CONFIGURATOR.c
echo "done"
@ -136,6 +143,7 @@ add_var CWARNFLAGS "$CWARNFLAGS"
add_var CDEBUGFLAGS "$CDEBUGFLAGS"
add_var VALGRIND "$VALGRIND"
add_var DEVELOPER "$DEVELOPER" $CONFIG_HEADER
add_var EXPERIMENTAL_FEATURES "$EXPERIMENTAL_FEATURES" $CONFIG_HEADER
add_var COMPAT "$COMPAT" $CONFIG_HEADER
add_var PYTEST "$PYTEST"

1
tests/utils.py

@ -37,6 +37,7 @@ with open('config.vars') as configfile:
config = dict([(line.rstrip().split('=', 1)) for line in configfile])
DEVELOPER = os.getenv("DEVELOPER", config['DEVELOPER']) == "1"
EXPERIMENTAL_FEATURES = os.getenv("EXPERIMENTAL_FEATURES", config['EXPERIMENTAL_FEATURES']) == "1"
TIMEOUT = int(os.getenv("TIMEOUT", "60"))
VALGRIND = os.getenv("VALGRIND", config['VALGRIND']) == "1"
SLOW_MACHINE = os.getenv("SLOW_MACHINE", "0") == "1"

Loading…
Cancel
Save