@@ -35,7 +35,7 @@ tests are contained inside the LLVM repository itself under ``llvm/unittests``
35
35
and ``llvm/test `` respectively and are expected to always pass. They should be
36
36
run before every commit.
37
37
38
- The whole programs tests are referred to as the "LLVM test suite" (or
38
+ The whole-program tests are referred to as the "LLVM test suite" (or
39
39
"test-suite") and are in the ``test-suite ``
40
40
`repository on GitHub <https://github.com/llvm/llvm-test-suite.git >`_.
41
41
For historical reasons, these tests are also referred to as the "nightly
@@ -49,7 +49,7 @@ Unit tests are written using `Google Test <https://github.com/google/googletest/
49
49
and `Google Mock <https://github.com/google/googletest/blob/master/docs/gmock_for_dummies.md >`_
50
50
and are located in the ``llvm/unittests `` directory.
51
51
In general, unit tests are reserved for targeting the support library and other
52
- generic data structure, we prefer relying on regression tests for testing
52
+ generic data structure. We prefer relying on regression tests for testing
53
53
transformations and analysis on the IR.
54
54
55
55
Regression tests
@@ -69,7 +69,7 @@ piece of LLVM IR distilled from an actual application or benchmark.
69
69
Testing Analysis
70
70
----------------
71
71
72
- An analysis is a pass that infer properties on some part of the IR and not
72
+ An analysis is a pass to infer properties on some part of the IR without
73
73
transforming it. They are tested in general using the same infrastructure as the
74
74
regression tests, by creating a separate "Printer" pass to consume the analysis
75
75
result and print it on the standard output in a textual format suitable for
@@ -90,7 +90,7 @@ flags, and then executed to capture the program output and timing
90
90
information. The output of these programs is compared to a reference
91
91
output to ensure that the program is being compiled correctly.
92
92
93
- In addition to compiling and executing programs, whole program tests
93
+ In addition to compiling and executing programs, whole- program tests
94
94
serve as a way of benchmarking LLVM performance, both in terms of the
95
95
efficiency of the programs generated as well as the speed with which
96
96
LLVM compiles, optimizes, and generates code.
@@ -104,7 +104,7 @@ Debugging Information tests
104
104
---------------------------
105
105
106
106
The test suite contains tests to check the quality of debugging information.
107
- The tests are written in C based languages or in LLVM assembly language.
107
+ The tests are written in C- based languages or in LLVM assembly language.
108
108
109
109
These tests are compiled and run under a debugger. The debugger output
110
110
is checked to validate the debugging information. See ``README.txt `` in the
@@ -139,7 +139,7 @@ To run all of the LLVM regression tests, use the ``check-llvm`` target:
139
139
% make check-llvm
140
140
141
141
In order to get reasonable testing performance, build LLVM and subprojects
142
- in release mode, i.e.
142
+ in release mode, i.e.,
143
143
144
144
.. code-block :: bash
145
145
@@ -159,7 +159,7 @@ variable to pass the required options to lit. For example, you can use:
159
159
160
160
% make check LIT_OPTS=" -v --vg --vg-leak"
161
161
162
- to enable testing with valgrind and with leak checking enabled.
162
+ to enable testing with Valgrind and with leak checking enabled.
163
163
164
164
To run individual tests or subsets of tests, you can use the ``llvm-lit ``
165
165
script which is built as part of LLVM. For example, to run the
@@ -202,13 +202,13 @@ The LLVM regression tests are driven by :program:`lit` and are located in the
202
202
203
203
This directory contains a large array of small tests that exercise
204
204
various features of LLVM and to ensure that regressions do not occur.
205
- The directory is broken into several sub-directories , each focused on a
205
+ The directory is broken into several subdirectories , each focused on a
206
206
particular area of LLVM.
207
207
208
208
Writing new regression tests
209
209
----------------------------
210
210
211
- The regression test structure is very simple, but does require some
211
+ The regression test structure is very simple but does require some
212
212
information to be set. This information is gathered via ``cmake ``
213
213
and is written to a file, ``test/lit.site.cfg.py `` in the build directory.
214
214
The ``llvm/test `` Makefile does this work for you.
@@ -299,7 +299,7 @@ top to indicate that assertions were automatically generated.
299
299
If you want to update assertions in an existing test case, pass the `-u ` option
300
300
which first checks the ``NOTE: `` line exists and matches the script name.
301
301
302
- Sometimes a test absolutely depends on hand-written assertions and should not
302
+ Sometimes, a test absolutely depends on hand-written assertions and should not
303
303
have assertions automatically generated. In that case, add the text ``NOTE: Do
304
304
not autogenerate `` to the first line, and the scripts will skip that test. It
305
305
is a good idea to explain why generated assertions will not work for the test
@@ -428,7 +428,7 @@ For convenience, these are the contents:
428
428
!llvm.ident = !{!0}
429
429
!0 = metadata !{metadata !"Compiler V3"}
430
430
431
- For symmetry reasons , ``ident.ll `` is just a dummy file that doesn't
431
+ For symmetry, ``ident.ll `` is just a dummy file that doesn't
432
432
actually participate in the test besides holding the ``RUN: `` lines.
433
433
434
434
.. note ::
@@ -470,7 +470,7 @@ content.
470
470
The script will prepare extra files with ``split-file ``, invoke ``gen ``, and
471
471
then rewrite the part after ``gen `` with its stdout.
472
472
473
- For convenience, if the test needs one single assembly file, you can also wrap
473
+ For convenience, if the test needs a single assembly file, you can also wrap
474
474
``gen `` and its required files with ``.ifdef `` and ``.endif ``. Then you can
475
475
skip ``split-file `` in ``RUN `` lines.
476
476
@@ -869,7 +869,7 @@ Additional substitutions can be defined as follows:
869
869
substitutions for all tests in a test directory. They do so by extending the
870
870
substitution list, ``config.substitutions ``. Each item in the list is a tuple
871
871
consisting of a pattern and its replacement, which lit applies as plain text
872
- (even if it contains sequences that python 's ``re.sub `` considers to be
872
+ (even if it contains sequences that Python 's ``re.sub `` considers to be
873
873
escape sequences).
874
874
- To define substitutions within a single test file, lit supports the
875
875
``DEFINE: `` and ``REDEFINE: `` directives, described in detail below. So that
@@ -976,7 +976,7 @@ directives:
976
976
colons. This syntax has a few advantages:
977
977
978
978
- It is impossible for ``%{name} `` to contain sequences that are special in
979
- python 's ``re.sub `` patterns. Otherwise, attempting to specify
979
+ Python 's ``re.sub `` patterns. Otherwise, attempting to specify
980
980
``%{name} `` as a substitution pattern in a lit configuration file could
981
981
produce confusing expansions.
982
982
- The braces help avoid the possibility that another substitution's pattern
@@ -1039,7 +1039,7 @@ To address such use cases, lit configuration files support
1039
1039
to specify the maximum number of passes through the substitution list. Thus, in
1040
1040
the above example, setting the limit to 2 would cause lit to make a second pass
1041
1041
that expands ``%{inner} `` in the ``RUN: `` line, and the output from the ``echo ``
1042
- command when then be:
1042
+ command would then be:
1043
1043
1044
1044
.. code-block :: shell
1045
1045
@@ -1094,7 +1094,7 @@ a test fails.
1094
1094
1095
1095
Finally, any line that contains "END." will cause the special
1096
1096
interpretation of lines to terminate. This is generally done right after
1097
- the last RUN: line. This has two side effects:
1097
+ the last `` RUN: `` line. This has two side effects:
1098
1098
1099
1099
(a) it prevents special interpretation of lines that are part of the test
1100
1100
program, not the instructions to the test case, and
0 commit comments