summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAli Maredia <amaredia@redhat.com>2016-06-29 22:05:26 +0200
committerAli Maredia <amaredia@redhat.com>2016-07-01 00:07:58 +0200
commitaf6e98610083c852f5f6db57b59b544cc3edba6c (patch)
tree4bf5bf5cffce403277eef09095ed84fdec7626ff /README.md
parentMerge pull request #9851 from cbodley/wip-rgw-tombstone-pgver (diff)
downloadceph-af6e98610083c852f5f6db57b59b544cc3edba6c.tar.xz
ceph-af6e98610083c852f5f6db57b59b544cc3edba6c.zip
cmake: Removed README.cmake.md, edited README.md
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>
Diffstat (limited to 'README.md')
-rw-r--r--README.md74
1 files changed, 64 insertions, 10 deletions
diff --git a/README.md b/README.md
index f406378e4b3..270d5eece47 100644
--- a/README.md
+++ b/README.md
@@ -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
-----------------
@@ -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