From: <svn...@op...> - 2010-01-05 18:55:11
|
Author: scriptor Date: Tue Jan 5 19:55:02 2010 New Revision: 5975 URL: http://www.opensync.org/changeset/5975 Log: Basic installation instructions. Now with some remarks about the "test" target and the authentication specific tests. Modified: plugins/ldap-sync/INSTALL Modified: plugins/ldap-sync/INSTALL ============================================================================== --- plugins/ldap-sync/INSTALL Tue Jan 5 19:54:44 2010 (r5974) +++ plugins/ldap-sync/INSTALL Tue Jan 5 19:55:02 2010 (r5975) @@ -3,28 +3,26 @@ A. Regular build: -tar -xvjf libopensync-plugin-ldap-0.39.tar.bz2 -cd libopensync-plugin-ldap-0.39 +tar -xvjf libopensync-plugin-ldap-0.40.tar.bz2 +cd libopensync-plugin-ldap-0.40 mkdir build cd build -PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn /home/user1/libopensync-0.39/libopensync-plugin-ldap-0.39 +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn .. make -s make -w install ldconfig -cd ../.. B. Debug build: -tar -xvjf libopensync-plugin-ldap-0.39.tar.bz2 -cd libopensync-plugin-ldap-0.39 +tar -xvjf libopensync-plugin-ldap-0.40.tar.bz2 +cd libopensync-plugin-ldap-0.40 mkdir build_debug cd build_debug -PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON /home/user1/libopensync-0.39/libopensync-plugin-ldap-0.39 +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON .. make -s make -w install ldconfig -cd ../.. @@ -63,6 +61,8 @@ suffix "dc=example,dc=com" + + If you prefer a different DN, you must change tests/test.conf and @@ -81,19 +81,41 @@ mkdir build_debug cd build_debug -PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_LONG_TESTS=off /home/user1/libopensync-0.39/libopensync-plugin-ldap-0.39 +# Without authentification specific tests and without longer valgrind tests: +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_AUTH_TESTS=off -DRUN_LONG_TESTS=off .. + +# or: + +# Without authentification specific tests, but with time-consuming valgrind testts: +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_AUTH_TESTS=off -DRUN_LONG_TESTS=on .. + +# or: -or: +# With authentification specific tests and with time-consuming valgrind tests: +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_AUTH_TESTS=on -DRUN_LONG_TESTS=on .. + +# or: + +# When preparing for code coverage (gcov or lcov), and without authentication +# specific tests and without longer valgrind tests: +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Profiling -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_LONG_TESTS=off -DRUN_AUTH_TESTS=off .. -PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_LONG_TESTS=on /home/user1/libopensync-0.39/libopensync-plugin-ldap-0.39 make +make install make test + Tests with valgrind take quite some time: They are run only when cmake is run with "-DRUN_LONG_TESTS=on". + +Authentication specific tests are disabled by default, because the +require appropriate configuration of the LDAP servers. They can +be enabled by "-DRUN_AUTH_TESTS=on". + + reset; time make test (...) 100% tests passed, 0 tests failed out of 162 @@ -111,20 +133,67 @@ ctest -N -IV. Run only one particular test: + +IV. Run only particular tests: cd build -ctest -I 51,51 +ctest -I 120,120 -V +ctest -I 124,137 ctest -R remove_test_ldifs +ctest -R add_mod_del_contact1_and_fastsync -V + + + +V. Submit the build and test results to a dashboard: + +make ExperimentalStart +make ExperimentalConfigure +make ExperimentalBuild +make ExperimentalTest +make ExperimentalCoverage +make ExperimentalSubmit + + + +E. Profiling: + +I. Code coverage with lcov: + +Prerequisite: + +Build the code with -DCMAKE_BUILD_TYPE=Profiling + +Example: + +PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUPDATE_TYPE=svn -DCMAKE_BUILD_TYPE=Profiling -DCMAKE_VERBOSE_MAKEFILE=ON -DRUN_AUTH_TESTS=on -DRUN_LONG_TESTS=off .. + + +Compile and install it and run as many tests as possible: + + make -s clean + make -s + sudo make -s install + make test + + +Then, "make -s coverage". + +If this has succeeded, have a look at + + coverage/html/ldap_plugin_20090813151059/index.html + +for example. + + -E. The following cmake modules are required for the LDAP plugin: +F. The following cmake modules are required for the LDAP plugin: FindLibLdap.cmake -FindLibGCrypt.cmake +FindLibMozLdap.cmake FindLibSASL2.cmake FindLibGSSAPIV2.cmake |