diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-07-17 13:27:19 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-07-24 12:25:25 +0100 |
commit | dfd07532693c7df9e15920b7607672382122b38c (patch) | |
tree | 387e6dfd518d0b7aa132cfad1d366a83df5856f1 /libstdc++-v3/testsuite/lib | |
parent | 3216b131656f3056dae587584ad2104cc659aecd (diff) | |
download | gcc-dfd07532693c7df9e15920b7607672382122b38c.zip gcc-dfd07532693c7df9e15920b7607672382122b38c.tar.gz gcc-dfd07532693c7df9e15920b7607672382122b38c.tar.bz2 |
libstdc++: Replace @require@ markup in some I/O tests
We can replace the @require@ markup with { dg-additional-files ... }
directives, so that the required files are explicitly named and are
explicitly copied into place for tests that require it. This will allow
a later change to remove the "Copy all required data files" step in the
proc libstdc++_init in testsuite/lib/libstdc++.exp that is marked TODO.
This commit uses dg-additional-files for a subset of the files that
contain @require@.
Also remove the @diff@ markup where appears to be copy & pasted from
other test files, and so serves no purpose. For example, there is no
output file created by 27_io/basic_ifstream/cons/char/1.cc so there is
nothing for @diff@ to compare. Maybe the purpose was to check that
reading the .tst file with an ifstream doesn't change it, but we've
survived without doing those comparisons for many years so I think we
can remove those cases of @diff@ markup.
libstdc++-v3/ChangeLog:
* testsuite/27_io/basic_filebuf/close/char/2.cc: Remove
@require@ and @diff@ markup. Use dg-additional-files. Remove
unused variable.
* testsuite/27_io/basic_filebuf/close/char/3.cc: Remove
@require@ and @diff@ markup. Use dg-additional-files.
* testsuite/27_io/basic_filebuf/close/char/4.cc: Likewise.
* testsuite/27_io/basic_filebuf/close/char/5.cc: Likewise.
* testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Likewise.
* testsuite/27_io/basic_filebuf/is_open/char/1.cc: Likewise.
* testsuite/27_io/basic_filebuf/open/char/1.cc: Likewise.
* testsuite/27_io/basic_filebuf/open/char/2.cc: Likewise.
* testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: Likewise.
* testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc:
Likewise.
* testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc:
Likewise.
* testsuite/27_io/basic_filebuf/sputc/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sputc/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sputn/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Likewise.
Remove unused variable.
* testsuite/27_io/basic_filebuf/sputn/char/2-in.cc: Remove
@require@ and @diff@ markup. Use dg-additional-files.
* testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: Likewise.
* testsuite/27_io/basic_ifstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_ifstream/open/char/1.cc: Likewise.
* testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc: Likewise.
* testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
Likewise.
* testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc:
Likewise.
* testsuite/27_io/basic_istream/seekg/char/sstream.cc: Likewise.
* testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc:
Likewise.
* testsuite/27_io/basic_istream/tellg/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/char/sstream.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc:
Likewise.
* testsuite/27_io/basic_ofstream/open/char/1.cc: Likewise.
* testsuite/lib/dg-options.exp (dg-additional-files): Append to
v3_additional_files instead of replacing.
* testsuite/lib/libstdc++.exp (v3_target_compile): Reset
v3_additional_files after copying files.
Diffstat (limited to 'libstdc++-v3/testsuite/lib')
-rw-r--r-- | libstdc++-v3/testsuite/lib/dg-options.exp | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/lib/libstdc++.exp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index 0d77fb0..1d31604 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -405,5 +405,5 @@ set v3_additional_files "" # Process a { dg-additional-files "filelist" } directive in the test. proc dg-additional-files { line filelist } { global v3_additional_files - set v3_additional_files $filelist + append v3_additional_files " " $filelist } diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 67a63f5..8efc6f7 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -648,6 +648,7 @@ proc v3_target_compile { source dest type options } { global srcdir v3-copy-file "$srcdir/data/$file" $file } + set v3_additional_files {} set comp_output [target_compile $source $dest $type $options] if { $type == "executable" && $file_to_delete != "" } { |