Skip to content

Commit 1e919e6

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 66d9d17 commit 1e919e6

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

COMPILING.md

Lines changed: 51 additions & 6 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
@@ -119,11 +119,11 @@ files.
119119
complete set of built binaries can be found in `build/bin/` once the build
120120
is complete.
121121
122-
*Parellel building*: You can pass `-j<numjobs>` to `make` to indicate how many
122+
*Parallel building*: You can pass `-j<numjobs>` to `make` to indicate how many
123123
jobs to run simultaneously. `ninja` defaults to building with `# of cores + 2`
124124
jobs at the same time.
125125
126-
# Building using Make
126+
#Building using Make
127127
128128
The rest of this section is split up based on the platform being built on.
129129
Please read the section appropriate for your platform.
@@ -258,7 +258,7 @@ Maven 3 manually.
258258
gmake -C jbmc/src
259259
```
260260
261-
# Working with IDEs and Docker
261+
#Working with IDEs and Docker
262262
263263
## Working with Visual Studio on Windows
264264
@@ -311,7 +311,7 @@ To compile and run the tools in a Docker container, do the following:
311311
In the resulting container, the files present in the local file system under
312312
`local/path/with/files` will be present under `/mnt/analysis`.
313313
314-
# Compilation options and configuration
314+
#Compilation options and configuration
315315
316316
## Compiling with CUDD
317317
@@ -507,3 +507,48 @@ successfully on Windows or macOS.
507507
The argument for the IPASIR parameter gives the build system the location for
508508
the IPASIR headers, which is needed for the cbmc includes of `ipasir.h`. The
509509
compiled binary will be placed in `cbmc/src/cbmc/cbmc`.
510+
This document assumes you have already been able to build CPROVER on
511+
your chosen architecture.
512+
513+
#RUNNING REGRESSION AND UNIT TESTS
514+
515+
Regression and unit tests can be run using cmake or make. Your choice here
516+
should be the same as the compiling of the project itself.
517+
518+
Note that running all regression and unit tests can be slow when a debug
519+
build of CPROVER is used.
520+
521+
## CMAKE
522+
523+
This can be done by changing to the directory you built the
524+
project in with cmake and running ctest as follows.
525+
```
526+
cd <build_dir>
527+
ctest . -V -L CORE
528+
```
529+
You can also specify a pattern of tests to run as follows.
530+
```
531+
ctest . -V -L CORE -R <pattern>
532+
```
533+
For example
534+
```
535+
ctest . -V -L CORE -R goto
536+
```
537+
that will run all CORE tests that include `goto` in their
538+
name.
539+
540+
## MAKE
541+
542+
The regression and unit tests are handled differently in the
543+
make system. To run the regressions tests change to the
544+
`regression` directory and simply running make as follows.
545+
```
546+
cd regression
547+
make test
548+
```
549+
To run the unit tests, change into the `unit` directory and
550+
then run make as follows.
551+
```
552+
cd unit
553+
make test
554+
```

0 commit comments

Comments
 (0)