diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2018-09-17 15:58:55 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2018-10-10 16:23:56 -0400 |
commit | 8ecfd7bd4acd69213c06fac6de9af38299123547 (patch) | |
tree | 2c3055edaaac0053f0403713cbbbbe5e6a01c4b3 /gdb/testsuite | |
parent | 33b031ce7a9b8b1b7c729518af965b7cb70a1cd6 (diff) | |
download | fsf-binutils-gdb-8ecfd7bd4acd69213c06fac6de9af38299123547.zip fsf-binutils-gdb-8ecfd7bd4acd69213c06fac6de9af38299123547.tar.gz fsf-binutils-gdb-8ecfd7bd4acd69213c06fac6de9af38299123547.tar.bz2 |
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
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.gdb/unittest.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/unittest.exp | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c627578..f907323 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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. + 2018-10-09 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (target_supports_scheduler_locking): Replace gdb_start_cmd diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp index 1c83585..8e3e9a1 100644 --- a/gdb/testsuite/gdb.gdb/unittest.exp +++ b/gdb/testsuite/gdb.gdb/unittest.exp @@ -24,7 +24,7 @@ gdb_test_multiple $test $test { gdb_assert "$num_ran > 0" $test } - -re "Selftests are not available in a non-development build.\r\n$gdb_prompt $" { + -re "Selftests have been disabled for this build.\r\n$gdb_prompt $" { unsupported $test } } diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp index e947ff2..b0a7c6a 100644 --- a/gdb/testsuite/gdb.server/unittest.exp +++ b/gdb/testsuite/gdb.server/unittest.exp @@ -38,7 +38,7 @@ gdb_expect { gdb_assert "$num_ran > 0" $test } - -re "Selftests are not available in a non-development build.\r\n$" { + -re "Selftests have been disabled for this build.\r\n$" { unsupported $test } |