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.