@@ -16,7 +16,9 @@ behavior of the binary produced by the compiler.
16
16
Currently, only the _ execute_ tests are supported in ` regression ` . Both
17
17
` compile ` and ` execute ` tests have been enabled in ` torture ` .
18
18
19
- Of the supported tests, a number of tests have been disabled. There are four
19
+ Of the supported tests, a number of tests have been disabled. These are listed
20
+ in the ` DisabledFiles.cmake ` files that can be found in the various
21
+ subdirectories of ` Fortran/gfortran ` . There are four
20
22
categories of such tests:
21
23
22
24
- * Unsupported* : These are tests that use non-standard extensions/intrinsics
@@ -129,19 +131,13 @@ implemented at a steady pace. The relevant tests in this directory should be
129
131
enabled. This would involve building the test suite with one of the
130
132
` TEST_SUITE_FORTRAN_* ` flags described above.
131
133
132
- _ * NOTE* : We are currently in the process of migrating to the static test
133
- configuration described below. During that time, the configuration files and
134
- associated scripts will be present in the repository but will not be used. When
135
- the migration is completed, this note will be removed._
136
-
137
134
The build system uses static test configuration files named ` tests.cmake ` to be
138
135
found in the various subdirectories of the test suite. These are generated by
139
136
` utils/update-test-config.py ` . The configuration files are the result of parsing
140
137
the relevant DejaGNU annotations from the test files and are used by the various
141
- ` CMakeLists.txt ` files to set up the tests. This was a lot easier --- and
142
- cleaner --- than parsing the annotations from ` cmake ` . These configuration files
143
- are not intended to be edited by hand - any edits will be overwritten when
144
- ` update-test-config.py ` is run.
138
+ ` CMakeLists.txt ` files to set up the tests. These configuration files * must not*
139
+ be edited by hand - any edits will be overwritten when ` update-test-config.py `
140
+ is run.
145
141
146
142
The test configuration files consist of comment and non-comment lines. Comment
147
143
lines start with a ` # ` . Each non-comment line represents a single test. The line
@@ -182,7 +178,9 @@ The test files in `regression` and `torture` *must not* be modified.
182
178
If some of the items listed here are implemented, even in part, it should
183
179
allows us to make better use of the test-suite.
184
180
185
- Several DejaGNU directives from the test files are currently ignored. In some
181
+ Several DejaGNU directives from the test files are either ignored or only
182
+ partially supported - i.e. only a subset of the options specified by the
183
+ directive are handled correctly. In some
186
184
cases, those directives check that the language feature/optimization being
187
185
exercised by the tests is actually handled correctly. By ignoring them, we are
188
186
simply checking that ` flang ` (or the code produced by it) does not crash at
@@ -196,7 +194,7 @@ vectorized the code.
196
194
It is not clear how much effort would be involved in correctly handling all the
197
195
DejaGNU directives.
198
196
199
- ### ` dg-error ` directive ###
197
+ #### ` dg-error ` directive # ###
200
198
201
199
The ` dg-error ` directive indicates that the test should fail to compile with a
202
200
particular error. Obviously, this is a ` gfortran ` -specific error. ` flang ` may
@@ -210,7 +208,7 @@ are currently not implemented which results in a parse error (as opposed to the
210
208
triggering of a "not-yet-implemented" assertion) which is also deemed an "error",
211
209
thereby causing the test to pass.
212
210
213
- ### ` dg-warning ` directive ###
211
+ #### ` dg-warning ` directive # ###
214
212
215
213
Currently, the ` dg-warning ` directive is ignored. It ought to be possible to
216
214
treat in a manner similar to ` dg-error ` .
@@ -227,15 +225,27 @@ the file for the presence or absence of certain text. To capture the same
227
225
behavior here, we would need to parse and translate the internal representation
228
226
of GCC to an equivalent representation in LLVM IR.
229
227
230
- ### ` target ` directive ###
228
+ #### ` target ` directive ####
229
+
230
+ The ` target ` directive is used to restrict tests to run on certain platforms
231
+ and/or systems. The directive can be fairly complex. While in most cases the
232
+ directive simply consists of a triple specifying the platform on which the
233
+ test is enabled (or disabled), negations, logical ` and ` and ` or ` operations are
234
+ also permitted. The directives can appear in several places within
235
+ a test file. In addition to "top-level" directives which control whether or
236
+ not the entire test is enabled, a ` target ` directive can also be used to
237
+ conditionally emit or suppress an error or a warning on certain platforms.
238
+ Currently, there is limited support for these directives.
239
+
240
+ - Logical operators on ` target ` directives are not supported. Directives
241
+ containing these operators are ignored entirely.
242
+
243
+ - Only "top-level" directives are handled. ` target ` directives that appear
244
+ inside other directives such as ` dg-error ` or ` dg-warning ` are ignored.
231
245
232
- _ * NOTE* : With the static test configuration, the "top-level" ` target ` directives
233
- are correctly handled. This section will be updated when the switch to the
234
- static test configurations is completed._
246
+ #### Platform-specific disabling of tests ####
235
247
236
- The ` target ` directive is used to restrict tests to run on certain
237
- platforms/systems. Currently, the target directive is ignored entirely and the
238
- tests are always run. Currently, the gfortran tests are only enabled on * nix on
239
- x86-64 and aarch64 and ignoring the directive seems to be ok. As support for
240
- more systems and architectures are added, these directives will need to be
241
- handled correctly.
248
+ Some tests fail on certain platforms but not on others. There is, currently, no
249
+ way to disable these tests on a specific platform and these are disabled
250
+ everywhere. This is obviously not ideal since the extra coverage that the tests
251
+ provide &mdash ; even if on a limited set of platforms &mdash ; is desirable.
0 commit comments