Add DEVELOPER flag, set by default.

This is a bit messier than I'd like, but we want to clearly remove all
dev code (not just have it uncalled), so we remove fields and functions
altogether rather than stub them out.  This means we put #ifdefs in callers
in some places, but at least it's explicit.

We still run tests, but only a subset, and we run with NO_VALGRIND under
Travis to avoid increasing test times too much.

See-also: #176
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-10-24 12:36:14 +10:30
committed by Christian Decker
parent 8d9818ff9c
commit 3c6eec87e3
21 changed files with 301 additions and 168 deletions

View File

@@ -50,13 +50,16 @@ static void crashlog_activate(void)
void subdaemon_debug(int argc, char *argv[])
{
#if DEVELOPER
int i;
bool printed = false;
#endif
err_set_progname(argv[0]);
backtrace_state = backtrace_create_state(argv[0], 0, NULL, NULL);
crashlog_activate();
#if DEVELOPER
for (i = 1; i < argc; i++) {
if (strstarts(argv[i], "--dev-disconnect=")) {
dev_disconnect_init(atoi(argv[i]
@@ -73,4 +76,5 @@ void subdaemon_debug(int argc, char *argv[])
printed = true;
}
}
#endif
}