Skip to content

Commit

Permalink
cmake: Removed README.cmake.md, edited README.md
Browse files Browse the repository at this point in the history
Deleted README.cmake.md and put any helpful
information it had into README.md.

Also a added note about which tests get executed
by ctest.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
  • Loading branch information
alimaredia committed Jun 30, 2016
1 parent ee7949f commit af6e986
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 143 deletions.
133 changes: 0 additions & 133 deletions README.cmake.md

This file was deleted.

74 changes: 64 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,50 @@ Build instructions:
make

This assumes you make your build dir a subdirectory of the ceph.git
checkout. If you put it elsewhere, just replace .. above with a
checkout. If you put it elsewhere, just replace .. above with a
correct path to the checkout.

To build only certain targets use:

make [target name]

To install:

make install

CMake Options
-------------

If you run the `cmake` command by hand, there are many options you can
set with "-D". For example the option to build the RADOS Gateway is
defaulted to ON. To build without the RADOS Gateway:

cmake -DWITH_RADOSGW=OFF [path to top level ceph directory]

Another example below is building with debugging and alternate locations
for a couple of external dependencies:

cmake -DLEVELDB_PREFIX="/opt/hyperleveldb" -DOFED_PREFIX="/opt/ofed" \
-DCMAKE_INSTALL_PREFIX=/opt/accelio -DCMAKE_C_FLAGS="-O0 -g3 -gdwarf-4" \
..

To view an exhaustive list of -D options, you can invoke `cmake` with:

cmake -LH

If you often pipe `make` to `less` and would like to maintain the
diagnostic colors for errors and warnings (and if your compiler
supports it), you can invoke `cmake` with:

cmake -DDIAGNOSTICS_COLOR=always ..

Then you'll get the diagnostic colors when you execute:

make | less -R

Other available values for 'DIAGNOSTICS_COLOR' are 'auto' (default) and
'never'.


Building packages
-----------------
Expand Down Expand Up @@ -114,28 +155,41 @@ To start or stop individual daemons, the sysvinit script can be used:
Running unit tests
==================

To run build and run all tests, use ctest:
To build and run all tests (in parallel using all processors), use `ctest`:

cd build
make
ctest -j$(nproc)

To run an individual test manually, run the ctest command with -R
(regex matching):
(Note: Many targets built from src/test are not run using `ctest`.
Targets starting with "unittest" are run in `make check` and thus can
be run with `ctest`. Targets starting with "ceph_test" can not, and should
be run by hand.)

To build and run all tests and their dependencies without other
unnecessary targets in Ceph:

cd build
make check -j$(nproc)

To run an individual test manually, run `ctest` with -R (regex matching):

ctest -R [regex matching test name(s)]

ctest -R [test name]
(Note: `ctest` does not build the test it's running or the dependencies needed
to run it)

To run an individual test manually and see all the tests output, run
the ctest command with the -V (verbose) flag:
`ctest` with the -V (verbose) flag:

ctest -V -R [test name]
ctest -V -R [regex matching test name(s)]

To run an tests manually and run the jobs in parallel, run the ctest
command with the -j flag:
To run an tests manually and run the jobs in parallel, run `ctest` with
the -j flag:

ctest -j [number of jobs]

There are many other flags you can give the ctest command for better control
There are many other flags you can give `ctest` for better control
over manual test execution. To view these options run:

man ctest
Expand Down

0 comments on commit af6e986

Please sign in to comment.