aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-common.cc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-09-13 10:57:08 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-09-14 13:58:34 +0100
commit9da3c935e3f46e32d9f801f07916634dc9a65886 (patch)
tree6f96fa15db115cc6a8d270195301187a1afca0fd /gcc/ggc-common.cc
parentb9b9d0a7db098e2b7e6894dca98ddd551067cad1 (diff)
downloadgcc-9da3c935e3f46e32d9f801f07916634dc9a65886.zip
gcc-9da3c935e3f46e32d9f801f07916634dc9a65886.tar.gz
gcc-9da3c935e3f46e32d9f801f07916634dc9a65886.tar.bz2
libstdc++: Support dg-additional-files in tests
Some tests rely on text files with specific content being present in the test directory. This has historically been done by copying testsuite/data/*.tst and testsuite/data/*.txt to the test dir at the start, in the libstdc++_init procedure. Some tests modify their data files, so if the same test runs more than once in the same directory the second and subsequent tests will see the modified files, and FAIL because the content of the file is not in the expected state. This change adds support for the dg-additional-files directive from the main compiler testsuite and changes v3_target_compile to copy the specified files to the directory where the test will run. This ensures that a fresh copy of the files is present each time the test runs. Eventually all tests could be transitioned to use dg-additional-files and then libstdc++_init could be changed to remove the initial copy of all files. This change only adds dg-additional-files to the tests that modify their files and FAIL when re-run in the same directory. The tests that rely on additional data files have comments containing the strings "@require@" and "@diff@" which seem to be related to the libstdc++-v3/mkcheck.in testing script that was removed in 2003. Those comments can be used to find tests that should be migrated to use the new dg-additional-files support, and then the comments can be removed. libstdc++-v3/ChangeLog: * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Use dg-additional-files. Remove @require@ and @diff@ comments. * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Likewise. * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Likewise. * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Likewise. * testsuite/lib/dg-options.exp (v3_additional_files): New global variable. (dg-additional-files): New proc. * testsuite/lib/libstdc++.exp (v3_target_compile): Copy additional files to test directory.
Diffstat (limited to 'gcc/ggc-common.cc')
0 files changed, 0 insertions, 0 deletions