Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:2.1:contribute [2019/06/05 23:36]
arosier [Install basic tools]
documentation:2.1:contribute [2019/12/04 15:37] (current)
coudot [Install dependencies]
Line 23: Line 23:
 //root :// //root ://
   apt install aptitude   apt install aptitude
-  aptitude install vim make devscripts yui-compressor git git-gui libjs-uglify coffeescript cpanminus+  aptitude install vim make devscripts yui-compressor git git-gui libjs-uglify coffeescript cpanminus ​autopkgtest pkg-perl-autopkgtest
   aptitude install libauth-yubikey-webclient-perl libnet-smtp-server-perl   aptitude install libauth-yubikey-webclient-perl libnet-smtp-server-perl
   ​   ​
Line 80: Line 80:
 ===== Install dependencies ​ ===== ===== Install dependencies ​ =====
  
-  aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl+  aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libtext-unidecode-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl
   aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 ​ # install Apache   aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 ​ # install Apache
   aptitude install nginx nginx-extras ​ # install Nginx   aptitude install nginx nginx-extras ​ # install Nginx
Line 90: Line 90:
 ===== Working Project ​ ===== ===== Working Project ​ =====
  
 +==== Unit tests ====
 +
 +Launch unit tests:
 +<​code>​
   make test # or manager_test,​ portal_test,​ ... to launch unit tests   make test # or manager_test,​ portal_test,​ ... to launch unit tests
 +</​code>​
 +
 +Same tests launched on a simulated install
 +<​code>​
 +  make autopkgtest # or autopkg_portal,​ autopkg_manager,​ ... to launch unit tests
 +</​code>​
 +  ​
 +Execute an unit test :
 +<​code>​
 +  # Building project
 +  cd ~/​lemonldap-ng/;​ make
 +  # Go to parent test directory
 +  cd ~/​lemonldap-ng/​lemonldap-ng-portal
 +  # and execute the unit test:
 +  prove -v t/​67-CheckUser.t
 +</​code>​
 +
 +Launch tests with LDAP backend, for example with OpenLDAP LTB package:
 +<​code>​
 +make LLNGTESTLDAP=1 LLNGTESTLDAP_SLAPD_BIN=/​usr/​local/​openldap/​libexec/​slapd LLNGTESTLDAP_SLAPADD_BIN=/​usr/​local/​openldap/​sbin/​slapadd LLNGTESTLDAP_SCHEMA_DIR=/​usr/​local/​openldap/​etc/​openldap/​schema/​ test
 +</​code>​
 +
 +==== Other commands ====
 +<​code>​
   make start_web_server # TESTUSESSL=1 to enable SSL engine (only available for Apache)   make start_web_server # TESTUSESSL=1 to enable SSL engine (only available for Apache)
   make start_web_server TESTWEBSERVER=nginx # to use Nginx web server   make start_web_server TESTWEBSERVER=nginx # to use Nginx web server
Line 100: Line 128:
   make manifest # to update manifest   make manifest # to update manifest
   make tidy # to magnify perl files (perl best pratices)   make tidy # to magnify perl files (perl best pratices)
-  cd lemonldap-ng-portal && prove t/XXXX # To launch specific unit test+</code>