]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/rust/compile/xfail/xfail.exp
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / rust / compile / xfail / xfail.exp
1 # Copyright (C) 2021-2023 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
16
17 # Compile tests, no torture testing.
18 #
19 # These tests are used to keep track of known limitations :
20 # 1- tests that are incorrecly build instead of being rejected
21 # 2- tests that are build to an incorrect result
22 # 3- tests that are rejected instead of being correctly build
23 #
24 # Not currently supported here:
25 # - tests that are exhibiting incorrect behavior at runtime
26 #
27 # Here's how to annotate tests for each cases:
28 #
29 # 1- test is successfuly build instead of being rejected
30 #
31 # Expected behavior: a specific error rejecting the test
32 # Observed behavior: error not present
33 # Use dg-error and mark the test xfail and add reference to corresponding issue.
34 # { dg-error "lifetime not defined" "#359" { xfail *-*-* } }
35 #
36 # 2- test is successfuly build but result is incorrect
37 #
38 # Expected behavior: test is correctly build and has specific property
39 # Observed behavior: test is correctly build but is missing the specific property
40 # Depends on the property. For example, if the property can be checked in the assembly file, use dg-final + xfail.
41 # { dg-final { scan-assembler "given_string_missing_in_assembly_" "#1234" { xfail *-*-* } } }
42 #
43 # 3- test is rejected instead of being correctly build
44 #
45 # Expected behavior: test is successfully build
46 # Observed behavior: the test is rejected with an error
47 # Use dg-bogus + xfail to match the bogus error message, or use dg-xfail-if if it's harder to match a specific error.
48
49 # Load support procs.
50 load_lib rust-dg.exp
51
52 # Initialize `dg'.
53 dg-init
54
55 # Main loop.
56 set saved-dg-do-what-default ${dg-do-what-default}
57
58 set dg-do-what-default "compile"
59 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.rs]] "" ""
60 set dg-do-what-default ${saved-dg-do-what-default}
61
62 # All done.
63 dg-finish