Skip to content

Commit d83dccb

Browse files
committed
Add regression test information to COMPILING.md
This adds information on how to run regression tests using bnoth cmake and make to COMPILING.md. Also ensures COMPILING.md follows clang-format-7.
1 parent 64974b0 commit d83dccb

File tree

1 file changed

+52
-7
lines changed

1 file changed

+52
-7
lines changed

COMPILING.md

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WHAT ARCHITECTURE?
1+
#WHAT ARCHITECTURE ?
22

33
CPROVER now needs a C++11 compliant compiler and is known to work in the
44
following environments:
@@ -18,7 +18,7 @@ past, but are not actively tested:
1818
- Solaris 11
1919
- FreeBSD 11
2020

21-
# Building using CMake
21+
#Building using CMake
2222

2323
Building with CMake is supported across Linux, MacOS X and Windows with Visual
2424
Studio 2019. There are also hand-written make files which can be used to build
@@ -118,7 +118,7 @@ files.
118118
complete set of built binaries can be found in `./build/bin` once the build
119119
is complete.
120120
121-
# Building using hand-written make files.
121+
#Building using hand - written make files.
122122
123123
The rest of this section is split up based on the platform being built on.
124124
Please read the section appropriate for your machine.
@@ -253,7 +253,7 @@ Maven 3 manually.
253253
gmake -C jbmc/src
254254
```
255255
256-
# WORKING WITH ECLIPSE
256+
#WORKING WITH ECLIPSE
257257
258258
To work with Eclipse, do the following:
259259
@@ -270,7 +270,7 @@ the need to integrate JBMC as a separate project. Be aware that you need to
270270
change the build location (Select project in Eclipse -> Properties -> C/C++
271271
Build) to one of the src directories.
272272
273-
# WORKING WITH DOCKER
273+
#WORKING WITH DOCKER
274274
275275
To compile and run the tools in a Docker container, do the following:
276276
@@ -284,9 +284,9 @@ To compile and run the tools in a Docker container, do the following:
284284
that contains the tests to the container. A possible invocation that does that
285285
is: `$ docker run --mount type=bind,source=local/path/with/files,target=/mnt/analysis -i t cbmc`. In the
286286
resulting container, the files present in the local file system under
287-
`local/path/with/files` will be present under `/mnt/analysis`.
287+
`local/path/with/files` will be present under `/mnt/analysis`.
288288
289-
# OPTIONS AND VARIABLES
289+
#OPTIONS AND VARIABLES
290290
291291
## Compiling with CUDD
292292
@@ -482,3 +482,48 @@ successfully on Windows or macOS.
482482
The argument for the IPASIR parameter gives the build system the location for
483483
the IPASIR headers, which is needed for the cbmc includes of `ipasir.h`. The
484484
compiled binary will be placed in `cbmc/src/cbmc/cbmc`.
485+
This document assumes you have already been able to build CPROVER on
486+
your chosen architecture.
487+
488+
#RUNNING REGRESSION AND UNIT TESTS
489+
490+
Regression and unit tests can be run using cmake or make. Your choice here
491+
should be the same as the compiling of the project itself.
492+
493+
Note that running all regression and unit tests can be slow when a debug
494+
build of CPROVER is used.
495+
496+
## CMAKE
497+
498+
This can be done by changing to the directory you built the
499+
project in with cmake and running ctest as follows.
500+
```
501+
cd <build_dir>
502+
ctest . -V -L CORE
503+
```
504+
You can also specify a pattern of tests to run as follows.
505+
```
506+
ctest . -V -L CORE -R <pattern>
507+
```
508+
For example
509+
```
510+
ctest . -V -L CORE -R goto
511+
```
512+
that will run all CORE tests that include `goto` in their
513+
name.
514+
515+
## MAKE
516+
517+
The regression and unit tests are handled differently in the
518+
make system. To run the regressions tests change to the
519+
`regression` directory and simply running make as follows.
520+
```
521+
cd regression
522+
make test
523+
```
524+
To run the unit tests, change into the `unit` directory and
525+
then run make as follows.
526+
```
527+
cd unit
528+
make test
529+
```

0 commit comments

Comments
 (0)