This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [gdb/testsuite] Add cc-with-dwz.exp and cc-with-dwz-m.exp


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c30391f893fd99e768c1a6282763ef553c45f1ff

commit c30391f893fd99e768c1a6282763ef553c45f1ff
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Apr 11 19:13:05 2019 +0200

    [gdb/testsuite] Add cc-with-dwz.exp and cc-with-dwz-m.exp
    
    We can use CC_WITH_TWEAKS_FLAGS when cd-ing into the gdb build subdir and
    invoking make check:
    ...
    $ cd $objdir/gdb
    $ make check \
        RUNTESTFLAGS='--target_board=cc-with-tweaks' \
        CC_WITH_TWEAKS_FLAGS='-z'
    ...
    
    But when cd-ing into the top-level build dir and invoking make check-gdb
    instead:
    ...
    $ cd $objdir
    $ make check-gdb \
        RUNTESTFLAGS='--target_board=cc-with-tweaks' \
        CC_WITH_TWEAKS_FLAGS='-z'
    ...
    using CC_WITH_TWEAKS_FLAGS has no effect, because CC_WITH_TWEAKS_FLAGS is not
    passed down from the top level Makefile.
    
    Add cc-with-dwz.exp and cc-with-dwz-m.exp, that don't require
    CC_WITH_TWEAKS_FLAGS to be set in the make invocation, allowing us to run these
    test configurations from the toplevel build dir:
    ...
    $ cd $objdir
    $ make check-gdb \
        RUNTESTFLAGS='--target_board=cc-with-dwz'
    ...
    
    Tested on x86_64-linux.
    
    gdb/testsuite/ChangeLog:
    
    2019-04-11  Tom de Vries  <tdevries@suse.de>
    
    	* boards/cc-with-dwz-m.exp: New file.
    	* boards/cc-with-dwz.exp: New file.
    	* boards/cc-with-tweaks.exp: Note that check-gdb doesn't work.

Diff:
---
 gdb/testsuite/ChangeLog                 |  6 ++++++
 gdb/testsuite/boards/cc-with-dwz-m.exp  | 28 ++++++++++++++++++++++++++++
 gdb/testsuite/boards/cc-with-dwz.exp    | 28 ++++++++++++++++++++++++++++
 gdb/testsuite/boards/cc-with-tweaks.exp |  4 ++++
 4 files changed, 66 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5c7cadf..dfbee85 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-04-11  Tom de Vries  <tdevries@suse.de>
+
+	* boards/cc-with-dwz-m.exp: New file.
+	* boards/cc-with-dwz.exp: New file.
+	* boards/cc-with-tweaks.exp: Note that check-gdb doesn't work.
+
 2019-04-09  Simon Marchi  <simon.marchi@efficios.com>
 
 	* gdb.base/start-cpp.exp: New file.
diff --git a/gdb/testsuite/boards/cc-with-dwz-m.exp b/gdb/testsuite/boards/cc-with-dwz-m.exp
new file mode 100644
index 0000000..dd15c36
--- /dev/null
+++ b/gdb/testsuite/boards/cc-with-dwz-m.exp
@@ -0,0 +1,28 @@
+# Copyright 2019 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is a dejagnu "board file" and is used to run the testsuite
+# with contrib/cc-with-tweaks.sh -m.
+#
+# NOTE: We assume dwz is in $PATH.
+#
+# Example usage:
+# bash$ cd $objdir
+# bash$ make check-gdb \
+#   RUNTESTFLAGS='--target_board=cc-with-dwz-m'
+#
+
+set CC_WITH_TWEAKS_FLAGS "-m"
+load_board_description "cc-with-tweaks"
diff --git a/gdb/testsuite/boards/cc-with-dwz.exp b/gdb/testsuite/boards/cc-with-dwz.exp
new file mode 100644
index 0000000..7329da3
--- /dev/null
+++ b/gdb/testsuite/boards/cc-with-dwz.exp
@@ -0,0 +1,28 @@
+# Copyright 2019 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is a dejagnu "board file" and is used to run the testsuite
+# with contrib/cc-with-tweaks.sh -z.
+#
+# NOTE: We assume dwz is in $PATH.
+#
+# Example usage:
+# bash$ cd $objdir
+# bash$ make check-gdb \
+#   RUNTESTFLAGS='--target_board=cc-with-dwz'
+#
+
+set CC_WITH_TWEAKS_FLAGS "-z"
+load_board_description "cc-with-tweaks"
diff --git a/gdb/testsuite/boards/cc-with-tweaks.exp b/gdb/testsuite/boards/cc-with-tweaks.exp
index 59a53a8..11ec6a2 100644
--- a/gdb/testsuite/boards/cc-with-tweaks.exp
+++ b/gdb/testsuite/boards/cc-with-tweaks.exp
@@ -19,10 +19,14 @@
 # NOTE: If using dwz, We assume it is in $PATH.
 #
 # Example usage:
+# bash$ cd $objdir/gdb
 # bash$ make check \
 #   RUNTESTFLAGS='--target_board=cc-with-tweaks' \
 #   CC_WITH_TWEAKS_FLAGS='-z'
 #
+# Note: this does not work from $objdir with make check-gdb because
+# CC_WITH_TWEAKS_FLAGS is not passed down from the top level Makefile.
+#
 # The default value of CC_WITH_TWEAKS_FLAGS is "".
 
 if ![info exists CC_WITH_TWEAKS_FLAGS] {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]