Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Remove outcommented include from mpi.h
[simgrid.git] / doc / doxygen / inside_tests.doc
index 4502ac0828f6dabec43a2e41d32fd25085e1110a..d09cbe2d35946c7ecc7877b73942c5c37d5e1606 100644 (file)
@@ -49,8 +49,8 @@ make testall                    # Rebuild the test runner on need
 ./testall                       # Launch all tests
 ./testall --help                # revise how it goes if you forgot
 ./testall --tests=-all          # run no test at all (yeah, that's useless)
 ./testall                       # Launch all tests
 ./testall --help                # revise how it goes if you forgot
 ./testall --tests=-all          # run no test at all (yeah, that's useless)
-./testall --dump-only           # Display all existing test suite
-./testall --tests=-all,+dict    # Only launch the tests from the dict testsuite
+./testall --dump-only           # Display all existing test suites
+./testall --tests=-all,+dict    # Only launch the tests from the dict test suite
 ./testall --tests=-all,+foo:bar # run only the bar test from the foo suite.
 \endverbatim
 
 ./testall --tests=-all,+foo:bar # run only the bar test from the foo suite.
 \endverbatim
 
@@ -58,35 +58,22 @@ make testall                    # Rebuild the test runner on need
 \section inside_tests_add_units Adding unit tests
 
 If you want to test a specific function or set of functions, you need
 \section inside_tests_add_units Adding unit tests
 
 If you want to test a specific function or set of functions, you need
-a unit test. Edit
-<project/directory>/tools/cmake/UnitTesting.cmake to add your
-source file to the TEST_CFILES list, and add the corresponding unit
-file to the TEST_UNITS list. For example, if your file is toto.c,
-your unit file will be toto_unit.c. The full path to your file must be
-provided, but the unit file will always be in src/ directly.
-
-If you want to create unit tests in the file src/xbt/toto.c, your
-changes should look similar to:
+a unit test. Edit the file tools/cmake/UnitTesting.cmake to
+add your source file to the FILES_CONTAINING_UNITTESTS list. For
+example, if you want to create unit tests in the file src/xbt/plouf.c,
+your changes should look like that:
 
 \verbatim
 --- a/tools/cmake/UnitTesting.cmake
 +++ b/tools/cmake/UnitTesting.cmake
 
 \verbatim
 --- a/tools/cmake/UnitTesting.cmake
 +++ b/tools/cmake/UnitTesting.cmake
-@@ -11,6 +11,7 @@ set(TEST_CFILES
+@@ -11,6 +11,7 @@ set(FILES_CONTAINING_UNITTESTS
    src/xbt/xbt_strbuff.c
    src/xbt/xbt_sha.c
    src/xbt/config.c
    src/xbt/xbt_strbuff.c
    src/xbt/xbt_sha.c
    src/xbt/config.c
-+  src/xbt/toto.c
-   )
- set(TEST_UNITS
-   ${CMAKE_CURRENT_BINARY_DIR}/src/cunit_unit.c
-@@ -22,6 +23,7 @@ set(TEST_UNITS
-   ${CMAKE_CURRENT_BINARY_DIR}/src/xbt_strbuff_unit.c
-   ${CMAKE_CURRENT_BINARY_DIR}/src/xbt_sha_unit.c
-   ${CMAKE_CURRENT_BINARY_DIR}/src/config_unit.c
-+  ${CMAKE_CURRENT_BINARY_DIR}/src/toto_unit.c
-   ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_units_main.c
++  src/xbt/plouf.c
    )
    )
+
+ if(HAVE_MC)
 \endverbatim
 
 Then, you want to actually add your tests in the source file. All the
 \endverbatim
 
 Then, you want to actually add your tests in the source file. All the
@@ -112,7 +99,8 @@ reporting any issue. Finally, #xbt_test_log can be used to report
 intermediate steps. The messages will be shown only if the
 corresponding test fails.
 
 intermediate steps. The messages will be shown only if the
 corresponding test fails.
 
-Here is a recaping example, inspired from the dynar implementation.
+Here is a recaping example, inspired from src/xbt/dynar.h (see that
+file for details).
 @code
 /* The rest of your module implementation */
 
 @code
 /* The rest of your module implementation */
 
@@ -207,9 +195,9 @@ To add a new integration test, you thus have 3 things to do:
    are displayed (using the #XBT_LOG_ISENABLED() macro), or the
    modification of the log formats to hide the timings when they
    depend on the host machine.\n
    are displayed (using the #XBT_LOG_ISENABLED() macro), or the
    modification of the log formats to hide the timings when they
    depend on the host machine.\n
-   The script located in <project/directory>/tools/cmake/tesh/generate_tesh.sh can
+   The script located in <project/directory>/tools/tesh/generate_tesh can
    help you a lot in particular if the output is large (though a smaller output is preferable). 
    help you a lot in particular if the output is large (though a smaller output is preferable). 
-   There are also example tesh files in the <project/directory>/tools/cmake/tesh/ directory, that can be useful to understand the tesh syntax.
+   There are also example tesh files in the <project/directory>/tools/tesh/ directory, that can be useful to understand the tesh syntax.
    
  - <b>Add your test in the cmake infrastructure</b>. For that, modify
    the file <project/directory>/tools/cmake/Tests.cmake. Make sure to
    
  - <b>Add your test in the cmake infrastructure</b>. For that, modify
    the file <project/directory>/tools/cmake/Tests.cmake. Make sure to