Skip to content

Commit f88a065

Browse files
author
Owen Jones
committed
Address most review comments
1 parent 95eae59 commit f88a065

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

doc/architectural/compilation-and-development.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\ingroup module_hidden
22
\page compilation-and-development Compilation and Development
33

4-
\author Martin Brain, Peter Schrammel
4+
\author Martin Brain, Peter Schrammel, Owen Jones
55

66
\section compilation-and-development-section-compilation Compilation
77

@@ -14,13 +14,13 @@ The CBMC source code is available on
1414
Instructions for compiling CBMC using makefiles are
1515
available in
1616
[COMPILING.md](https://github.com/diffblue/cbmc/blob/develop/COMPILING.md#what-architecture)
17-
in the root of the CBMC repository. They cover linux, Solaris 11,
17+
in the root of the CBMC repository. They cover Linux, Solaris 11,
1818
FreeBSD 11, MacOS X and Windows.
1919

2020

2121
\subsection compilation-and-development-subsection-cmake-files CMake files
2222

23-
There is experimental support for compiling using CMake. Instructions are
23+
There is also support for compiling using CMake. Instructions are
2424
available in
2525
[COMPILING.md](https://github.com/diffblue/cbmc/blob/develop/COMPILING.md#working-with-cmake-experimental)
2626
in the root of the CBMC repository.
@@ -55,26 +55,31 @@ print statements and code checking that data structures are as expected.
5555

5656
\subsection compilation-and-development-subsection-regression-tests Regression tests
5757

58-
The regression tests are contained in the `regression/` folder. Inside
59-
`regression/` there is a directory for each of the tools/modules. Each of
60-
these contains multiple test directories, with names describing
58+
The regression tests are contained in `regression/` and `jbmc/regression/`.
59+
Inside these folders there is a directory for each of the tools/modules. Each
60+
of these contains multiple test directories, with names describing
6161
what they test. When there are multiple tests in a test directory then
62-
they should all be testing the same thing. Each test directory contains
63-
input files and one or more test description files,
62+
they should be testing very similar aspects of the program's behaviour. Each
63+
test directory contains input files and one or more test description files,
6464
which have the ending `.desc`. The test description files describe what command
65-
to run, what output is expected and so on. The test framework is an in-house
65+
to run, what output is expected and so on. The test framework is a
6666
Perl script,
6767
[test.pl](https://github.com/diffblue/cbmc/blob/develop/regression/test.pl).
6868
To run all the tests in a directory corresponding to a tool or module:
6969

7070
../test.pl -c PATH_TO_CBMC
7171

7272
The `--help` option to `test.pl` gives instructions for use and outlines the
73-
format of the test description files.
73+
format of the test description files. Most importantly, the first word in a
74+
test description file is its level, which is one of: `CORE` (should be run in
75+
CI, should succeed), `THOROUGH` (takes too long to be run in CI, should
76+
succeed), `FUTURE` (will succeed when a planned feature is added) or
77+
`KNOWNBUG` (will succeed when a bug is fixed).
7478

7579
If you have compiled CBMC using CMake then another way to run the same tests
7680
is through `CTest`. From the build directory, the command `ctest -V -L CORE`
77-
will run all of the tests that are run in CI. `-V` makes it print out more
81+
will run all of the tests that are labelled CORE in the desc files and unit
82+
tests. `-V` makes it print out more
7883
useful output and `-L CORE` makes it only run tests that have been tagged
7984
`CORE`. `-R regular_expression` can be used to limit which tests are run, and
8085
`-N` makes it lists which tests it will run without actually running them.
@@ -132,10 +137,10 @@ C++ code can be automatically reformatted in the correct way by running
132137
\section compilation-and-development-section-linting Linting
133138

134139
There is also a linting script, `scripts/cpplint.py`. There is a wrapper
135-
script to run `cpplint.py` only on lines that have been changed from the
136-
base branch:
140+
script to run `cpplint.py` only on lines that differ from another
141+
branch, e.g. to run it on lines that have been changed from `develop`:
137142

138-
scripts/run_lint.sh <base-branch>
143+
scripts/run_lint.sh develop
139144

140145
There are also instructions for adding this as a git pre-commit hook in
141146
[CODING_STANDARD.md](https://github.com/diffblue/cbmc/blob/develop/CODING_STANDARD.md#pre-commit-hook-to-run-cpplint-locally).

0 commit comments

Comments
 (0)