forked from Imagelibrary/binutils-gdb
Add parameter to allow enabling/disabling selftests via configure
This is a follow-up of: https://sourceware.org/ml/gdb-patches/2018-08/msg00347.html Instead of going throttle and always enabling our selftests (even in non-development builds), this patch is a bit more conservative and introduces a configure option ("--enable-unit-tests") that allows the user to choose whether she wants unit tests in the build or not. Note that the current behaviour is retained: if no option is provided, GDB will have selftests included in a development build, and will *not* have selftests included in a non-development build. The rationale for having this option is still the same: due to the many racy testcases and random failures we see when running the GDB testsuite, it is unfortunately not possible to perform a full test when one is building a downstream package. As the Fedora GDB maintainer and one of the Debian GDB uploaders, I feel like this situation could be improved by, at least, executing our selftests after the package has been built. This patch introduces no regressions to our build. OK? gdb/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> Simon Marchi <simark@simark.ca> * README (`configure' options): Add documentation for new "--enable-unit-tests" option. * acinclude.m4: Include "selftest.m4". * configure: Regenerate. * configure.ac: Use "GDB_AC_SELFTEST". * maint.c (maintenance_selftest): Update message informing that selftests have been disabled. (maintenance_info_selftests): Likewise. * selftest.m4: New file. gdb/gdbserver/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> Simon Marchi <simark@simark.ca> * acinclude.m4: Include "../selftest.m4". * configure: Regenerate. * configure.ac: Use "GDB_AC_SELFTEST". * configure.srv: Use "$enable_unittests" instead of "$development" when checking whether unit tests have been enabled. * server.c (captured_main): Update message informing that selftests have been disabled. gdb/testsuite/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.gdb/unittest.exp: Update expected message informing that selftests have been disabled. * gdb.server/unittest.exp: Likewise. squash! Add parameter to allow enabling/disabling selftests via configure
This commit is contained in:
@@ -943,7 +943,7 @@ maintenance_selftest (const char *args, int from_tty)
|
||||
selftests::run_tests (args);
|
||||
#else
|
||||
printf_filtered (_("\
|
||||
Selftests are not available in a non-development build.\n"));
|
||||
Selftests have been disabled for this build.\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -957,7 +957,7 @@ maintenance_info_selftests (const char *arg, int from_tty)
|
||||
});
|
||||
#else
|
||||
printf_filtered (_("\
|
||||
Selftests are not available in a non-development build.\n"));
|
||||
Selftests have been disabled for this build.\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user