diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2018-12-01 14:10:10 +0100 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2018-12-20 21:52:31 +0100 |
commit | 161d081c56f12e7a00d8a07ccac445855d5d357b (patch) | |
tree | 2e31a26ea1fb9f27d772195cf4fd4a8ac67ff039 /zlib/crc32.h | |
parent | f0f13ece4ce4ae5745cbf987c187306f755736b8 (diff) | |
download | gdb-161d081c56f12e7a00d8a07ccac445855d5d357b.zip gdb-161d081c56f12e7a00d8a07ccac445855d5d357b.tar.gz gdb-161d081c56f12e7a00d8a07ccac445855d5d357b.tar.bz2 |
Ensure deterministic result order in gdb.ada/info_auto_lang.exp
standard_ada_testfile, standard_test_file and the explicit
csrcfile assignment in info_auto_lang.exp all gives similar pathnames
prefix for a source, such as
/home/philippe/gdb/git/build_binutils-gdb/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.<something>.
Note that the above pathnames contain ../ which appears when a relative
pathname is used to call configure.
In any case, the gnat compiler normalizes Ada sources path when compiling.
So, the 'Ada' .o object are referencing a pathname such as
/home/philippe/gdb/git/binutils-gdb/gdb/testsuite/gdb.ada/info_auto_lang/proc_in_ada.adb,
while the 'C' .o object still references the not normalized pathname.
As the results of 'info functions | ...' are sorted by pathname first,
the order of the results depends on the comparison between different directories,
leading to results that can change depending on these directories.
=> Ensure the result order is always the same, by normalising the C source file,
which makes the results independent of the way configure is launched.
Tested by running the testcase in 2 different builds, that without normalize
were giving different results.
Note: such 'set csrcfile' is used in 4 other tests mixing Ada and C.
After discussion, it was deemed sufficient to just normalize the pathname
for this test.
gdb/testsuite/ChangeLog
2018-12-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/info_auto_lang.exp: Normalize some_c source file.
Update order of results accordingly.
Diffstat (limited to 'zlib/crc32.h')
0 files changed, 0 insertions, 0 deletions