[gdb/testsuite] Add gdb.testsuite/dump-system-info.exp
authorTom de Vries <tdevries@suse.de>
Fri, 24 Sep 2021 10:39:14 +0000 (12:39 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 24 Sep 2021 10:39:14 +0000 (12:39 +0200)
commitb4e4386a2e58ba6ce8d02b952f1bc6ceb8fc95d1
tree8a6988f138507986f935085bbe06c6ef7692ae73
parent3814a9e1fe77c01c7e872c25afa198537d4ac780
[gdb/testsuite] Add gdb.testsuite/dump-system-info.exp

When interpreting the testsuite results, it's often relevant what kind of
machine the testsuite ran on.  On a local machine one can just do
/proc/cpuinfo, but in case of running tests using a remote system
that distributes test runs to other remote systems that are not directly
accessible, that's not possible.

Fix this by dumping /proc/cpuinfo into the gdb.log, as well as lsb_release -a
and uname -a.

We could do this at the start of each test run, by putting it into unix.exp
or some such.  However, this might be too verbose, so we choose to put it into
its own test-case, such that it get triggered in a full testrun, but not when
running one or a subset of tests.

We put the test-case into the gdb.testsuite directory, which is currently the
only place in the testsuite where we do not test gdb.   [ Though perhaps this
could be put into a new gdb.info directory, since the test-case doesn't
actually test the testsuite. ]

Tested on x86_64-linux.
gdb/testsuite/gdb.testsuite/dump-system-info.exp [new file with mode: 0644]